‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_gadget_unstoppable_force.gsc
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\flagsys_shared;
6 #using scripts\shared\spawner_shared;
7 #using scripts\shared\util_shared;
8 
9 #using scripts\shared\abilities\_ability_player;
10 #using scripts\shared\abilities\_ability_util;
11 
12 #insert scripts\shared\shared.gsh;
13 #insert scripts\shared\version.gsh;
14 #insert scripts\shared\abilities\_ability_util.gsh;
15 
16 #using scripts\shared\system_shared;
17 
18 ‪REGISTER_SYSTEM( "gadget_unstoppable_force", &‪__init__, undefined )
19 
20 function ‪__init__()
21 {
27 
29 
30  ‪clientfield::register( "toplayer", "unstoppableforce_state", ‪VERSION_SHIP, 1, "int");
31 }
32 
34 {
35  // returns true when the gadget is on
36  return self ‪flagsys::get( "gadget_unstoppable_force_on" );
37 }
38 
40 {
41  if(isDefined(level.cybercom) && isDefined(level.cybercom.unstoppable_force))
42  {
43  return self [[level.cybercom.unstoppable_force._is_flickering]](slot);
44  }
45  return false;
46 }
47 
48 
50 {
51  if(isDefined(level.cybercom) && isDefined(level.cybercom.unstoppable_force))
52  {
53  self [[level.cybercom.unstoppable_force._on_flicker]](slot, weapon);
54  }
55 }
56 
57 function ‪gadget_unstoppable_force_on_give( slot, weapon )
58 {
59  if(isDefined(level.cybercom) && isDefined(level.cybercom.unstoppable_force))
60  {
61  self [[level.cybercom.unstoppable_force._on_give]](slot, weapon);
62  }
63 }
64 
65 function ‪gadget_unstoppable_force_on_take( slot, weapon )
66 {
67  if(isDefined(level.cybercom) && isDefined(level.cybercom.unstoppable_force))
68  {
69  self [[level.cybercom.unstoppable_force._on_take]](slot, weapon);
70  }
71 }
72 
73 //self is the player
75 {
76  if(isDefined(level.cybercom) && isDefined(level.cybercom.unstoppable_force))
77  {
78  self [[level.cybercom.unstoppable_force._on_connect]]();
79  }
80 }
81 
82 function ‪gadget_unstoppable_force_on( slot, weapon )
83 {
84  // excecutes when the gadget is turned on
85  self ‪flagsys::set( "gadget_unstoppable_force_on" );
86  if(isDefined(level.cybercom) && isDefined(level.cybercom.unstoppable_force))
87  {
88  self [[level.cybercom.unstoppable_force._on]](slot, weapon);
89  }
90 }
91 
92 function ‪gadget_unstoppable_force_off( slot, weapon )
93 {
94  // excecutes when the gadget is turned off`
95  self ‪flagsys::clear( "gadget_unstoppable_force_on" );
96  if(isDefined(level.cybercom) && isDefined(level.cybercom.unstoppable_force))
97  {
98  self [[level.cybercom.unstoppable_force._off]](slot, weapon);
99  }
100 }
101 
102 function ‪gadget_firefly_is_primed( slot, weapon )
103 {
104  // excecutes when the gadget is turned off`
105  if(isDefined(level.cybercom) && isDefined(level.cybercom.unstoppable_force))
106  {
107  self [[level.cybercom.unstoppable_force._is_primed]](slot, weapon);
108  }
109 }
‪register_gadget_is_flickering_callbacks
‪function register_gadget_is_flickering_callbacks(type, flickering_func)
Definition: _ability_player.gsc:299
‪register_gadget_possession_callbacks
‪function register_gadget_possession_callbacks(type, on_give, on_take)
Definition: _ability_player.gsc:221
‪clear
‪function clear(str_flag)
Definition: flag_shared.csc:130
‪gadget_unstoppable_force_off
‪function gadget_unstoppable_force_off(slot, weapon)
Definition: _gadget_unstoppable_force.gsc:92
‪register_gadget_is_inuse_callbacks
‪function register_gadget_is_inuse_callbacks(type, inuse_func)
Definition: _ability_player.gsc:289
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪gadget_unstoppable_force_on_give
‪function gadget_unstoppable_force_on_give(slot, weapon)
Definition: _gadget_unstoppable_force.gsc:57
‪get
‪function get(kvp_value, kvp_key="targetname")
Definition: struct.csc:13
‪register_gadget_flicker_callbacks
‪function register_gadget_flicker_callbacks(type, on_flicker)
Definition: _ability_player.gsc:253
‪GADGET_TYPE_UNSTOPPABLE_FORCE
‪#define GADGET_TYPE_UNSTOPPABLE_FORCE
Definition: _ability_util.gsh:34
‪gadget_unstoppable_force_on_flicker
‪function gadget_unstoppable_force_on_flicker(slot, weapon)
Definition: _gadget_unstoppable_force.gsc:49
‪register_gadget_activation_callbacks
‪function register_gadget_activation_callbacks(type, turn_on, turn_off)
Definition: _ability_player.gsc:237
‪REGISTER_SYSTEM
‪#define REGISTER_SYSTEM(__sys, __func_init_preload, __reqs)
Definition: shared.gsh:204
‪gadget_unstoppable_force_is_inuse
‪function gadget_unstoppable_force_is_inuse(slot)
Definition: _gadget_unstoppable_force.gsc:33
‪gadget_unstoppable_force_on_connect
‪function gadget_unstoppable_force_on_connect()
Definition: _gadget_unstoppable_force.gsc:74
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪gadget_firefly_is_primed
‪function gadget_firefly_is_primed(slot, weapon)
Definition: _gadget_unstoppable_force.gsc:102
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪gadget_unstoppable_force_is_flickering
‪function gadget_unstoppable_force_is_flickering(slot)
Definition: _gadget_unstoppable_force.gsc:39
‪on_connect
‪function on_connect()
Definition: _arena.gsc:20
‪__init__
‪function __init__()
Definition: _gadget_unstoppable_force.gsc:20
‪gadget_unstoppable_force_on
‪function gadget_unstoppable_force_on(slot, weapon)
Definition: _gadget_unstoppable_force.gsc:82
‪gadget_unstoppable_force_on_take
‪function gadget_unstoppable_force_on_take(slot, weapon)
Definition: _gadget_unstoppable_force.gsc:65