‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_zm_weapons.csc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\callbacks_shared;
4 #using scripts\shared\clientfield_shared;
5 #using scripts\shared\flag_shared;
6 #using scripts\shared\system_shared;
7 #using scripts\shared\util_shared;
8 
9 #insert scripts\shared\shared.gsh;
10 #insert scripts\shared\version.gsh;
11 
12 #using scripts\shared\util_shared;
13 #using scripts\zm\_zm_utility;
14 
15 #insert scripts\zm\_zm_weapons.gsh;
16 
17 #namespace zm_weapons;
18 
19 ‪REGISTER_SYSTEM_EX( "zm_weapons", &‪__init__, &‪__main__, undefined )
20 
21 function ‪__init__()
22 {
23  level ‪flag::init( "weapon_table_loaded" );
24  level ‪flag::init( "weapon_wallbuys_created" );
26 }
27 
28 function ‪__main__()
29 {
30 }
31 
32 function private ‪on_player_connect( localClientNum )
33 {
34  if ( GetMigrationStatus(localClientNum) )
35  return;
36 
37  ResetWeaponCosts( localClientNum );
38 
39  level ‪flag::wait_till( "weapon_table_loaded" );
40  level ‪flag::wait_till( "weapon_wallbuys_created" );
41 
42  foreach( weaponCost in level.weapon_costs )
43  {
44  player_cost = ‪compute_player_weapon_ammo_cost( weaponCost.weapon, weaponCost.ammo_cost, weaponCost.upgraded );
45  SetWeaponCosts( localClientNum, weaponCost.weapon, weaponCost.cost, weaponCost.ammo_cost, player_cost );
46  }
47 }
48 
49 
50 
51 function ‪is_weapon_included( weapon )
52 {
53  if ( !isdefined( level._included_weapons ) )
54  {
55  return false;
56  }
57 
58  return IsDefined( level._included_weapons[weapon.rootWeapon] );
59 }
60 
61 function ‪compute_player_weapon_ammo_cost( weapon, cost, upgraded, n_base_non_wallbuy_cost, n_upgraded_non_wallbuy_cost )
62 {
63  //Default these here so we can keep secret shopper vars in one place
64  ‪DEFAULT( n_base_non_wallbuy_cost, 750 );
65  ‪DEFAULT( n_upgraded_non_wallbuy_cost, 5000 );
66  const N_WALLBUY_UPGRADE_COST = 4000;
67 
68  w_root = weapon.rootweapon;
69 
70  if( upgraded )
71  {
72  if( ‪is_wallbuy( level.zombie_weapons_upgraded[w_root] ) )
73  {
74  n_ammo_cost = N_WALLBUY_UPGRADE_COST;
75  }
76  else
77  {
78  n_ammo_cost = n_upgraded_non_wallbuy_cost;
79  }
80  }
81  else
82  {
83  if( ‪is_wallbuy( w_root ) )
84  {
85  n_ammo_cost = cost;
86  n_ammo_cost = ‪zm_utility::halve_score( n_ammo_cost );
87  }
88  else
89  {
90  n_ammo_cost = n_base_non_wallbuy_cost;
91  }
92  }
93 
94  return n_ammo_cost;
95 }
96 
97 function ‪include_weapon( weapon_name, display_in_box, cost, ammo_cost, upgraded=false )
98 {
99  if ( !isdefined( level._included_weapons ) )
100  {
101  level._included_weapons = [];
102  }
103 
104  weapon = GetWeapon( weapon_name );
105  level._included_weapons[weapon] = weapon;
106 
107  ‪DEFAULT(level.weapon_costs,[]);
108  if (!isdefined(level.weapon_costs[weapon_name]))
109  {
110  level.weapon_costs[weapon_name] = SpawnStruct();
111  level.weapon_costs[weapon_name].weapon = weapon;
112  }
113  level.weapon_costs[weapon_name].cost = cost;
114  if ( !IsDefined( ammo_cost ) || ammo_cost == 0 )
115  {
116  ammo_cost = ‪zm_utility::round_up_to_ten( int( cost * 0.5 ) );
117  }
118  level.weapon_costs[weapon_name].ammo_cost = ammo_cost;
119  level.weapon_costs[weapon_name].upgraded = upgraded;
120 
121  if ( isdefined( display_in_box ) && !display_in_box )
122  {
123  return;
124  }
125 
126  if ( !isdefined( level._resetZombieBoxWeapons ) )
127  {
128  level._resetZombieBoxWeapons = true;
129  ResetZombieBoxWeapons();
130  }
131 
132  if (!IsDefined(weapon.worldModel))
133  {
134  thread ‪util::error( "Missing worldmodel for weapon " + weapon_name + " (or weapon may be missing from fastfile)." );
135  return;
136  }
137 
138  AddZombieBoxWeapon( weapon, weapon.worldModel, weapon.isDualWield );
139 }
140 
141 function ‪include_upgraded_weapon( weapon_name, upgrade_name, display_in_box, cost, ammo_cost )
142 {
143  ‪include_weapon( upgrade_name, display_in_box, cost, ammo_cost, true );
144 
145  if ( !IsDefined( level.zombie_weapons_upgraded ) )
146  {
147  level.zombie_weapons_upgraded = [];
148  }
149 
150  weapon = GetWeapon( weapon_name );
151  upgrade = GetWeapon( upgrade_name );
152  level.zombie_weapons_upgraded[upgrade] = weapon;
153 }
154 
155 function ‪is_weapon_upgraded( weapon )
156 {
157  rootWeapon = weapon.rootWeapon;
158 
159  if ( IsDefined( level.zombie_weapons_upgraded[rootWeapon] ) )
160  {
161  return true;
162  }
163 
164  return false;
165 }
166 
167 function ‪init()
168 {
169  spawn_list = [];
170  spawnable_weapon_spawns = ‪struct::get_array( "weapon_upgrade", "targetname" );
171  spawnable_weapon_spawns = ArrayCombine( spawnable_weapon_spawns, ‪struct::get_array( "bowie_upgrade", "targetname" ), true, false );
172  spawnable_weapon_spawns = ArrayCombine( spawnable_weapon_spawns, ‪struct::get_array( "sickle_upgrade", "targetname" ), true, false );
173  spawnable_weapon_spawns = ArrayCombine( spawnable_weapon_spawns, ‪struct::get_array( "tazer_upgrade", "targetname" ), true, false );
174  spawnable_weapon_spawns = ArrayCombine( spawnable_weapon_spawns, ‪struct::get_array( "buildable_wallbuy", "targetname" ), true, false );
175 
176  if ( ‪IS_TRUE( level.use_autofill_wallbuy ) )
177  {
178  spawnable_weapon_spawns = ArrayCombine( spawnable_weapon_spawns, level.active_autofill_wallbuys, true, false );
179  }
180 
181  if ( !‪IS_TRUE( level.headshots_only ) )
182  {
183  spawnable_weapon_spawns = ArrayCombine( spawnable_weapon_spawns, ‪struct::get_array( "claymore_purchase", "targetname" ), true, false );
184  }
185 
186  location = level.scr_zm_map_start_location;
187  if ( (location == "default" || location == "") && IsDefined( level.default_start_location ) )
188  {
189  location = level.default_start_location;
190  }
191 
192  match_string = level.scr_zm_ui_gametype;
193  if ( "" != location )
194  {
195  match_string = match_string + "_" + location;
196  }
197  match_string_plus_space = " " + match_string;
198 
199  for ( i = 0; i < spawnable_weapon_spawns.size; i++ )
200  {
201  spawnable_weapon = spawnable_weapon_spawns[i];
202 
203  spawnable_weapon.weapon = GetWeapon( spawnable_weapon.zombie_weapon_upgrade );
204  if ( isDefined( spawnable_weapon.zombie_weapon_upgrade ) && spawnable_weapon.weapon.isGrenadeWeapon && ‪IS_TRUE( level.headshots_only ) )
205  {
206  continue;
207  }
208 
209  if ( !isdefined( spawnable_weapon.script_noteworthy ) || spawnable_weapon.script_noteworthy == "" )
210  {
211  spawn_list[spawn_list.size] = spawnable_weapon;
212  }
213  else
214  {
215  matches = strTok( spawnable_weapon.script_noteworthy, "," );
216 
217  for ( j = 0; j < matches.size; j++ )
218  {
219  if ( matches[j] == match_string || matches[j] == match_string_plus_space )
220  {
221  spawn_list[spawn_list.size] = spawnable_weapon;
222  }
223  }
224 
225  }
226  }
227 
228  level._active_wallbuys = [];
229 
230  for ( i = 0; i < spawn_list.size; i++ )
231  {
232  spawn_list[i].script_label = spawn_list[i].zombie_weapon_upgrade + "_" + spawn_list[i].origin;
233 
234  level._active_wallbuys[spawn_list[i].script_label] = spawn_list[i];
235 
236  numBits = 2;
237 
238  if ( isdefined( level._wallbuy_override_num_bits ) )
239  {
240  numBits = level._wallbuy_override_num_bits;
241  }
242 
243  ‪clientfield::register( "world", spawn_list[i].script_label, ‪VERSION_SHIP, numBits, "int", &‪wallbuy_callback, !‪CF_HOST_ONLY, ‪CF_CALLBACK_ZERO_ON_NEW_ENT ); // 2 bit int client field - bit 1 : 0 = not bought 1 = bought. bit 2: 0 = not hacked 1 = hacked.
244 
245  target_struct = ‪struct::get( spawn_list[i].target, "targetname" );
246 
247  if ( spawn_list[i].targetname == "buildable_wallbuy" )
248  {
249  bits = 4;
250  if ( IsDefined( level.buildable_wallbuy_weapons ) )
251  {
252  bits = GetMinBitCountForNum( level.buildable_wallbuy_weapons.size + 1 );
253  }
254  ‪clientfield::register( "world", spawn_list[i].script_label + "_idx", ‪VERSION_SHIP, bits, "int", &‪wallbuy_callback_idx, !‪CF_HOST_ONLY, ‪CF_CALLBACK_ZERO_ON_NEW_ENT );
255  }
256  }
257 
258  level ‪flag::set( "weapon_wallbuys_created" );
259 
261 }
262 
263 //Check whether this weapon is a wallbuy weapon or not
264 function ‪is_wallbuy( w_to_check )
265 {
266  w_base = w_to_check.rootWeapon;
267 
268  foreach( s_wallbuy in level._active_wallbuys )
269  {
270  if( s_wallbuy.weapon == w_base )
271  {
272  return true;
273  }
274  }
275 
276 
277  if ( isdefined( level._additional_wallbuy_weapons ) )
278  {
279  if ( IsInArray( level._additional_wallbuy_weapons, w_base ) )
280  {
281  return true;
282  }
283  }
284 
285  return false;
286 }
287 
288 function ‪wallbuy_player_connect( localClientNum )
289 {
290  keys = GetArrayKeys( level._active_wallbuys );
291 
292 
293 
294  for ( i = 0; i < keys.size; i++ )
295  {
296  wallbuy = level._active_wallbuys[keys[i]];
297 
298  fx = level._effect["870mcs_zm_fx"];
299 
300  if ( isdefined( level._effect[wallbuy.zombie_weapon_upgrade + "_fx"] ) )
301  {
302  fx = level._effect[wallbuy.zombie_weapon_upgrade + "_fx"];
303  }
304 
305 //TEMP Comment out until we get a glow FX without outline.
306 // wallbuy.fx[localClientNum] = playfx( localClientNum, fx, wallbuy.origin, AnglesToForward( wallbuy.angles ), AnglesToUp( wallbuy.angles ), 0.1 );
307 
308  target_struct = ‪struct::get( wallbuy.target, "targetname" );
309 
310  target_model = ‪zm_utility::spawn_buildkit_weapon_model( localClientNum, wallbuy.weapon, undefined, target_struct.origin, target_struct.angles );
311  target_model Hide();
312  target_model.parent_struct = target_struct;
313 
314  wallbuy.models[localClientNum] = target_model;
315  }
316 }
317 
318 function ‪wallbuy_callback( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
319 {
320  if ( bInitialSnap )
321  {
322  while ( !isdefined( level._active_wallbuys ) || !isdefined( level._active_wallbuys[fieldName] ) )
323  {
324  wait 0.05;
325  }
326  }
327 
328  struct = level._active_wallbuys[fieldName];
329 
330 
331 
332  switch ( newVal )
333  {
334  case 0:
335  struct.models[localClientNum].origin = struct.models[localClientNum].parent_struct.origin;
336  struct.models[localClientNum].angles = struct.models[localClientNum].parent_struct.angles;
337  struct.models[localClientNum] hide();
338  break;
339 
340  case 1:
341  if ( bInitialSnap )
342  {
343  if ( !isdefined( struct.models ) )
344  {
345  while ( !isdefined( struct.models ) )
346  {
347  wait( 0.05 ); // When hot joining, buildable wallbuys may not have executed their callback yet, which will set up the model arrays... wait til it has.
348  }
349 
350  while ( !isdefined( struct.models[localClientNum] ) )
351  {
352  wait( 0.05 ); // When hot joining, buildable wallbuys may not have executed their callback yet, which will set up the model arrays... wait til it has.
353  }
354 
355  }
356 
357  struct.models[localClientNum] show();
358  struct.models[localClientNum].origin = struct.models[localClientNum].parent_struct.origin;
359  }
360  else
361  {
362  wait( 0.05 );
363 
364  if ( localClientNum == 0 )
365  {
366  playsound( 0, "zmb_weap_wall", struct.origin );
367  }
368 
369  vec_offset = (0,0,0);
370 
371  if ( isDefined( struct.models[localClientNum].parent_struct.script_vector ) )
372  {
373  vec_offset = struct.models[localClientNum].parent_struct.script_vector;
374  }
375 
376  struct.models[localClientNum].origin = struct.models[localClientNum].parent_struct.origin + (AnglesToRight( struct.models[localClientNum].angles + vec_offset) * 8);
377  struct.models[localClientNum] show();
378  struct.models[localClientNum] moveto( struct.models[localClientNum].parent_struct.origin, 1 );
379  }
380  break;
381 
382  case 2:
383  if ( isdefined( level.wallbuy_callback_hack_override ) )
384  {
385  struct.models[localClientNum] [[ level.wallbuy_callback_hack_override ]]();
386  }
387  break;
388  }
389 }
390 
391 function ‪wallbuy_callback_idx( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
392 {
393  basefield = GetSubStr( fieldName, 0, fieldName.size - 4 );
394  struct = level._active_wallbuys[basefield];
395 
396  if ( newVal == 0 )
397  {
398  if ( isdefined( struct.models[localClientNum] ) )
399  {
400  struct.models[localClientNum] hide();
401  }
402  }
403  else if ( newVal > 0 )
404  {
405  weaponname = level.buildable_wallbuy_weapons[newVal - 1];
406  weapon = GetWeapon( weaponname );
407 
408  if ( !isdefined( struct.models ) )
409  {
410  struct.models = [];
411  }
412 
413  if ( !isdefined( struct.models[localClientNum] ) )
414  {
415  target_struct = ‪struct::get( struct.target, "targetname" );
416 
417  model = undefined;
418  if ( isdefined( level.buildable_wallbuy_weapon_models[weaponname] ) )
419  {
420  model = level.buildable_wallbuy_weapon_models[weaponname];
421  }
422 
423  angles = target_struct.angles;
424  if ( isdefined(level.buildable_wallbuy_weapon_angles[weaponname] ) )
425  {
426  switch ( level.buildable_wallbuy_weapon_angles[weaponname] )
427  {
428  case 90: angles = VectorToAngles( AnglesToRight( angles ) ); break;
429  case 180: angles = VectorToAngles( -AnglesToForward( angles ) ); break;
430  case 270: angles = VectorToAngles( -AnglesToRight( angles ) ); break;
431  }
432  }
433 
434  target_model = ‪zm_utility::spawn_buildkit_weapon_model( localClientNum, weapon, undefined, target_struct.origin, angles);
435  target_model Hide();
436  target_model.parent_struct = target_struct;
437 
438  struct.models[localClientNum] = target_model;
439  if ( isdefined(struct.fx[localClientNum] ) )
440  {
441  StopFX( localClientNum, struct.fx[localClientNum] );
442  struct.fx[localClientNum] = undefined;
443  }
444 
445  fx = level._effect["870mcs_zm_fx"];
446 
447  if ( isdefined( level._effect[weaponname + "_fx"] ) )
448  {
449  fx = level._effect[weaponname + "_fx"];
450  }
451 
452  struct.fx[localClientNum] = playfx( localClientNum, fx, struct.origin, AnglesToForward( struct.angles ), AnglesToUp( struct.angles ), 0.1 );
453 
454  level notify( "wallbuy_updated" );
455  }
456  }
457 }
458 
459 function ‪checkStringValid( str )
460 {
461  if( str != "" )
462  return str;
463  return undefined;
464 }
465 
466 function ‪load_weapon_spec_from_table( table, first_row )
467 {
468  gametype = GetDvarString( "ui_gametype" );
469  index = 1;
470  row = TableLookupRow( table, index );
471  while ( isdefined( row ) )
472  {
473  //Get this weapons data from the current tablerow
474  weapon_name = ‪checkStringValid( row[‪WEAPON_TABLE_COL_NAME] );
477  cost = int( row[‪WEAPON_TABLE_COL_COST] );
478  weaponVO = ‪checkStringValid( row[‪WEAPON_TABLE_COL_VO] );
480  ammo_cost = undefined; // if unspecified, default to half the cost using undefined
481  if ( "" != row[‪WEAPON_TABLE_COL_AMMO_COST] )
482  {
483  ammo_cost = int( row[‪WEAPON_TABLE_COL_AMMO_COST] );
484  }
486  is_zcleansed = (ToLower( row[‪WEAPON_TABLE_COL_IS_ZCLEANSED] ) == "true");
487  in_box = (ToLower( row[‪WEAPON_TABLE_COL_IN_BOX] ) == "true");
488  upgrade_in_box = (ToLower( row[‪WEAPON_TABLE_COL_UPGRADE_IN_BOX] ) == "true");
489  ‪is_limited = (ToLower( row[‪WEAPON_TABLE_COL_IS_LIMITED] ) == "true");
490  ‪limit = int( row[‪WEAPON_TABLE_COL_LIMIT] );
491  upgrade_limit = int( row[‪WEAPON_TABLE_COL_UPGRADE_LIMIT] );
492  content_restrict = row[‪WEAPON_TABLE_COL_CONTENT_RESTRICT];
493  wallbuy_autospawn = (ToLower( row[‪WEAPON_TABLE_COL_AUTOSPAWN] ) == "true");
494  weapon_class = ‪checkStringValid( row[‪WEAPON_TABLE_COL_CLASS] );
495  ‪is_wonder_weapon = ( ToLower( row[ ‪WEAPON_TABLE_COL_IS_WONDER_WEAPON ] ) == "true" );
496  force_attachments = ToLower( row[ ‪WEAPON_TABLE_COL_FORCE_ATTACHMENTS ] );
497 
498  //Now use this data to include the weapon
499  ‪zm_weapons::include_weapon( weapon_name, in_box, cost, ammo_cost, false );
500  if ( isdefined( upgrade_name ) )
501  {
502  ‪zm_weapons::include_upgraded_weapon( weapon_name, upgrade_name, upgrade_in_box, cost, N_UPGRADED_WEAPON_AMMO_COST );
503  }
504 
505  /*
506  weapon = GetWeapon( weapon_name );
507  if ( !isdefined( level.wallbuy_autofill_weapons ) )
508  {
509  level.wallbuy_autofill_weapons = [];
510  level.wallbuy_autofill_weapons["all"] = [];
511  }
512  level.wallbuy_autofill_weapons["all"][weapon] = wallbuy_autospawn;
513 
514  if ( weapon_class != "" )
515  {
516  if ( !isdefined( level.wallbuy_autofill_weapons[weapon_class] ) )
517  {
518  level.wallbuy_autofill_weapons[weapon_class] = [];
519  }
520  level.wallbuy_autofill_weapons[weapon_class][weapon] = weapon;
521  }
522  */
523 
524  index++;
525  row = TableLookupRow( table, index );
526  }
527 
528  level ‪flag::set( "weapon_table_loaded" );
529 }
530 
532 {
533  wallbuys = ‪struct::get_array("wallbuy_autofill","targetname");
534 
535 
536  if (!isdefined(wallbuys) || wallbuys.size == 0 || !isdefined(level.wallbuy_autofill_weapons) || level.wallbuy_autofill_weapons.size == 0 )
537  return;
538 
539  level.use_autofill_wallbuy = true;
540 
541  array_keys["all"] = GetArrayKeys(level.wallbuy_autofill_weapons["all"]);
542  index = 0;
543  class_all = [];
544 
545  level.active_autofill_wallbuys = [];
546 
547  //Loop through all autospawn wallbuys
548  foreach (wallbuy in wallbuys)
549  {
550  weapon_class= wallbuy.script_string;
551  weapon = undefined;
552 
553  //If this wallbuy needs a specific weapon_class of weapons
554  if (isdefined(weapon_class) && weapon_class != "")
555  {
556  //Check if there's any weapon of this weapon_class included
557  if (!isdefined(array_keys[weapon_class]) && isdefined(level.wallbuy_autofill_weapons[weapon_class]))
558  array_keys[weapon_class] = GetArrayKeys(level.wallbuy_autofill_weapons[weapon_class]);
559  if (isdefined(array_keys[weapon_class]))
560  {
561  //Find the first not spawned weapon of this type
562  for (i = 0 ; i < array_keys[weapon_class].size; i ++)
563  {
564  if (level.wallbuy_autofill_weapons["all"][array_keys[weapon_class][i]])
565  {
566  weapon = array_keys[weapon_class][i];
567  //Mark this weapon spawned
568  level.wallbuy_autofill_weapons["all"][weapon] = false;
569  break;
570  }
571  }
572  }
573  else
574  {
575  continue;
576  }
577  }
578  else
579  {
580  class_all[class_all.size] = wallbuy;
581  continue;
582  //Find the first available weapon in all weapons included
583  }
584 
585  //No more weapon can be assigned to this wallbuy, skip it
586  if (!isdefined(weapon))
587  continue;
588 
589  wallbuy.zombie_weapon_upgrade = weapon.name;
590  wallbuy.weapon = weapon;
591 
592  //Fix for the blue light effect
593  right = AnglesToRight(wallbuy.angles);
594  wallbuy.origin -= right * 2;
595 
596  wallbuy.target = "autofill_wallbuy_" + index;
597 
598  target_struct = SpawnStruct();
599  target_struct.targetname = wallbuy.target;
600  target_struct.angles = wallbuy.angles;
601  target_struct.origin = wallbuy.origin;
602 
603  model = wallbuy.weapon.worldModel;
604  target_struct.model = model;
605  target_struct ‪struct::init();
606  level.active_autofill_wallbuys[level.active_autofill_wallbuys.size] = wallbuy;
607  index ++;
608 
609  }
610 
611  foreach (wallbuy in class_all)
612  {
613  weapon_name = undefined;
614  for (i = 0 ; i < array_keys["all"].size; i ++)
615  {
616  if (level.wallbuy_autofill_weapons["all"][array_keys["all"][i]])
617  {
618  weapon = array_keys["all"][i];
619  level.wallbuy_autofill_weapons["all"][weapon] = false;
620  break;
621  }
622  }
623 
624  if (!isdefined(weapon))
625  break;
626 
627  wallbuy.zombie_weapon_upgrade = weapon.name;
628  wallbuy.weapon = weapon;
629 
630  //Fix for the blue light effect
631  right = AnglesToRight(wallbuy.angles);
632  wallbuy.origin -= right * 2;
633 
634  wallbuy.target = "autofill_wallbuy_" + index;
635 
636  target_struct = SpawnStruct();
637  target_struct.targetname = wallbuy.target;
638  target_struct.angles = wallbuy.angles;
639  target_struct.origin = wallbuy.origin;
640 
641  model = wallbuy.weapon.worldModel;
642  target_struct.model = model;
643  target_struct ‪struct::init();
644  level.active_autofill_wallbuys[level.active_autofill_wallbuys.size] = wallbuy;
645  index ++;
646  }
647 }
‪WEAPON_TABLE_COL_VO
‪#define WEAPON_TABLE_COL_VO
Definition: _zm_weapons.gsh:5
‪WEAPON_TABLE_COL_IS_LIMITED
‪#define WEAPON_TABLE_COL_IS_LIMITED
Definition: _zm_weapons.gsh:12
‪round_up_to_ten
‪function round_up_to_ten(score)
Definition: _zm_utility.csc:48
‪limit
‪function limit(equipment_name, limited)
Definition: _zm_equipment.gsc:140
‪__main__
‪function __main__()
Definition: _zm_weapons.csc:28
‪WEAPON_TABLE_COL_LIMIT
‪#define WEAPON_TABLE_COL_LIMIT
Definition: _zm_weapons.gsh:13
‪CF_CALLBACK_ZERO_ON_NEW_ENT
‪#define CF_CALLBACK_ZERO_ON_NEW_ENT
Definition: version.gsh:103
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪get_array
‪function get_array(kvp_value, kvp_key="targetname")
Definition: struct.csc:34
‪WEAPON_TABLE_COL_CREATE_VOX
‪#define WEAPON_TABLE_COL_CREATE_VOX
Definition: _zm_weapons.gsh:8
‪WEAPON_TABLE_COL_IS_ZCLEANSED
‪#define WEAPON_TABLE_COL_IS_ZCLEANSED
Definition: _zm_weapons.gsh:9
‪wallbuy_callback
‪function wallbuy_callback(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _zm_weapons.csc:318
‪WEAPON_TABLE_COL_NAME
‪#define WEAPON_TABLE_COL_NAME
Definition: _zm_weapons.gsh:1
‪WEAPON_TABLE_COL_CLASS
‪#define WEAPON_TABLE_COL_CLASS
Definition: _zm_weapons.gsh:17
‪WEAPON_TABLE_COL_UPGRADE_IN_BOX
‪#define WEAPON_TABLE_COL_UPGRADE_IN_BOX
Definition: _zm_weapons.gsh:11
‪is_wonder_weapon
‪function is_wonder_weapon(w_to_check)
Definition: _zm_weapons.gsc:3582
‪autofill_wallbuys_init
‪function autofill_wallbuys_init()
Definition: _zm_weapons.csc:531
‪is_weapon_upgraded
‪function is_weapon_upgraded(weapon)
Definition: _zm_weapons.csc:155
‪init
‪function init()
Definition: _zm_weapons.csc:167
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪get
‪function get(kvp_value, kvp_key="targetname")
Definition: struct.csc:13
‪is_weapon_included
‪function is_weapon_included(weapon)
Definition: _zm_weapons.csc:51
‪WEAPON_TABLE_COL_VO_RESPOND
‪#define WEAPON_TABLE_COL_VO_RESPOND
Definition: _zm_weapons.gsh:6
‪error
‪function error(msg)
Definition: _util.gsc:28
‪WEAPON_TABLE_COL_AMMO_COST
‪#define WEAPON_TABLE_COL_AMMO_COST
Definition: _zm_weapons.gsh:7
‪DEFAULT
‪#define DEFAULT(__var, __default)
Definition: shared.gsh:270
‪load_weapon_spec_from_table
‪function load_weapon_spec_from_table(table, first_row)
Definition: _zm_weapons.csc:466
‪on_localclient_connect
‪function on_localclient_connect(localClientNum)
Definition: ctf.csc:20
‪compute_player_weapon_ammo_cost
‪function compute_player_weapon_ammo_cost(weapon, cost, upgraded, n_base_non_wallbuy_cost, n_upgraded_non_wallbuy_cost)
Definition: _zm_weapons.csc:61
‪REGISTER_SYSTEM_EX
‪#define REGISTER_SYSTEM_EX(__sys, __func_init_preload, __func_init_postload, __reqs)
Definition: shared.gsh:209
‪CF_HOST_ONLY
‪#define CF_HOST_ONLY
Definition: version.gsh:102
‪WEAPON_TABLE_COL_UPGRADE_LIMIT
‪#define WEAPON_TABLE_COL_UPGRADE_LIMIT
Definition: _zm_weapons.gsh:14
‪WEAPON_TABLE_COL_AUTOSPAWN
‪#define WEAPON_TABLE_COL_AUTOSPAWN
Definition: _zm_weapons.gsh:16
‪__init__
‪function __init__()
Definition: _zm_weapons.csc:21
‪halve_score
‪function halve_score(n_score)
Definition: _zm_utility.csc:70
‪wait_till
‪function wait_till(str_flag)
Definition: flag_shared.csc:189
‪WEAPON_TABLE_COL_HINT
‪#define WEAPON_TABLE_COL_HINT
Definition: _zm_weapons.gsh:3
‪on_player_connect
‪function private on_player_connect(localClientNum)
Definition: _zm_weapons.csc:32
‪is_limited
‪function is_limited(equipment)
Definition: _zm_equipment.gsc:438
‪WEAPON_TABLE_COL_IS_WONDER_WEAPON
‪#define WEAPON_TABLE_COL_IS_WONDER_WEAPON
Definition: _zm_weapons.gsh:19
‪WEAPON_TABLE_COL_COST
‪#define WEAPON_TABLE_COL_COST
Definition: _zm_weapons.gsh:4
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪checkStringValid
‪function checkStringValid(str)
Definition: _zm_weapons.csc:459
‪WEAPON_TABLE_COL_UPGRADE_NAME
‪#define WEAPON_TABLE_COL_UPGRADE_NAME
Definition: _zm_weapons.gsh:2
‪is_wallbuy
‪function is_wallbuy(w_to_check)
Definition: _zm_weapons.csc:264
‪wallbuy_player_connect
‪function wallbuy_player_connect(localClientNum)
Definition: _zm_weapons.csc:288
‪spawn_buildkit_weapon_model
‪function spawn_buildkit_weapon_model(localClientNum, weapon, camo, origin, angles)
Definition: _zm_utility.csc:107
‪include_upgraded_weapon
‪function include_upgraded_weapon(weapon_name, upgrade_name, display_in_box, cost, ammo_cost)
Definition: _zm_weapons.csc:141
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪WEAPON_TABLE_COL_IN_BOX
‪#define WEAPON_TABLE_COL_IN_BOX
Definition: _zm_weapons.gsh:10
‪wallbuy_callback_idx
‪function wallbuy_callback_idx(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _zm_weapons.csc:391
‪WEAPON_TABLE_COL_FORCE_ATTACHMENTS
‪#define WEAPON_TABLE_COL_FORCE_ATTACHMENTS
Definition: _zm_weapons.gsh:20
‪WEAPON_TABLE_COL_CONTENT_RESTRICT
‪#define WEAPON_TABLE_COL_CONTENT_RESTRICT
Definition: _zm_weapons.gsh:15
‪include_weapon
‪function include_weapon(weapon_name, display_in_box, cost, ammo_cost, upgraded=false)
Definition: _zm_weapons.csc:97