38 RegisterNetSyncVariableInt(
"m_RAIB.m_PairDeviceNetIdLow");
39 RegisterNetSyncVariableInt(
"m_RAIB.m_PairDeviceNetIdHigh");
44 if (!
g_Game.IsMultiplayer())
82 if (!super.OnStoreLoad(ctx, version))
90 bool locked = GetInventory().GetSlotLock(slotId);
93 GetInventory().SetSlotLock(slotId,
false);
94 locked = GetInventory().GetSlotLock(slotId);
104 super.OnStoreSave(ctx);
111 super.OnVariablesSynchronized();
115 m_RAIB.OnVariableSynchronized();
132 super.OnPlacementComplete(player, position, orientation);
142 super.EEItemLocationChanged(oldLoc, newLoc);
162 return m_RAIB.GetPairDevice();
192 GetInventory().GetCurrentInventoryLocation(il);
215 return FindAttachmentBySlotName(
slotName) != null;
229 return !
GetArmed() && super.IsTakeable();
247 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
253 for (
int attachmentIdx = 0; attachmentIdx < GetInventory().AttachmentCount(); attachmentIdx++)
255 ItemBase attachment =
ItemBase.Cast(GetInventory().GetAttachmentFromIndex(attachmentIdx));
258 attachment.UnlockFromParent();
259 attachment.SetHealth(
"",
"", 0.0);
273 bool isTimeTriggered =
false;
276 for (
int attachmentIdx = 0; attachmentIdx < GetInventory().AttachmentCount(); attachmentIdx++)
278 ItemBase attachment =
ItemBase.Cast(GetInventory().GetAttachmentFromIndex(attachmentIdx));
280 attachmentsCache.Insert(attachment);
283 foreach (
ItemBase attachment1 : attachmentsCache)
284 attachment1.UnlockFromParent();
287 foreach (
ItemBase attachment2 : attachmentsCache)
291 isTimeTriggered =
true;
297 foreach (
ItemBase attachment3 : attachmentsCache)
301 vector dropExtents =
"0.5 0.0 0.5";
303 dropExtents[1] = 0.15;
305 GetInventory().DropEntityInBounds(
InventoryMode.SERVER,
this, attachment3, dropExtents, 0, 0, 0);
307 attachment3.SetTakeable(
false);
324 foreach (
ItemBase attachment4 : attachmentsCache)
326 if (attachment4.IsAnyInherited({RemoteDetonator, ClockBase}))
332 if (attachment4 && !attachment4.IsAnyInherited({RemoteDetonator, ClockBase}))
334 Param1<ItemBase> params =
new Param1<ItemBase>(attachment4);
347 super.EEItemAttached(item, slot_name);
361 super.EEItemDetached(item, slot_name);
380 super.OnDisarmed(pWithTool);
385 for (
int attachmentIdx = 0; attachmentIdx < GetInventory().AttachmentCount(); attachmentIdx++)
387 ItemBase attachment =
ItemBase.Cast(GetInventory().GetAttachmentFromIndex(attachmentIdx));
390 attachmentsCache.Insert(attachment);
394 foreach (
ItemBase attachment1 : attachmentsCache)
395 attachment1.UnlockFromParent();
398 foreach (
ItemBase attachment2 : attachmentsCache)
403 GetInventory().DropEntity(
InventoryMode.SERVER,
this, attachment2);
406 if (attachment2.IsInherited(RemoteDetonator))
410 GetInventory().DropEntity(
InventoryMode.SERVER,
this, attachment2);
411 attachment2.SetHealth(
"",
"", 0.0);
415 attachment2.Delete();
428 receiver.UpdateLED(pState,
true);
453 if (entity.IsInherited(RemoteDetonator))
486 return "placeImprovisedExplosive_SoundSet";
491 return "improvisedexplosive_deploy_SoundSet";
496 return "ImprovisedExplosive_disarm_SoundSet";
501 return "ImprovisedExplosive_disarm_SoundSet";
509 debug_output +=
string.
Format(
"low net id: %1\n",
m_RAIB.GetPairDeviceNetIdLow());
510 debug_output +=
string.
Format(
"high net id: %1\n",
m_RAIB.GetPairDeviceNetIdHigh());
511 debug_output +=
string.
Format(
"pair device: %1\n",
m_RAIB.GetPairDevice());
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
PlaceObjectActionReciveData ActionReciveData ActionDeployObject()
void AddAction(typename actionName)
PlayerSpawnPreset slotName
Internal ancestor of all Entity implementations.
const string ANIM_PHASE_TRIGGER_EMPTY
override void UpdateLED(int pState)
static const string SLOT_TRIGGER_REMOTE
override void OnBeforeDisarm()
static const string SLOT_EXPLOSIVE_A
const string SLOT_EXPLOSIVES[SLOT_EXPLOSIVE_COUNT]
override string GetDeploySoundset()
override EntityAI GetPairDevice()
void InitiateExplosion()
not exploding itself, rely on attached explosives
override void OnStoreSave(ParamsWriteContext ctx)
const string ANIM_PHASE_TRIGGER_REMOTE
override bool CanBeDisarmed()
static const string SLOT_TRIGGER_ALARM_CLOCK
override string GetLoopDeploySoundset()
const float TIME_TRIGGER_TIMER_BASED_DELAY_SECS
const float TIME_TRIGGER_DELAY_SECS
const string ANIM_PHASE_TRIGGER_TIMER
override bool IsTimerDetonable()
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
void OnTriggerAttached(EntityAI entity)
override void UnlockExplosivesSlots()
override void OnDisarmed(bool pWithTool)
override RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
void ImprovisedExplosive()
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
override void UnlockTriggerSlots()
override void LockExplosivesSlots()
const string ANIM_PHASE_TRIGGER_CLOCK
override bool CanDisplayAttachmentSlot(int slot_id)
override void EEItemDetached(EntityAI item, string slot_name)
override void PairRemote(notnull EntityAI trigger)
void OnTriggerDetached(EntityAI entity)
const string SLOT_TRIGGERS[SLOT_TRIGGERS_COUNT]
override string GetArmSoundset()
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
const int SLOT_TRIGGERS_COUNT
override bool IsDeployable()
override bool OnStoreLoad(ParamsReadContext ctx, int version)
override void EOnInit(IEntity other, int extra)
override void OnActivatedByItem(notnull ItemBase item)
override bool IsTakeable()
override void EEItemAttached(EntityAI item, string slot_name)
override void LockTriggerSlots()
ref RemotelyActivatedItemBehaviour m_RAIB
override void OnVariablesSynchronized()
override bool HasLockedTriggerSlots()
static const string SLOT_TRIGGER_KITCHEN_TIMER
void UpdateVisuals(EntityAI entity)
const float TIME_TRIGGER_INITIAL_DELAY_SECS
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override bool CanBeArmed()
const int SLOT_EXPLOSIVE_COUNT
override void SetActions()
override string GetDisarmSoundset()
static const string SLOT_EXPLOSIVE_B
proto native int GetType()
returns type of InventoryLocation
provides access to slot configuration
static proto native owned string GetSlotName(int id)
static proto native int GetSlotIdFromString(string slot_name)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
void SetArmed(bool state)
const string ANIM_PHASE_VISIBILITY
override void UnpairRemote()
Serializer ParamsReadContext
Serializer ParamsWriteContext
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.
InventoryLocationType
types of Inventory Location
override void SetTakeable(bool pState)
RemoteDetonatorTrigger RemoteDetonator RemoteDetonatorReceiver()
ref RemotelyActivatedItemBehaviour m_RAIB