58 RegisterNetSyncVariableInt(
"m_RAIB.m_PairDeviceNetIdLow");
59 RegisterNetSyncVariableInt(
"m_RAIB.m_PairDeviceNetIdHigh");
72 super.OnVariablesSynchronized();
76 m_RAIB.OnVariableSynchronized();
84 super.EEItemLocationChanged(oldLoc, newLoc);
129 if (
m_RAIB.IsPaired() && !IsRuined())
134 device.OnActivatedByItem(
this);
152 return m_RAIB.GetPairDevice();
157 string type =
"RemoteDetonatorTrigger";
162 ItemBase inHandsItem = player.GetItemInHands();
167 ReplaceDetonatorItemOnArmLambda onArmLambda =
new ReplaceDetonatorItemOnArmLambda(inHandsItem, type);
168 onArmLambda.SetPairDevice(deviceToPair);
169 MiscGameplayFunctions.TurnItemIntoItemEx(player, onArmLambda);
174 MiscGameplayFunctions.TurnItemIntoItemEx(player, lambda);
184 if (player.GetItemInHands())
185 player.GetItemAccessor().OnItemInHandsChanged();
217 debug_output +=
string.
Format(
"low net id: %1\n",
m_RAIB.GetPairDeviceNetIdLow());
218 debug_output +=
string.
Format(
"high net id: %1\n",
m_RAIB.GetPairDeviceNetIdHigh());
219 debug_output +=
string.
Format(
"pair device: %1\n",
m_RAIB.GetPairDevice());
232 override bool IsKit()
244 super.EEKilled(killer);
262 super.CopyOldPropertiesToNew(old_item, new_item);
264 MiscGameplayFunctions.TransferItemProperties(old_item, new_item);
274 m_PairDevice = device;
279 super.OnSuccess(new_item);
281 RemoteDetonator detonator = RemoteDetonator.Cast(new_item);
287 ItemBase receiver =
ItemBase.Cast(explosive.GetInventory().CreateAttachment(
"RemoteDetonatorReceiver"));
290 MiscGameplayFunctions.TransferItemProperties(detonator, receiver);
291 receiver.LockToParent();
292 explosive.SetTakeable(
false);
293 explosive.PairWithDevice(detonator);
305 explosive.LockTriggerSlots();
306 explosive.SetTakeable(
true);
315 super.OnSuccess(new_item);
317 RemoteDetonator detonator = RemoteDetonator.Cast(
m_OldItem);
320 if (detonator.GetRemotelyActivatedItemBehaviour())
335 RemoteDetonator detonator = RemoteDetonator.Cast(
m_OldItem);
338 if (detonator.GetRemotelyActivatedItemBehaviour())
343 explosive.LockExplosivesSlots();
ActionAttachExplosivesTriggerCB ActionContinuousBaseCB ActionAttachExplosivesTrigger()
ActionDisarmExplosiveWithRemoteDetonatorCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonator()
ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonatorUnpaired()
void AddAction(typename actionName)
void RemoveAction(typename actionName)
class EconomyOutputStrings OFF
override void EEKilled(Object killer)
const string COLOR_LED_OFF
void UpdateLED(string selection, string color)
void UpdateLED(ERemoteDetonatorLEDState pState, bool pForced=false)
RemoteDetonatorTrigger RemoteDetonator RemoteDetonatorReceiver()
ERemoteDetonatorLEDState m_LastLEDState
const string COLOR_LED_LIT
override void OnWasDetached(EntityAI parent, int slot_id)
ref RemotelyActivatedItemBehaviour m_RAIB
const string SELECTION_NAME_LED
ReplaceDetonatorItemLambda ReplaceItemWithNewLambdaBase SetPairDevice(EntityAI device)
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
override void SetActions()
EntityAI GetControlledDevice()
static RemoteDetonatorTrigger SpawnInPlayerHands(notnull EntityAI pEntity, EntityAI deviceToPair=null)
override void OnActivatedByItem(notnull ItemBase item)
override RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
void SetControlledDevice(EntityAI pDevice)
override void OnCEUpdate()
override void OnAnimationPhaseStarted(string animSource, float phase)
override void UnpairRemote()
const string ANIM_PHASE_TRIGGER
void RemoteDetonatorTrigger()
ref RemotelyActivatedItemBehaviour m_RAIB
override void PairRemote(notnull EntityAI trigger)
override void OnVariablesSynchronized()
override void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
override void OnSuccess(EntityAI new_item)
void ReplaceItemWithNewLambdaBase(EntityAI old_item, string new_item_type)
void OnAbort()
Step Out - notification on abort.
void OnSuccess(EntityAI new_item)
Step H. - notification on finish.
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.
class JsonUndergroundAreaTriggerData GetPosition
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.