3 protected const string SLOT_TRIGGER =
"TriggerRemoteDetonator_Receiver";
17 RegisterNetSyncVariableInt(
"m_RAIB.m_PairDeviceNetIdLow");
18 RegisterNetSyncVariableInt(
"m_RAIB.m_PairDeviceNetIdHigh");
23 if (!
g_Game.IsMultiplayer())
31 g_Game.GetAnalyticsServer().OnEntityKilled(killer,
this);
51 if (!super.OnStoreLoad(ctx, version))
57 bool locked = GetInventory().GetSlotLock(slotId);
60 GetInventory().SetSlotLock(slotId,
false);
61 locked = GetInventory().GetSlotLock(slotId);
70 super.OnStoreSave(ctx);
77 super.OnVariablesSynchronized();
81 m_RAIB.OnVariableSynchronized();
90 super.EEItemLocationChanged(oldLoc, newLoc);
101 GetInventory().GetCurrentInventoryLocation(il);
108 if (timer && !timer.IsAlarmOn())
123 return FindAttachmentBySlotName(
slotName) != null;
132 return !
GetArmed() && super.IsTakeable();
150 super.OnWasAttached(parent, slot_id);
162 super.OnWasDetached(parent, slot_id);
183 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
189 for (
int attachmentIdx = 0; attachmentIdx < GetInventory().AttachmentCount(); attachmentIdx++)
191 ItemBase attachment =
ItemBase.Cast(GetInventory().GetAttachmentFromIndex(attachmentIdx));
194 attachment.UnlockFromParent();
195 attachment.SetHealth(
"",
"", 0.0);
218 return m_RAIB.GetPairDevice();
223 if (!super.CanBeArmed())
247 SetHealth(
"",
"", 0.0);
256 SetHealth(
"",
"", 0.0);
265 super.OnDisarmed(pWithTool);
270 for (
int att = 0; att < GetInventory().AttachmentCount(); att++)
272 ItemBase attachment =
ItemBase.Cast(GetInventory().GetAttachmentFromIndex(att));
275 attachment.UnlockFromParent();
276 if (attachment.IsInherited(RemoteDetonator))
280 GetInventory().DropEntity(
InventoryMode.SERVER,
this, attachment);
281 attachment.SetHealth(
"",
"", 0.0);
297 super.EEItemAttached(item, slot_name);
305 super.EEItemDetached(item, slot_name);
316 receiver.UpdateLED(pState,
true);
326 for (
int att = 0; att < GetInventory().AttachmentCount(); att++)
328 ItemBase attachment =
ItemBase.Cast(GetInventory().GetAttachmentFromIndex(att));
331 attachment.LockToParent();
356 return "placePlasticExplosive_SoundSet";
361 return "plasticexplosive_deploy_SoundSet";
366 return "ImprovisedExplosive_disarm_SoundSet";
371 return "ImprovisedExplosive_disarm_SoundSet";
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.
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)
static const int PLASTIC_EXPLOSION
override void UpdateLED(int pState)
override string GetDeploySoundset()
override EntityAI GetPairDevice()
override void OnStoreSave(ParamsWriteContext ctx)
const string ANIM_PHASE_TRIGGER_REMOTE
override bool CanBeDisarmed()
override string GetLoopDeploySoundset()
override void EEKilled(Object killer)
special behaviour - do not call super from ExplosivesBase
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
void OnTriggerAttached(EntityAI entity)
override void OnDisarmed(bool pWithTool)
override RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
override void UnlockTriggerSlots()
override bool CanDisplayAttachmentSlot(int slot_id)
override void EEItemDetached(EntityAI item, string slot_name)
override void PairRemote(notnull EntityAI trigger)
override void OnWasDetached(EntityAI parent, int slot_id)
void OnTriggerDetached(EntityAI entity)
override string GetArmSoundset()
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
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 OnWasAttached(EntityAI parent, int slot_id)
override void LockTriggerSlots()
ref RemotelyActivatedItemBehaviour m_RAIB
override void OnVariablesSynchronized()
override bool HasLockedTriggerSlots()
void UpdateVisuals(EntityAI entity)
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override bool CanBeArmed()
const string SLOT_TRIGGER
override bool EEOnDamageCalculated(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
override void SetActions()
override string GetDisarmSoundset()
DamageType
exposed from C++ (do not change)
void SetArmed(bool state)
void SetParticleExplosion(int particle)
override void UnpairRemote()
void SetAmmoType(string pAmmoType)
Serializer ParamsReadContext
Serializer ParamsWriteContext
InventoryLocationType
types of Inventory Location
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
override void SetTakeable(bool pState)
RemoteDetonatorTrigger RemoteDetonator RemoteDetonatorReceiver()