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 ) )
49 super.OnVariablesSynchronized();
106 this.ShowSelection(
"inventory" );
107 this.HideSelection(
"placing" );
108 this.HideSelection(
"filled" );
115 SetAllowDamage(
true);
117 float fold_damage = ( GetMaxHealth(
"",
"" ) / 100 ) * PERCENTUAL_DAMAGE;
118 DecreaseHealth(
"",
"", fold_damage );
124 this.HideSelection(
"inventory" );
125 this.ShowSelection(
"placing" );
126 this.HideSelection(
"filled" );
133 SetAllowDamage(
true);
135 float unfold_damage = ( GetMaxHealth(
"",
"" ) / 100 ) * PERCENTUAL_DAMAGE;
136 DecreaseHealth(
"",
"", unfold_damage );
142 super.EEItemLocationChanged (oldLoc, newLoc);
149 super.RefreshPhysics();
151 if (
this && !ToDelete() )
153 RemoveProxyPhysics(
"inventory" );
154 RemoveProxyPhysics(
"placing" );
155 RemoveProxyPhysics(
"filled" );
163 AddProxyPhysics(
"placing" );
168 AddProxyPhysics(
"inventory" );
172 AddProxyPhysics(
"filled" );
180 this.HideSelection(
"inventory" );
181 this.HideSelection(
"placing" );
182 this.ShowSelection(
"filled" );
190 DecreaseHealth(
"",
"", 5 );
191 SetAllowDamage(
false);
197 super.OnStoreSave(ctx);
205 if ( !super.OnStoreLoad(ctx, version) )
210 if ( !ctx.
Read(state) )
240 super.OnPlacementComplete( player, position, orientation );
257 return "placeHescoBox_SoundSet";
262 return "hescobox_deploy_SoundSet";
267 if ( !
GetGame().IsDedicatedServer() )
278 if ( !
GetGame().IsDedicatedServer() )
PlaceObjectActionReciveData ActionReciveData ActionDeployObject()
void AddAction(typename actionName)
void SetIsDeploySound(bool is_deploy_sound)
bool CanPlayDeployLoopSound()
protected float m_DrainThreshold protected bool m_State
enum eWireMaterial FOLDED
protected ref EffectSound m_DeployLoopSound
class JsonUndergroundAreaTriggerData GetPosition
proto void SurfaceGetType(float x, float z, out string type)
bool IsSurfaceDigable(string surface)
Checks if the surface is digable.
Wrapper class for managing sound through SEffectManager.
bool IsSoundPlaying()
Get whether EffectSound is currently playing.
void SetSoundFadeOut(float fade_out)
Set the sound fade out duration.
void SoundStop()
Stops sound.
override string GetDeploySoundset()
bool CanBeFilledAtPosition(vector position)
override void OnStoreSave(ParamsWriteContext ctx)
override string GetLoopDeploySoundset()
void PlayDeployLoopSound()
void StopDeployLoopSound()
override void RefreshPhysics()
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
override bool HasProxyParts()
override bool CanPutIntoHands(EntityAI parent)
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
override bool IsDeployable()
override bool OnStoreLoad(ParamsReadContext ctx, int version)
ref protected EffectSound m_DeployLoopSound
static const int UNFOLDED
override void OnVariablesSynchronized()
override void SetActions()
Manager class for managing Effect (EffectParticle, EffectSound)
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
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.
Serialization general interface. Serializer API works with:
proto bool Write(void value_out)
proto bool Read(void value_in)
proto native CGame GetGame()