4 static const int UNFOLDED = 1;
5 static const int FILLED = 2;
6 static const int PERCENTUAL_DAMAGE = 1;
18 RegisterNetSyncVariableInt(
"m_State",
FOLDED, FILLED);
19 RegisterNetSyncVariableBool(
"m_IsSoundSynchRemote");
20 RegisterNetSyncVariableBool(
"m_IsDeploySound");
35 if (!
super.CanPutIntoHands(parent))
47 super.OnVariablesSynchronized();
94 this.ShowSelection(
"inventory");
95 this.HideSelection(
"placing");
96 this.HideSelection(
"filled");
103 SetAllowDamage(
true);
105 float fold_damage = (GetMaxHealth(
"",
"") / 100) * PERCENTUAL_DAMAGE;
112 this.HideSelection(
"inventory");
113 this.ShowSelection(
"placing");
114 this.HideSelection(
"filled");
121 SetAllowDamage(
true);
123 float unfold_damage = (GetMaxHealth(
"",
"") / 100) * PERCENTUAL_DAMAGE;
137 super.RefreshPhysics();
139 if (
this && !ToDelete())
141 RemoveProxyPhysics(
"inventory");
142 RemoveProxyPhysics(
"placing");
143 RemoveProxyPhysics(
"filled");
151 AddProxyPhysics(
"placing");
156 AddProxyPhysics(
"inventory");
160 AddProxyPhysics(
"filled");
168 this.HideSelection(
"inventory");
169 this.HideSelection(
"placing");
170 this.ShowSelection(
"filled");
178 DecreaseHealth(
"",
"", 5);
179 SetAllowDamage(
false);
193 if (!
super.OnStoreLoad(
ctx, version))
245 return "placeHescoBox_SoundSet";
250 return "hescobox_deploy_SoundSet";
255 if (!
GetGame().IsDedicatedServer())
264 if (!
GetGame().IsDedicatedServer())
void AddAction(typename actionName)
void SetIsDeploySound(bool is_deploy_sound)
bool CanPlayDeployLoopSound()
enum eWireMaterial FOLDED
ref EffectSound m_DeployLoopSound
class JsonUndergroundAreaTriggerData GetPosition
Wrapper class for managing sound through SEffectManager.
override bool HasProxyParts()
bool CanBeFilledAtPosition(vector position)
void PlayDeployLoopSound()
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
void StopDeployLoopSound()
override bool IsDeployable()
override bool OnStoreLoad(ParamsReadContext ctx, int version)
override bool CanPutIntoHands(EntityAI parent)
static const int UNFOLDED
override void RefreshPhysics()
override void OnVariablesSynchronized()
override void OnStoreSave(ParamsWriteContext ctx)
override string GetDeploySoundset()
EffectSound m_DeployLoopSound
override void SetActions()
override string GetLoopDeploySoundset()
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Serialization general interface. Serializer API works with:
proto native CGame GetGame()