From 7edc57d3813a1b7feb9360343691fe337992144d Mon Sep 17 00:00:00 2001 From: ineedbots Date: Thu, 9 Sep 2021 13:35:32 -0600 Subject: [PATCH] some table info --- mods/bots/maps/mp/bots/_bot.gsc | 44 +++++++++++++++++++++++++ mods/bots/maps/mp/bots/_bot_utility.gsc | 16 +++++++-- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/mods/bots/maps/mp/bots/_bot.gsc b/mods/bots/maps/mp/bots/_bot.gsc index 3c6bbb0..d5839bb 100644 --- a/mods/bots/maps/mp/bots/_bot.gsc +++ b/mods/bots/maps/mp/bots/_bot.gsc @@ -137,6 +137,50 @@ init() level.bots_fullautoguns["ppsh"] = true; level.bots_fullautoguns["mp40"] = true; + level.bots_weapon_clip_sizes = []; + level.bots_weapon_clip_sizes["m1carbine_mp"] = 1; + level.bots_weapon_clip_sizes["m1garand_mp"] = 1; + level.bots_weapon_clip_sizes["bar_mp"] = 1; + level.bots_weapon_clip_sizes["shotgun_mp"] = 1; + level.bots_weapon_clip_sizes["thompson_mp"] = 1; + level.bots_weapon_clip_sizes["springfield_mp"] = 1; + level.bots_weapon_clip_sizes["sten_mp"] = 1; + level.bots_weapon_clip_sizes["enfield_mp"] = 1; + level.bots_weapon_clip_sizes["bren_mp"] = 1; + level.bots_weapon_clip_sizes["enfield_scope_mp"] = 1; + level.bots_weapon_clip_sizes["svt40_mp"] = 1; + level.bots_weapon_clip_sizes["pps42_mp"] = 1; + level.bots_weapon_clip_sizes["ppsh_mp"] = 1; + level.bots_weapon_clip_sizes["g43_mp"] = 1; + level.bots_weapon_clip_sizes["mosin_nagant_mp"] = 1; + level.bots_weapon_clip_sizes["mosin_nagant_sniper_mp"] = 1; + level.bots_weapon_clip_sizes["mp40_mp"] = 1; + level.bots_weapon_clip_sizes["kar98k_mp"] = 1; + level.bots_weapon_clip_sizes["kar98k_sniper_mp"] = 1; + level.bots_weapon_clip_sizes["mp44_mp"] = 1; + + level.bots_weapon_class_names = []; + level.bots_weapon_class_names["m1carbine_mp"] = ""; + level.bots_weapon_class_names["m1garand_mp"] = ""; + level.bots_weapon_class_names["bar_mp"] = ""; + level.bots_weapon_class_names["shotgun_mp"] = ""; + level.bots_weapon_class_names["thompson_mp"] = ""; + level.bots_weapon_class_names["springfield_mp"] = ""; + level.bots_weapon_class_names["sten_mp"] = ""; + level.bots_weapon_class_names["enfield_mp"] = ""; + level.bots_weapon_class_names["bren_mp"] = ""; + level.bots_weapon_class_names["enfield_scope_mp"] = ""; + level.bots_weapon_class_names["svt40_mp"] = ""; + level.bots_weapon_class_names["pps42_mp"] = ""; + level.bots_weapon_class_names["ppsh_mp"] = ""; + level.bots_weapon_class_names["g43_mp"] = ""; + level.bots_weapon_class_names["mosin_nagant_mp"] = ""; + level.bots_weapon_class_names["mosin_nagant_sniper_mp"] = ""; + level.bots_weapon_class_names["mp40_mp"] = ""; + level.bots_weapon_class_names["kar98k_mp"] = ""; + level.bots_weapon_class_names["kar98k_sniper_mp"] = ""; + level.bots_weapon_class_names["mp44_mp"] = ""; + level thread fixGamemodes(); level thread onPlayerConnect(); diff --git a/mods/bots/maps/mp/bots/_bot_utility.gsc b/mods/bots/maps/mp/bots/_bot_utility.gsc index 7154cf5..7cce2aa 100644 --- a/mods/bots/maps/mp/bots/_bot_utility.gsc +++ b/mods/bots/maps/mp/bots/_bot_utility.gsc @@ -397,7 +397,12 @@ isOnLadder() */ weaponClass( weap ) { - return ""; + answer = level.bots_weapon_class_names[weap]; + + if ( !isDefined( answer ) ) + answer = ""; + + return answer; } /* @@ -405,7 +410,12 @@ weaponClass( weap ) */ WeaponClipSize( weap ) { - return 1; + answer = level.bots_weapon_clip_sizes[weap]; + + if ( !isDefined( answer ) ) + answer = 1; + + return answer; } /* @@ -424,7 +434,7 @@ getWeaponSlot( weap ) */ IsWeaponClipOnly( weap ) { - return false; + return isSubStr( weap, "grenade_" ); } /*