38 RegisterNetSyncVariableBool(
"m_IsMounted" );
59 GetInventory().GetCurrentInventoryLocation( inventory_location );
60 return base_building.GetInventory().GetSlotLock( inventory_location.
GetSlot() );
85 GetInventory().GetCurrentInventoryLocation( inventory_location );
86 bool is_mounted = base_building.GetInventory().GetSlotLock( inventory_location.
GetSlot() );
89 base_building.UpdateAttachmentVisuals( slot_name, is_mounted );
90 base_building.UpdateAttachmentPhysics( slot_name, is_mounted );
100 GetInventory().GetCurrentInventoryLocation( inventory_location );
101 base_building.GetInventory().SetSlotLock( inventory_location.
GetSlot(), lock_state );
119 super.OnVariablesSynchronized();
132 super.OnStoreSave( ctx );
137 if ( !super.OnStoreLoad( ctx, version ) )
145 if ( !ctx.
Read( is_mounted ) )
157 super.AfterStoreLoad();
189 override void OnWork(
float consumed_energy ) {}
205 super.OnInventoryEnter(player);
206 HideSelection(
"placing");
207 ShowSelection(
"zbytek");
210 GetCompEM().UnplugThis();
211 GetCompEM().UnplugAllDevices();
221 m_AreaDamage.SetHitZones({
"RightLeg",
"LeftLeg",
"RightFoot",
"LeftFoot"});
231 m_AreaDamage.SetHitZones({
"RightLeg",
"LeftLeg",
"RightFoot",
"LeftFoot"});
340 if ( GetCompEM().IsPlugged() && GetCompEM().IsSwitchedOn() )
351 MiscGameplayFunctions.DealAbsoluteDmg(
this, 1000);
359 super.OnItemLocationChanged(old_owner, new_owner);
374 super.OnPlacementComplete( player, position, orientation );
379 HideSelection(
"zbytek");
381 if (!GetHierarchyParent())
383 if (GetCompEM().IsPlugged() && GetCompEM().IsWorking() )
394 return "placeBarbedWire_SoundSet";
399 return "barbedwire_deploy_SoundSet";
void AddAction(typename actionName)
void AreaDamageManager(EntityAI parent)
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
override void SetTakeable(bool pState)
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
override ScriptCallQueue GetCallQueue(int call_category)
proto native void ObjectDelete(Object obj)
Wrapper class for managing sound through SEffectManager.
proto native int GetSlot()
returns slot id if current type is Attachment
static proto native owned string GetSlotName(int id)
converts slot_id to string
provides access to slot configuration
void CreateElectrifiedDamageTrigger()
void DestroyDamageTrigger()
override void OnInventoryEnter(Man player)
static const string m_SoundsShock[SOUNDS_SHOCK_COUNT]
override void OnWork(float consumed_energy)
override void OnIsPlugged(EntityAI source_device)
override bool OnStoreLoad(ParamsReadContext ctx, int version)
bool GetSlotLockedState()
override void OnWorkStart()
static const int SOUNDS_SHOCK_COUNT
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
static const string m_SoundsCut[SOUNDS_CUT_COUNT]
void PlayDeployLoopSound()
static const string m_SoundBuzzLoop
override void SetActions()
ref AreaDamageManager m_AreaDamage
override void PostAreaDamageActions()
SoundOnVehicle m_BuzzSoundLoop
void CreateDamageTrigger()
ref EffectSound m_DeployLoopSound
DEPRECATED.
override string GetDeploySoundset()
override void OnWorkStop()
override void OnStoreSave(ParamsWriteContext ctx)
override void AfterStoreLoad()
void SoundElectricShock()
void SetMountedState(bool is_mounted)
void LockAttachmentSlot(bool lock_state)
static const int SOUNDS_SPARK_COUNT
void SoundBuzzLoopStart()
override void OnVariablesSynchronized()
override void OnIsUnplugged(EntityAI last_energy_source)
override string GetLoopDeploySoundset()
static const int SOUNDS_COLLISION_COUNT
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
override void PreAreaDamageActions()
static const string m_SoundsCollision[SOUNDS_COLLISION_COUNT]
void UpdateAttachmentSlot()
void StopDeployLoopSound()
DEPRECATED.
static const float RANDOM_SPARK_INTERVAL
static const string m_SoundsSpark[SOUNDS_SPARK_COUNT]
static const int SOUNDS_CUT_COUNT
static bool IsBaseBuildingLogEnable()
static const int BARBED_WIRE_SPARKS
proto void CallLater(func fn, int delay=0, bool repeat=false, 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)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto bool Read(void value_in)
override string GetDebugName()
Serializer ParamsReadContext
proto native CGame GetGame()
Serializer ParamsWriteContext
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].