44 RegisterNetSyncVariableInt(
"m_SyncParts01");
45 RegisterNetSyncVariableInt(
"m_SyncParts02");
46 RegisterNetSyncVariableInt(
"m_SyncParts03");
47 RegisterNetSyncVariableInt(
"m_InteractedPartId");
48 RegisterNetSyncVariableInt(
"m_PerformedActionId");
49 RegisterNetSyncVariableBool(
"m_HasBase");
54 if (ConfigIsExisting(
"hybridAttachments"))
59 if (ConfigIsExisting(
"mountables"))
70 super.EEDelete(parent);
79 return "disableBaseDamage";
102 super.OnVariablesSynchronized();
310 if (
value.GetId() ==
id)
394 if (!
super.OnStoreLoad(
ctx, version))
428 super.AfterStoreLoad();
474 BarbedWire
barbed_wire = BarbedWire.Cast(FindAttachmentBySlotName(
zone));
486 super.EEOnAfterLoad();
794 SetAffectPathgraph(
true,
false);
829 string config_path =
"CfgVehicles" +
" " +
entity.GetType() +
" " +
"attachments";
945 if (
HasBase() || GetInventory().AttachmentCount() > 0)
972 if (MemoryPointExists(
slot_name +
"_min"))
974 if (MemoryPointExists(
slot_name +
"_max"))
995 areaDamage.SetHitZones({
"Torso",
"LeftHand",
"LeftLeg",
"LeftFoot",
"RightHand",
"RightLeg",
"RightFoot" });
1012 if (MemoryPointExists(
"rotate_axis"))
1013 rotate_axis = ModelToWorld(GetMemoryPointPos(
"rotate_axis"));
1186#ifdef BSB_DEBUG_SPAM
const int AT_DISMANTLE_PART
const int AT_DESTROY_PART
void AddAction(typename actionName)
void RemoveAction(typename actionName)
void OnPartDismantledClient(string part_name, int action_id)
const string ANIMATION_DEPLOYED
void SetActionFromSyncData()
void SoundDestroyStart(string part_name)
const string SOUND_BUILD_WOOD_LOG
void SoundBuildStart(string part_name)
void UpdateAttachmentVisuals(string slot_name, bool is_locked)
void CalcDamageAreaRotation(float angle_deg, out vector center, out vector orientation)
void RegisterPartForSync(int part_id)
const string SOUND_DISMANTLE_METAL
void SetPartsAfterStoreLoad()
void DestroyConstruction()
ref array< string > m_HybridAttachments
string GetDismantleSoundByMaterial(string part_name)
bool IsAttachmentSlotLocked(EntityAI attachment)
void OnPartBuiltClient(string part_name, int action_id)
void RegisterActionForSync(int part_id, int action_id)
const string SOUND_BUILD_WOOD_PLANK
void SetPartsFromSyncData()
ref array< string > m_Mountables
const string SOUND_BUILD_WIRE
void ResetActionSyncData()
override string GetInvulnerabilityTypeString()
void CheckForHybridAttachments(EntityAI item, string slot_name)
ref Construction m_Construction
void GetAttachmentSlots(EntityAI entity, out array< string > attachment_slots)
void OnPartDestroyedClient(string part_name, int action_id)
void UnregisterPartForSync(int part_id)
void bsbDebugSpam(string s)
Construction GetConstruction()
void SoundDismantleStart(string part_name)
ConstructionPart GetConstructionPartById(int id)
const string SOUND_DISMANTLE_WOOD_PLANK
const string SOUND_DISMANTLE_WOOD_LOG
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
const string SOUND_BUILD_WOOD_STAIRS
void SetPartFromSyncData(ConstructionPart part)
void UpdateAttachmentPhysics(string slot_name, bool is_locked)
string GetBuildSoundByMaterial(string part_name)
ItemBase CreateConstructionKit()
const string SOUND_DISMANTLE_WIRE
float m_ConstructionKitHealth
void OnSynchronizedClient()
void SynchronizeBaseState()
ref map< string, ref AreaDamageManager > m_DamageTriggers
void SetBaseState(bool has_base)
const string SOUND_BUILD_METAL
bool IsPartBuildInSyncData(int part_id)
const string SOUND_DISMANTLE_WOOD_STAIRS
const int ECE_PLACE_ON_SURFACE
PlayerSpawnPreset slotName
void Construction(BaseBuildingBase parent)
bool m_FixDamageSystemInit
class JsonUndergroundAreaTriggerData GetPosition
A particular version of the deferred loop used to not damage players inside vehicles.
override string GetConstructionKitType()
override array< string > OnDebugSpawnBuildExcludes()
Excludes certain parts from being built by OnDebugSpawn, uses Contains to compare.
override void UpdateVisuals()
override void OnPartBuiltServer(notnull Man player, string part_name, int action_id)
override vector GetKitSpawnPosition()
Wrapper class for managing sound through SEffectManager.
provides access to slot configuration
static proto native owned string GetSlotName(int id)
converts slot_id to string
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
void OnPartDestroyedClient(string part_name, int action_id)
override void EEItemAttached(EntityAI item, string slot_name)
bool CanFoldBaseBuildingObject()
void OnPartDismantledClient(string part_name, int action_id)
void RegisterPartForSync(int part_id)
void SoundDestroyStart(string part_name)
ref map< string, ref AreaDamageManager > m_DamageTriggers
void SetPartFromSyncData(ConstructionPart part)
bool MustBeBuiltFromOutside()
Some buildings can only be built from outside.
bool IsAttachmentSlotLocked(string slot_name)
void SetBaseState(bool has_base)
override bool OnStoreLoad(ParamsReadContext ctx, int version)
ref array< string > m_Mountables
void UpdateAttachmentVisuals(string slot_name, bool is_locked)
void OnPartDestroyedServer(Man player, string part_name, int action_id, bool destroyed_by_connected_part=false)
override void EEOnAfterLoad()
bool IsFacingCamera(string selection)
override void EEDelete(EntityAI parent)
void OnSetSlotLock(int slotId, bool locked, bool was_locked)
void UnregisterPartForSync(int part_id)
ItemBase FoldBaseBuildingObject()
override bool CanPutIntoHands(EntityAI parent)
void SetActionFromSyncData()
override void SetActions()
void OnPartDismantledServer(notnull Man player, string part_name, int action_id)
override string GetInvulnerabilityTypeString()
override int GetDamageSystemVersionChange()
bool CheckLevelVerticalDistance(float max_dist, string selection, PlayerBase player)
bool IsAttachmentSlotLocked(EntityAI attachment)
vector GetKitSpawnPosition()
override bool CanUseConstructionBuild()
string GetDismantleSoundByMaterial(string part_name)
void DestroyConstructionKit(ItemBase construction_kit)
void DestroyConstruction()
bool CheckSlotVerticalDistance(int slot_id, PlayerBase player)
void SoundBuildStart(string part_name)
override int GetHideIconMask()
string GetBuildSoundByMaterial(string part_name)
string GetConstructionKitType()
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
override void OnStoreSave(ParamsWriteContext ctx)
bool CheckMemoryPointVerticalDistance(float max_dist, string selection, PlayerBase player)
override void AfterStoreLoad()
override bool IgnoreOutOfReachCondition()
void OnSynchronizedClient()
void OnPartBuiltClient(string part_name, int action_id)
Construction GetConstruction()
override bool IsPlayerInside(PlayerBase player, string selection)
override bool ShowZonesHealth()
override void EEItemDetached(EntityAI item, string slot_name)
void DestroyAreaDamage(string slot_name)
override void OnVariablesSynchronized()
void SynchronizeBaseState()
override bool CanRemoveFromCargo(EntityAI parent)
void SoundDismantleStart(string part_name)
override bool CanObstruct()
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override bool CanPutInCargo(EntityAI parent)
void GetAttachmentSlots(EntityAI entity, out array< string > attachment_slots)
override void OnDebugSpawn()
void CreateConstructionKitInHands(notnull PlayerBase player)
ref array< string > m_HybridAttachments
ref Construction m_Construction
bool HasAttachmentsBesidesBase()
override bool CanUseConstruction()
float m_ConstructionKitHealth
override bool IsIgnoredByConstruction()
bool IsPartBuildInSyncData(int part_id)
void CreateAreaDamage(string slot_name, float rotation_angle=0)
void OnPartBuiltServer(notnull Man player, string part_name, int action_id)
void SetPartsFromSyncData()
override bool IsFacingPlayer(PlayerBase player, string selection)
ConstructionPart GetConstructionPartById(int id)
void SetPartsAfterStoreLoad()
void CalcDamageAreaRotation(float angle_deg, out vector center, out vector orientation)
void CheckForHybridAttachments(EntityAI item, string slot_name)
array< string > OnDebugSpawnBuildExcludes()
Excludes certain parts from being built by OnDebugSpawn, uses Contains to compare.
bool HasProperDistance(string selection, PlayerBase player)
override bool IsDeployable()
void RegisterActionForSync(int part_id, int action_id)
void UpdateAttachmentPhysics(string slot_name, bool is_locked)
void ResetActionSyncData()
ItemBase CreateConstructionKit()
bool PerformRoofCheckForBase(string partName, PlayerBase player, out bool result)
static bool IsBaseBuildingLogEnable()
Serialization general interface. Serializer API works with:
override string GetDebugName()
proto native CGame GetGame()
proto void PrintToRPT(void var)
Prints content of variable to RPT file (performance warning - each write means fflush!...
static proto float Cos(float angle)
Returns cosinus of angle in radians.
static proto float Sin(float angle)
Returns sinus of angle in radians.
static const float DEG2RAD