‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_zm_equipment.gsc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\array_shared;
4 #using scripts\shared\callbacks_shared;
5 #using scripts\shared\clientfield_shared;
6 #using scripts\shared\flag_shared;
7 #using scripts\shared\laststand_shared;
8 #using scripts\shared\system_shared;
9 #using scripts\shared\util_shared;
10 
11 #insert scripts\shared\shared.gsh;
12 #insert scripts\shared\version.gsh;
13 
14 #using scripts\zm\_util;
15 #using scripts\zm\_zm_audio;
16 #using scripts\zm\_zm_laststand;
17 #using scripts\zm\_zm_spawner;
18 #using scripts\zm\_zm_stats;
19 #using scripts\zm\_zm_unitrigger;
20 #using scripts\zm\_zm_utility;
21 #using scripts\zm\_zm_weapons;
22 
23 #insert scripts\zm\_zm_buildables.gsh;
24 #insert scripts\zm\_zm_utility.gsh;
25 
26 #define ZM_EQUIPMENT_HEALTH 1500
27 
28 #precache( "fx", "_t6/maps/zombie/fx_zmb_tranzit_electrap_explo" );
29 #precache( "fx", "_t6/maps/zombie/fx_zmb_tranzit_shield_explo" );
30 
31 #namespace zm_equipment;
32 
33 ‪REGISTER_SYSTEM_EX( "zm_equipment", &‪__init__, &‪__main__, undefined )
34 
35 function ‪__init__()
36 {
37  level.buildable_piece_count = ‪CLIENTFIELD_BUILDABLE_PIECE_COUNT;
38 
39  level._equipment_disappear_fx = "_t6/maps/zombie/fx_zmb_tranzit_electrap_explo";
40 
41  level.placeable_equipment_destroy_fn=[];
42 
43  if(!‪IS_TRUE(level._no_equipment_activated_clientfield))
44  {
45  ‪clientfield::register( "scriptmover", "equipment_activated", ‪VERSION_SHIP, 4, "int" );
46  }
47 }
48 
49 function ‪__main__()
50 {
52 }
53 
54 function ‪signal_activated(val = 1)
55 {
56  if(‪IS_TRUE(level._no_equipment_activated_clientfield))
57  {
58  return;
59  }
60 
61  self endon("death");
62  self ‪clientfield::set("equipment_activated", val);
63 
64  for(i = 0; i < 2; i ++)
65  {
67  }
68 
69  self ‪clientfield::set("equipment_activated", 0);
70 }
71 
72 function register( equipment_name, hint, howto_hint, hint_icon, equipmentVO)
73 {
74  equipment = GetWeapon( equipment_name );
75 
76  struct = SpawnStruct();
77 
78  if ( !IsDefined( level.zombie_equipment ) )
79  {
80  level.zombie_equipment = [];
81  }
82 
83  struct.equipment = equipment;
84  struct.hint = hint;
85  struct.howto_hint = howto_hint;
86  struct.hint_icon = hint_icon;
87  struct.vox = equipmentVO;
88  struct.triggers = [];
89  struct.models = [];
90 
91  struct.notify_strings = SpawnStruct();
92  struct.notify_strings.activate = equipment.name + "_activate";
93  struct.notify_strings.deactivate = equipment.name + "_deactivate";
94  struct.notify_strings.taken = equipment.name + "_taken";
95  struct.notify_strings.pickup = equipment.name + "_pickup";
96 
97  level.zombie_equipment[equipment] = struct;
98 }
99 
100 function ‪register_slot_watcher_override( str_equipment, func_slot_watcher_override )
101 {
102  level.a_func_equipment_slot_watcher_override[ str_equipment ] = func_slot_watcher_override;
103 }
104 
105 function ‪is_included( equipment )
106 {
107  if ( !IsDefined( level.zombie_include_equipment ) )
108  {
109  return false;
110  }
111 
112  if ( IsString(equipment) )
113  {
114  equipment = GetWeapon( equipment );
115  }
116 
117  return IsDefined( level.zombie_include_equipment[equipment.rootWeapon] );
118 }
119 
120 
121 function ‪include( equipment_name )
122 {
123  if ( !IsDefined( level.zombie_include_equipment ) )
124  {
125  level.zombie_include_equipment = [];
126  }
127 
128  level.zombie_include_equipment[GetWeapon( equipment_name )] = true;
129 }
130 
131 
132 function ‪set_ammo_driven( equipment_name, start, refill_max_ammo = false )
133 {
134  level.zombie_equipment[GetWeapon( equipment_name )].notake = true;
135  level.zombie_equipment[GetWeapon( equipment_name )].start_ammo = start;
136  level.zombie_equipment[GetWeapon( equipment_name )].refill_max_ammo = refill_max_ammo;
137 }
138 
139 
140 function ‪limit( equipment_name, limited )
141 {
142  if (!isdefined(level._limited_equipment))
143  {
144  level._limited_equipment = [];
145  }
146 
147  if (limited)
148  {
149  level._limited_equipment[level._limited_equipment.size] = GetWeapon( equipment_name );
150  }
151  else
152  {
153  ArrayRemoveValue( level._limited_equipment, GetWeapon( equipment_name ), false );
154  }
155 }
156 
157 
158 function ‪init_upgrade()
159 {
160  equipment_spawns = [];
161  equipment_spawns = GetEntArray( "zombie_equipment_upgrade", "targetname" );
162 
163  for( i = 0; i < equipment_spawns.size; i++ )
164  {
165  equipment_spawns[i].equipment = GetWeapon( equipment_spawns[i].zombie_equipment_upgrade );
166 
167  hint_string = ‪get_hint( equipment_spawns[i].equipment );
168  equipment_spawns[i] SetHintString( hint_string );
169  equipment_spawns[i] setCursorHint( "HINT_NOICON" );
170  equipment_spawns[i] UseTriggerRequireLookAt();
171  equipment_spawns[i] ‪add_to_trigger_list( equipment_spawns[i].equipment );
172  equipment_spawns[i] thread ‪equipment_spawn_think();
173  }
174 }
175 
176 
177 function ‪get_hint( equipment )
178 {
179  Assert( IsDefined( level.zombie_equipment[equipment] ), equipment.name + " was not included or is not registered with the equipment system." );
180 
181  return level.zombie_equipment[equipment].hint;
182 }
183 
184 
185 function ‪get_howto_hint( equipment )
186 {
187  Assert( IsDefined( level.zombie_equipment[equipment] ), equipment.name + " was not included or is not registered with the equipment system." );
188 
189  return level.zombie_equipment[equipment].howto_hint;
190 }
191 
192 function ‪get_icon( equipment )
193 {
194  Assert( IsDefined( level.zombie_equipment[equipment] ), equipment.name + " was not included or is not registered with the equipment system." );
195 
196  return level.zombie_equipment[equipment].hint_icon;
197 }
198 
199 function ‪get_notify_strings( equipment )
200 {
201  Assert( IsDefined( level.zombie_equipment[equipment] ), equipment.name + " was not included or is not registered with the equipment system." );
202 
203  return level.zombie_equipment[equipment].notify_strings;
204 }
205 
206 
207 function ‪add_to_trigger_list( equipment )
208 {
209  Assert( IsDefined( level.zombie_equipment[equipment] ), equipment.name + " was not included or is not registered with the equipment system." );
210 
211  level.zombie_equipment[equipment].triggers[level.zombie_equipment[equipment].triggers.size] = self;
212 
213  // also need to add the model to the models list
214  level.zombie_equipment[equipment].models[level.zombie_equipment[equipment].models.size] = GetEnt( self.target, "targetname" );
215 }
216 
217 
219 {
220  for ( ;; )
221  {
222  self waittill( "trigger", player );
223 
224  if ( player ‪zm_utility::in_revive_trigger() || ‪IS_DRINKING(player.is_drinking) )
225  {
226  wait( 0.1 );
227  continue;
228  }
229 
230  if ( !‪is_limited(self.equipment) || !‪limited_in_use(self.equipment) )
231  {
232  if( ‪is_limited(self.equipment)) //only one player can have limited equipment at a time
233  {
234  player ‪setup_limited(self.equipment);
235 
236  //move the equpiment respawn to a new location
237  if(isDefined(level.hacker_tool_positions))
238  {
239  new_pos = array::random(level.hacker_tool_positions);
240  self.origin = new_pos.trigger_org;
241  model = getent(self.target,"targetname");
242  model.origin = new_pos.model_org;
243  model.angles = new_pos.model_ang;
244  }
245 
246  }
247 
248  player ‪give( self.equipment );
249  }
250  else
251  {
252  wait( 0.1 );
253  }
254  }
255 }
256 
257 function ‪set_equipment_invisibility_to_player( equipment, invisible )
258 {
259  triggers = level.zombie_equipment[equipment].triggers;
260  for ( i = 0; i < triggers.size; i++ )
261  {
262  if(isDefined(triggers[i]))
263  {
264  triggers[i] SetInvisibleToPlayer( self, invisible );
265  }
266  }
267 
268  models = level.zombie_equipment[equipment].models;
269  for ( i = 0; i < models.size; i++ )
270  {
271  if(isDefined(models[i]))
272  {
273  models[i] SetInvisibleToPlayer( self, invisible );
274  }
275  }
276 }
277 
278 function ‪take( equipment )
279 {
280  if ( !isdefined( equipment ) )
281  {
282  equipment = self ‪zm_equipment::get_player_equipment();
283  }
284  if ( !isdefined( equipment ) )
285  {
286  return;
287  }
288  if ( equipment == level.weaponNone )
289  {
290  return;
291  }
292  if ( !self ‪has_player_equipment( equipment ) )
293  {
294  return;
295  }
296  current = false;
297  current_weapon = false;
298  if ( isdefined(self ‪zm_equipment::get_player_equipment()) && equipment == self ‪zm_equipment::get_player_equipment() )
299  {
300  current = true;
301  }
302  if ( equipment == self GetCurrentWeapon() )
303  {
304  current_weapon = true;
305  }
306 
307  notify_strings = ‪get_notify_strings( equipment );
308  if(‪IS_TRUE(self.current_equipment_active[equipment]))
309  {
310  self.current_equipment_active[equipment] = false;
311  self notify( notify_strings.deactivate );
312  }
313 
314  self notify( notify_strings.taken );
315 
316  self TakeWeapon( equipment );
317 
318  if( (!‪is_limited(equipment) ) || (‪is_limited(equipment) && !‪limited_in_use(equipment) ))
319  {
320  self ‪set_equipment_invisibility_to_player( equipment, false );
321  }
322  if (current)
323  {
324  self ‪set_player_equipment( level.weaponNone );
325  self setactionslot( 2, "" );
326  }
327  else
328  {
329  ArrayRemoveValue(self.deployed_equipment, equipment);
330  }
331 
332  if ( current_weapon )
333  {
335  }
336 }
337 
338 function ‪give( equipment )
339 {
340  if( !IsDefined(equipment) )
341  {
342  return;
343  }
344 
345  if (!isdefined(level.zombie_equipment[equipment]))
346  {
347  return;
348  }
349 
350  // skip all this if they already have it
351  if( self ‪has_player_equipment(equipment) )
352  {
353  return;
354  }
355 
356  curr_weapon = self GetCurrentWeapon();
357  curr_weapon_was_curr_equipment = self ‪is_player_equipment( curr_weapon );
358  self ‪take();
359 
360  self ‪set_player_equipment( equipment );
361  self GiveWeapon( equipment );
362  self ‪start_ammo( equipment );
363  self thread ‪show_hint( equipment );
364  self ‪set_equipment_invisibility_to_player( equipment, true );
365  self setactionslot( 2, "weapon", equipment );
366 
367  self thread ‪slot_watcher(equipment);
368 
369  self ‪zm_audio::create_and_play_dialog( "weapon_pickup", level.zombie_equipment[equipment].vox );
370 
371  self notify( "player_given", equipment );
372 }
373 
374 function ‪buy(equipment)
375 {
376  if ( IsString(equipment) )
377  equipment = GetWeapon( equipment );
378 
379  if ( isdefined(self.current_equipment) && equipment != self.current_equipment && self.current_equipment != level.weaponNone )
380  {
381  self ‪take(self.current_equipment);
382  }
383 
384  self notify( "player_bought", equipment );
385 
386  self ‪give( equipment );
387 
388  if ( equipment.isriotshield && isdefined(self.player_shield_reset_health))
389  {
390  self [[self.player_shield_reset_health]]();
391  }
392 }
393 
394 function ‪slot_watcher(equipment)
395 {
396  self notify("kill_equipment_slot_watcher");
397  self endon("kill_equipment_slot_watcher");
398  self endon("disconnect");
399 
400  notify_strings = ‪get_notify_strings( equipment );
401  while(1)
402  {
403  self waittill( "weapon_change", curr_weapon, prev_weapon );
404  if ( self.sessionstate != "spectator" )
405  {
406  self.prev_weapon_before_equipment_change = undefined;
407  if ( isdefined( prev_weapon ) && level.weaponNone != prev_weapon )
408  {
409  prev_weapon_type = prev_weapon.inventoryType;
410  if ( "primary" == prev_weapon_type || "altmode" == prev_weapon_type )
411  {
412  self.prev_weapon_before_equipment_change = prev_weapon;
413  }
414  }
415 
416  ‪DEFAULT(level.a_func_equipment_slot_watcher_override,[]);
417  if( isdefined( level.a_func_equipment_slot_watcher_override[ equipment.name ] ) )
418  {
419  self [[ level.a_func_equipment_slot_watcher_override[ equipment.name ] ]]( equipment, curr_weapon, prev_weapon, notify_strings );
420  }
421  else
422  {
423  if ( curr_weapon == equipment && !self.current_equipment_active[equipment] )
424  {
425  self notify( notify_strings.activate );
426  self.current_equipment_active[equipment] = true;
427  }
428  else if ( curr_weapon != equipment && self.current_equipment_active[equipment] )
429  {
430  self notify( notify_strings.deactivate );
431  self.current_equipment_active[equipment] = false;
432  }
433  }
434  }
435  }
436 }
437 
438 function ‪is_limited(equipment)
439 {
440  if(isDefined(level._limited_equipment))
441  {
442  for(i=0;i<level._limited_equipment.size;i++)
443  {
444  if(level._limited_equipment[i] == equipment)
445  {
446  return true;
447  }
448  }
449 
450  }
451  return false;
452 }
453 
454 function ‪limited_in_use(equipment)
455 {
456  players = GetPlayers();
457  for(i=0;i<players.size;i++)
458  {
459  current_equipment = players[i] ‪zm_equipment::get_player_equipment();
460  if(isDefined(current_equipment) && current_equipment == equipment)
461  {
462  return true;
463  }
464  }
465 
466  if ( isdefined(level.dropped_equipment) && isdefined(level.dropped_equipment[equipment]))
467  {
468  return true;
469  }
470 
471  return false;
472 }
473 
474 function ‪setup_limited(equipment)
475 {
476  players = GetPlayers();
477  for(i=0;i<players.size;i++)
478  {
479  players[i] ‪set_equipment_invisibility_to_player( equipment, true );
480  }
481 
482  self thread ‪release_limited_on_disconnect(equipment);
483  self thread ‪release_limited_on_taken(equipment);
484 }
485 
486 function ‪release_limited_on_taken(equipment)
487 {
488  self endon("disconnect");
489 
490  notify_strings = ‪get_notify_strings( equipment );
491  self ‪util::waittill_either( notify_strings.taken, "spawned_spectator" );
492 
493  players = GetPlayers();
494  for(i=0;i<players.size;i++)
495  {
496 
497  players[i] ‪set_equipment_invisibility_to_player( equipment, false );
498  }
499 }
500 
502 {
503  notify_strings = ‪get_notify_strings( equipment );
504  self endon( notify_strings.taken );
505 
506  self waittill("disconnect");
507 
508  players = GetPlayers();
509  for(i=0;i<players.size;i++)
510  {
511  if(isAlive(players[i]))
512  {
513  players[i] ‪set_equipment_invisibility_to_player( equipment, false );
514  }
515  }
516 }
517 
518 function ‪is_active(equipment)
519 {
520  if(!IsDefined(self.current_equipment_active) || !IsDefined(self.current_equipment_active[equipment]))
521  {
522  return false;
523  }
524 
525  return(self.current_equipment_active[equipment]);
526 }
527 
528 function ‪init_hint_hudelem(x, y, alignX, alignY, fontscale, alpha)
529 {
530  self.x = x;
531  self.y = y;
532  self.alignX = alignX;
533  self.alignY = alignY;
534  self.fontScale = fontScale;
535  self.alpha = alpha;
536  self.sort = 20;
537  //self.font = "objective";
538 }
539 
540 function ‪setup_client_hintelem( ypos = 220, font_scale = 1.25 )
541 {
542  self endon("death");
543  self endon("disconnect");
544 
545  if(!isDefined(self.hintelem))
546  {
547  self.hintelem = newclienthudelem(self);
548  }
549 
550  if( self IsSplitScreen() )
551  {
552  if ( GetDvarInt( "splitscreen_playerCount" ) >= 3 )
553  {
554  // 3 & 4 player : smaller screen - normal aspect ratio
555  self.hintelem ‪init_hint_hudelem( 160, 90, "center", "middle", font_scale * 0.8, 1.0 );
556  }
557  else
558  {
559  // 2 player : short wide screen
560  self.hintelem ‪init_hint_hudelem( 160, 90, "center", "middle", font_scale, 1.0 );
561  }
562  }
563  else
564  {
565  self.hintelem ‪init_hint_hudelem(320, ypos, "center", "bottom", font_scale, 1.0);
566  }
567 }
568 
569 function ‪show_hint( equipment )
570 {
571  self notify("kill_previous_show_equipment_hint_thread");
572  self endon("kill_previous_show_equipment_hint_thread");
573  self endon("death");
574  self endon("disconnect");
575 
576  if ( ‪IS_TRUE( self.do_not_display_equipment_pickup_hint ) )
577  {
578  return;
579  }
580 
581  wait(.5);
582 
583  text = ‪get_howto_hint( equipment );
584  self ‪show_hint_text( text );
585 }
586 
587 function ‪show_hint_text( text, show_for_time = 3.20, font_scale = 1.25, ypos = 220 )
588 {
589  // T7todo - move this and similar HUD stuff into a separate file
590 
591  self notify("hide_equipment_hint_text");
593  self ‪setup_client_hintelem( ypos, font_scale );
594  self.hintelem setText(text);
595  self.hintelem.alpha = 1;
596  self.hintelem.font = "small";
597  self.hintelem.hidewheninmenu = true;
598  time = self ‪util::waittill_any_timeout(show_for_time, "hide_equipment_hint_text", "death", "disconnect" );
599  if (isdefined(time) && IsDefined(self) && IsDefined(self.hintelem) )
600  {
601  self.hintelem FadeOverTime( 0.25 );
602  self.hintelem.alpha = 0;
603  self ‪util::waittill_any_timeout(0.25, "hide_equipment_hint_text" );
604  }
605  if ( IsDefined(self) && IsDefined(self.hintelem) )
606  {
607  self.hintelem settext("");
608  self.hintelem ‪destroy();
609  }
610 }
611 
612 
613 
614 //=============================================================================
615 // AMMO
616 
617 function ‪start_ammo( equipment )
618 {
619  if (self HasWeapon(equipment))
620  {
621  maxammo = 1;
622  if ( ‪IS_TRUE( level.zombie_equipment[equipment].notake ) )
623  {
624  maxammo = level.zombie_equipment[equipment].start_ammo;
625  }
626  self setWeaponAmmoClip( equipment, maxammo );
627  self notify("equipment_ammo_changed", equipment);
628  return maxammo;
629  }
630  return 0;
631 }
632 
633 
634 function ‪change_ammo( equipment, ‪change )
635 {
636  if (self HasWeapon(equipment))
637  {
638  oldammo = self getWeaponAmmoClip( equipment );
639  maxammo = 1;
640  if ( ‪IS_TRUE( level.zombie_equipment[equipment].notake ) )
641  {
642  maxammo = level.zombie_equipment[equipment].start_ammo;
643  }
644  newammo = int( min(maxammo, max(0, oldammo + ‪change ) ) );
645  self setWeaponAmmoClip( equipment, newammo );
646  self notify("equipment_ammo_changed", equipment);
647  return newammo;
648  }
649  return 0;
650 }
651 
652 //=============================================================================
653 // FX
654 
655 function ‪disappear_fx( origin, fx, angles )
656 {
657  effect = level._equipment_disappear_fx;
658  if(isDefined(fx))
659  {
660  effect = fx;
661  }
662 
663  if ( IsDefined( angles ) )
664  {
665  PlayFX( effect, origin, AnglesToForward( angles ) );
666  }
667  else
668  {
669  PlayFX( effect, origin );
670  }
671  wait 1.1;
672 }
673 
674 //==============================================================================
675 function ‪register_for_level( weaponname )
676 {
677  weapon = GetWeapon( weaponname );
678  if ( ‪is_equipment( weapon ) )
679  {
680  return;
681  }
682 
683  if ( !isdefined( level.zombie_equipment_list ) )
684  {
685  level.zombie_equipment_list = [];
686  }
687 
688  level.zombie_equipment_list[weapon] = weapon;
689 }
690 
691 function ‪is_equipment( weapon )
692 {
693  if ( !isdefined( weapon ) || !isdefined( level.zombie_equipment_list ) )
694  {
695  return false;
696  }
697 
698  return isdefined(level.zombie_equipment_list[weapon]);
699 }
700 
702 {
703  return ‪is_equipment(weapon);
704 }
705 
706 function ‪is_player_equipment( weapon )
707 {
708  if ( !isdefined( weapon ) || !isdefined( self.current_equipment ) )
709  {
710  return false;
711  }
712 
713  return self.current_equipment == weapon;
714 }
715 
716 function ‪has_deployed_equipment( weapon )
717 {
718  if ( !isdefined( weapon ) || !isdefined( self.deployed_equipment ) || self.deployed_equipment.size < 1 )
719  {
720  return false;
721  }
722 
723  for ( i = 0; i < self.deployed_equipment.size; i++ )
724  {
725  if ( self.deployed_equipment[i] == weapon )
726  return true;
727  }
728  return false;
729 }
730 
731 function ‪has_player_equipment( weapon )
732 {
733  return ( self ‪is_player_equipment( weapon ) || self ‪has_deployed_equipment( weapon ) );
734 }
735 
737 {
738  equipment = level.weaponNone;
739 
740  if(IsDefined(self.current_equipment))
741  {
742  equipment = self.current_equipment;
743  }
744 
745  return equipment;
746 }
747 
749 {
750  return(self ‪is_active( GetWeapon( "equip_hacker" ) ));
751 }
752 
753 function ‪set_player_equipment( weapon )
754 {
755  if(!IsDefined(self.current_equipment_active))
756  {
757  self.current_equipment_active = [];
758  }
759 
760  if(IsDefined(weapon))
761  {
762  self.current_equipment_active[weapon] = false;
763  }
764 
765  if(!IsDefined(self.equipment_got_in_round))
766  {
767  self.equipment_got_in_round = [];
768  }
769 
770  if(IsDefined(weapon))
771  {
772  self.equipment_got_in_round[weapon] = level.round_number;
773  }
774 
775  self notify( "new_equipment", weapon );
776  self.current_equipment = weapon;
777 }
778 
780 {
781  self ‪set_player_equipment( level.zombie_equipment_player_init );
782 }
783 
784 
785 
786 
787 
‪show_hint
‪function show_hint(equipment)
Definition: _zm_equipment.gsc:569
‪is_equipment
‪function is_equipment(weapon)
Definition: _zm_equipment.gsc:691
‪register_slot_watcher_override
‪function register_slot_watcher_override(str_equipment, func_slot_watcher_override)
Definition: _zm_equipment.gsc:100
‪init_upgrade
‪function init_upgrade()
Definition: _zm_equipment.gsc:158
‪release_limited_on_taken
‪function release_limited_on_taken(equipment)
Definition: _zm_equipment.gsc:486
‪is_active
‪function is_active(equipment)
Definition: _zm_equipment.gsc:518
‪limit
‪function limit(equipment_name, limited)
Definition: _zm_equipment.gsc:140
‪get_hint
‪function get_hint(equipment)
Definition: _zm_equipment.gsc:177
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪init_player_equipment
‪function init_player_equipment()
Definition: _zm_equipment.gsc:779
‪waittill_either
‪function waittill_either(msg1, msg2)
Definition: util_shared.gsc:303
‪get_notify_strings
‪function get_notify_strings(equipment)
Definition: _zm_equipment.gsc:199
‪hacker_active
‪function hacker_active()
Definition: _zm_equipment.gsc:748
‪signal_activated
‪function signal_activated(val=1)
Definition: _zm_equipment.gsc:54
‪waittill_any_timeout
‪function waittill_any_timeout(n_timeout, string1, string2, string3, string4, string5)
Definition: util_shared.csc:423
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪CLIENTFIELD_BUILDABLE_PIECE_COUNT
‪#define CLIENTFIELD_BUILDABLE_PIECE_COUNT
Definition: _zm_buildables.gsh:58
‪buy
‪function buy(equipment)
Definition: _zm_equipment.gsc:374
‪change_ammo
‪function change_ammo(equipment, change)
Definition: _zm_equipment.gsc:634
‪switch_back_primary_weapon
‪function switch_back_primary_weapon(oldprimary, immediate=false)
Definition: _zm_weapons.gsc:280
‪setup_client_hintelem
‪function setup_client_hintelem(ypos=220, font_scale=1.25)
Definition: _zm_equipment.gsc:540
‪set_equipment_invisibility_to_player
‪function set_equipment_invisibility_to_player(equipment, invisible)
Definition: _zm_equipment.gsc:257
‪DEFAULT
‪#define DEFAULT(__var, __default)
Definition: shared.gsh:270
‪slot_watcher
‪function slot_watcher(equipment)
Definition: _zm_equipment.gsc:394
‪set_player_equipment
‪function set_player_equipment(weapon)
Definition: _zm_equipment.gsc:753
‪setup_limited
‪function setup_limited(equipment)
Definition: _zm_equipment.gsc:474
‪wait_network_frame
‪function wait_network_frame(n_count=1)
Definition: util_shared.gsc:64
‪give
‪function give(equipment)
Definition: _zm_equipment.gsc:338
‪REGISTER_SYSTEM_EX
‪#define REGISTER_SYSTEM_EX(__sys, __func_init_preload, __func_init_postload, __reqs)
Definition: shared.gsh:209
‪get_icon
‪function get_icon(equipment)
Definition: _zm_equipment.gsc:192
‪init_hint_hudelem
‪function init_hint_hudelem(x, y, alignX, alignY, fontscale, alpha)
Definition: _zm_equipment.gsc:528
‪is_equipment_that_blocks_purchase
‪function is_equipment_that_blocks_purchase(weapon)
Definition: _zm_equipment.gsc:701
‪release_limited_on_disconnect
‪function release_limited_on_disconnect(equipment)
Definition: _zm_equipment.gsc:501
‪take
‪function take(equipment)
Definition: _zm_equipment.gsc:278
‪is_player_equipment
‪function is_player_equipment(weapon)
Definition: _zm_equipment.gsc:706
‪show_hint_text
‪function show_hint_text(text, show_for_time=3.20, font_scale=1.25, ypos=220)
Definition: _zm_equipment.gsc:587
‪add_to_trigger_list
‪function add_to_trigger_list(equipment)
Definition: _zm_equipment.gsc:207
‪equipment_spawn_think
‪function equipment_spawn_think()
Definition: _zm_equipment.gsc:218
‪has_player_equipment
‪function has_player_equipment(weapon)
Definition: _zm_equipment.gsc:731
‪is_limited
‪function is_limited(equipment)
Definition: _zm_equipment.gsc:438
‪__init__
‪function __init__()
Definition: _zm_equipment.gsc:35
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪include
‪function include(equipment_name)
Definition: _zm_equipment.gsc:121
‪change
‪function change(team)
Definition: _teams.gsc:258
‪set_ammo_driven
‪function set_ammo_driven(equipment_name, start, refill_max_ammo=false)
Definition: _zm_equipment.gsc:132
‪destroy
‪function destroy(watcher, owner)
Definition: _decoy.gsc:108
‪register
‪function register(equipment_name, hint, howto_hint, hint_icon, equipmentVO)
Definition: _zm_equipment.gsc:72
‪register_for_level
‪function register_for_level(weaponname)
Definition: _zm_equipment.gsc:675
‪create_and_play_dialog
‪function create_and_play_dialog(category, subcategory, force_variant)
Definition: _zm_audio.gsc:603
‪in_revive_trigger
‪function in_revive_trigger()
Definition: _zm_utility.gsc:1684
‪has_deployed_equipment
‪function has_deployed_equipment(weapon)
Definition: _zm_equipment.gsc:716
‪__main__
‪function __main__()
Definition: _zm_equipment.gsc:49
‪is_included
‪function is_included(equipment)
Definition: _zm_equipment.gsc:105
‪IS_DRINKING
‪#define IS_DRINKING(_is_drinking)
Definition: _zm_utility.gsh:1
‪get_howto_hint
‪function get_howto_hint(equipment)
Definition: _zm_equipment.gsc:185
‪get_player_equipment
‪function get_player_equipment()
Definition: _zm_equipment.gsc:736
‪disappear_fx
‪function disappear_fx(origin, fx, angles)
Definition: _zm_equipment.gsc:655
‪start_ammo
‪function start_ammo(equipment)
Definition: _zm_equipment.gsc:617
‪limited_in_use
‪function limited_in_use(equipment)
Definition: _zm_equipment.gsc:454
‪WAIT_SERVER_FRAME
‪#define WAIT_SERVER_FRAME
Definition: shared.gsh:265