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)
Wrapper class for managing sound through SEffectManager.
proto native int GetSlot()
returns slot id if current type is Attachment
provides access to slot configuration
static proto native owned string GetSlotName(int id)
void LockAttachmentSlot(bool lock_state)
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
override string GetDeploySoundset()
void SetMountedState(bool is_mounted)
SoundOnVehicle m_BuzzSoundLoop
void CreateDamageTrigger()
static const string m_SoundsCut[SOUNDS_CUT_COUNT]
override void OnStoreSave(ParamsWriteContext ctx)
bool GetSlotLockedState()
override string GetLoopDeploySoundset()
override void PostAreaDamageActions()
override void OnIsUnplugged(EntityAI last_energy_source)
void PlayDeployLoopSound()
void UpdateAttachmentSlot()
void StopDeployLoopSound()
DEPRECATED.
override void OnIsPlugged(EntityAI source_device)
override void OnWorkStop()
void DestroyDamageTrigger()
void CreateElectrifiedDamageTrigger()
static const int SOUNDS_SHOCK_COUNT
override void PreAreaDamageActions()
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
static const int SOUNDS_SPARK_COUNT
ref EffectSound m_DeployLoopSound
DEPRECATED.
static const string m_SoundsCollision[SOUNDS_COLLISION_COUNT]
ref AreaDamageManager m_AreaDamage
override void OnWork(float consumed_energy)
static const int SOUNDS_CUT_COUNT
override void AfterStoreLoad()
static const string m_SoundBuzzLoop
override bool OnStoreLoad(ParamsReadContext ctx, int version)
static const string m_SoundsSpark[SOUNDS_SPARK_COUNT]
static const float RANDOM_SPARK_INTERVAL
override void OnWorkStart()
static const string m_SoundsShock[SOUNDS_SHOCK_COUNT]
override void OnInventoryEnter(Man player)
override void OnVariablesSynchronized()
void SoundBuzzLoopStart()
void SoundElectricShock()
override void SetActions()
static const int SOUNDS_COLLISION_COUNT
static bool IsBaseBuildingLogEnable()
static const int BARBED_WIRE_SPARKS
proto bool Read(void value_in)
override string GetDebugName()
Serializer ParamsReadContext
Serializer ParamsWriteContext
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
override void SetTakeable(bool pState)
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor).