DayZ 1.24
Loading...
Searching...
No Matches
RemoteDetonatorTrigger Class Reference
Inheritance diagram for RemoteDetonatorTrigger:
[legend]
Collaboration diagram for RemoteDetonatorTrigger:
[legend]

Protected Member Functions

void RemoteDetonatorTrigger ()
 
override bool IsKit ()
 
override void OnVariablesSynchronized ()
 
override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
override RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour ()
 
override void OnCEUpdate ()
 
override void PairRemote (notnull EntityAI trigger)
 
override void UnpairRemote ()
 
override void OnActivatedByItem (notnull ItemBase item)
 
void SetControlledDevice (EntityAI pDevice)
 
bool IsConnected ()
 
EntityAI GetControlledDevice ()
 
override void OnAnimationPhaseStarted (string animSource, float phase)
 
override void SetActions ()
 

Static Protected Member Functions

static RemoteDetonatorTrigger SpawnInPlayerHands (notnull EntityAI pEntity, EntityAI deviceToPair=null)
 

Protected Attributes

const string ANIM_PHASE_TRIGGER = "trigger"
 
bool m_LED
 
ref RemotelyActivatedItemBehaviour m_RAIB
 

Detailed Description

Definition at line 46 of file RemoteDetonator.c.

Constructor & Destructor Documentation

◆ RemoteDetonatorTrigger()

void RemoteDetonatorTrigger::RemoteDetonatorTrigger ( )
inlineprotected

Definition at line 53 of file RemoteDetonator.c.

54 {
56 m_RAIB.SetTrigger();
57
58 RegisterNetSyncVariableInt("m_RAIB.m_PairDeviceNetIdLow");
59 RegisterNetSyncVariableInt("m_RAIB.m_PairDeviceNetIdHigh");
60 RegisterNetSyncVariableInt("m_LastLEDState", 0, EnumTools.GetEnumSize(ERemoteDetonatorLEDState));
61
63 }
void UpdateLED(ERemoteDetonatorLEDState pState, bool pForced=false)
ERemoteDetonatorLEDState m_LastLEDState
ERemoteDetonatorLEDState
static int GetEnumSize(typename e)
Return amount of values in enum.
Definition EnConvert.c:620
ref RemotelyActivatedItemBehaviour m_RAIB

References EnumTools::GetEnumSize(), m_LastLEDState, m_RAIB, and UpdateLED().

Member Function Documentation

◆ EEItemLocationChanged()

override void RemoteDetonatorTrigger::EEItemLocationChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprotected

Definition at line 80 of file RemoteDetonator.c.

81 {
82 super.EEItemLocationChanged(oldLoc, newLoc);
83
84 if (m_RAIB)
85 m_RAIB.Pair();
86 }

References m_RAIB.

◆ GetControlledDevice()

EntityAI RemoteDetonatorTrigger::GetControlledDevice ( )
inlineprotected

Definition at line 144 of file RemoteDetonator.c.

145 {
146 return m_RAIB.GetPairDevice();
147 }

References m_RAIB.

Referenced by OnActivatedByItem(), and OnCEUpdate().

◆ GetRemotelyActivatedItemBehaviour()

override RemotelyActivatedItemBehaviour RemoteDetonatorTrigger::GetRemotelyActivatedItemBehaviour ( )
inlineprotected

Definition at line 88 of file RemoteDetonator.c.

89 {
90 return m_RAIB;
91 }

References m_RAIB.

◆ IsConnected()

bool RemoteDetonatorTrigger::IsConnected ( )
inlineprotected

Definition at line 139 of file RemoteDetonator.c.

140 {
141 return m_RAIB.IsPaired();
142 }

References m_RAIB.

Referenced by OnCEUpdate().

◆ IsKit()

override bool RemoteDetonatorTrigger::IsKit ( )
inlineprotected

Definition at line 65 of file RemoteDetonator.c.

66 {
67 return false;
68 }

◆ OnActivatedByItem()

override void RemoteDetonatorTrigger::OnActivatedByItem ( notnull ItemBase item)
inlineprotected

Definition at line 121 of file RemoteDetonator.c.

122 {
123 if (GetGame().IsServer())
124 {
125 if (m_RAIB.IsPaired() && !IsRuined())
126 {
129 device.OnActivatedByItem(this);
130 }
131 }
132 }
class JsonUndergroundAreaTriggerData GetPosition
Definition EnMath.c:7
const float EXPLOSIVE_REMOTE_ACTIVATION
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
proto native CGame GetGame()
static proto float SqrFloat(float f)
Returns squared value.

References vector::DistanceSq(), UAMaxDistances::EXPLOSIVE_REMOTE_ACTIVATION, GetControlledDevice(), GetGame(), GetPosition, m_RAIB, and Math::SqrFloat().

◆ OnAnimationPhaseStarted()

override void RemoteDetonatorTrigger::OnAnimationPhaseStarted ( string animSource,
float phase )
inlineprotected

Definition at line 185 of file RemoteDetonator.c.

186 {
188 {
189 if (phase > 0.01)
191 }
192 }
const string ANIM_PHASE_TRIGGER

References ANIM_PHASE_TRIGGER, and UpdateLED().

◆ OnCEUpdate()

override void RemoteDetonatorTrigger::OnCEUpdate ( )
inlineprotected

◆ OnVariablesSynchronized()

override void RemoteDetonatorTrigger::OnVariablesSynchronized ( )
inlineprotected

Definition at line 70 of file RemoteDetonator.c.

71 {
72 super.OnVariablesSynchronized();
73
74 if (m_RAIB)
75 m_RAIB.OnVariableSynchronized();
76
78 }

References m_LastLEDState, m_RAIB, and UpdateLED().

◆ PairRemote()

override void RemoteDetonatorTrigger::PairRemote ( notnull EntityAI trigger)
inlineprotected

Definition at line 110 of file RemoteDetonator.c.

111 {
112 m_RAIB.Pair(trigger);
113 }

References m_RAIB.

◆ SetActions()

override void RemoteDetonatorTrigger::SetActions ( )
inlineprotected

Definition at line 194 of file RemoteDetonator.c.

195 {
196 super.SetActions();
197
199
203 }
ActionAttachExplosivesTriggerCB ActionContinuousBaseCB ActionAttachExplosivesTrigger()
ActionDisarmExplosiveWithRemoteDetonatorCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonator()
void AddAction(typename actionName)
void RemoveAction(typename actionName)

References ActionAttachExplosivesTrigger(), ActionDisarmExplosiveWithRemoteDetonator(), AddAction(), and RemoveAction().

◆ SetControlledDevice()

void RemoteDetonatorTrigger::SetControlledDevice ( EntityAI pDevice)
inlineprotected

Definition at line 134 of file RemoteDetonator.c.

135 {
136 m_RAIB.Pair(pDevice);
137 }

References m_RAIB.

◆ SpawnInPlayerHands()

static RemoteDetonatorTrigger RemoteDetonatorTrigger::SpawnInPlayerHands ( notnull EntityAI pEntity,
EntityAI deviceToPair = null )
inlinestaticprotected

item replaced, use different IK

Definition at line 149 of file RemoteDetonator.c.

150 {
151 string type = "RemoteDetonatorTrigger";
154 if (player)
155 {
156 ItemBase inHandsItem = player.GetItemInHands();
157 if (inHandsItem)
158 {
159 if (deviceToPair)
160 {
162 onArmLambda.SetPairDevice(deviceToPair);
163 MiscGameplayFunctions.TurnItemIntoItemEx(player, onArmLambda);
164 }
165 else
166 {
168 MiscGameplayFunctions.TurnItemIntoItemEx(player, lambda);
169 }
170
171
172 rdt = RemoteDetonatorTrigger.Cast(player.GetItemInHands());
173 }
174 else
175 rdt = RemoteDetonatorTrigger.Cast(player.GetHumanInventory().CreateInHands(type));
176
178 if (player.GetItemInHands())
179 player.GetItemAccessor().OnItemInHandsChanged();
180 }
181
182 return rdt;
183 }

Referenced by CreateRemoteDetonatorReceiverAsAttachment(), and ClaymoreMine::OnPlacementComplete().

◆ UnpairRemote()

override void RemoteDetonatorTrigger::UnpairRemote ( )
inlineprotected

Definition at line 115 of file RemoteDetonator.c.

116 {
118 m_RAIB.Unpair();
119 }

References m_RAIB, and UpdateLED().

Member Data Documentation

◆ ANIM_PHASE_TRIGGER

const string RemoteDetonatorTrigger::ANIM_PHASE_TRIGGER = "trigger"
protected

Definition at line 48 of file RemoteDetonator.c.

Referenced by OnAnimationPhaseStarted().

◆ m_LED

bool RemoteDetonatorTrigger::m_LED
protected

Definition at line 50 of file RemoteDetonator.c.

◆ m_RAIB


The documentation for this class was generated from the following file: