58 RegisterNetSyncVariableInt(
"m_RAIB.m_PairDeviceNetIdLow");
59 RegisterNetSyncVariableInt(
"m_RAIB.m_PairDeviceNetIdHigh");
72 super.OnVariablesSynchronized();
84 super.EEItemLocationChanged(oldLoc, newLoc);
134 device.OnActivatedByItem(
this);
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();
232 override bool IsKit()
244 super.EEKilled(killer);
260 override void CopyOldPropertiesToNew(notnull
EntityAI old_item,
EntityAI 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);
284 ExplosivesBase explosive = ExplosivesBase.Cast(m_PairDevice);
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);
302 ExplosivesBase explosive = ExplosivesBase.Cast(m_PairDevice);
305 explosive.LockTriggerSlots();
306 explosive.SetTakeable(
true);
313 override void OnSuccess(
EntityAI new_item)
315 super.OnSuccess(new_item);
317 RemoteDetonator detonator = RemoteDetonator.Cast(m_OldItem);
320 if (detonator.GetRemotelyActivatedItemBehaviour())
322 ExplosivesBase explosive = ExplosivesBase.Cast(detonator.GetRemotelyActivatedItemBehaviour().GetPairDevice());
331 override void OnAbort()
335 RemoteDetonator detonator = RemoteDetonator.Cast(m_OldItem);
338 if (detonator.GetRemotelyActivatedItemBehaviour())
340 ExplosivesBase explosive = ExplosivesBase.Cast(detonator.GetRemotelyActivatedItemBehaviour().GetPairDevice());
343 explosive.LockExplosivesSlots();
ActionAttachExplosivesTriggerCB ActionContinuousBaseCB ActionAttachExplosivesTrigger()
ActionDisarmExplosiveWithRemoteDetonatorCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonator()
ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonatorUnpaired()
void AddAction(typename actionName)
void RemoveAction(typename actionName)
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()
void OnVariableSynchronized()
int GetPairDeviceNetIdHigh()
int GetPairDeviceNetIdLow()
base class for transformation operations (creating one item from another)
void OnAbort()
Step Out - notification on abort.
void OnSuccess(EntityAI new_item)
Step H. - notification on finish.
void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
Step E. copy properties from old object to the created one.
override void EEKilled(Object killer)
proto native CGame GetGame()
class JsonUndergroundAreaTriggerData GetPosition
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)
const string SELECTION_NAME_LED
ReplaceDetonatorItemLambda ReplaceItemWithNewLambdaBase SetPairDevice(EntityAI device)