23 protected const string LAMPS_SOUND =
"Bunker_Lamp_Hum_SoundSet";
31 protected const string COLOR_LAMP_OFF =
"DZ\\structures_sakhal\\military\\storage\\data\\Warhead_Storage_Lamp_Glass_int.rvmat";
32 protected const string COLOR_LAMP_ON =
"DZ\\structures_sakhal\\military\\storage\\data\\Warhead_Storage_Lamp_Glass_e_int.rvmat";
40 RegisterNetSyncVariableBool(
"m_HasPower");
41 RegisterNetSyncVariableInt(
"m_LeverStatesBits");
42 RegisterNetSyncVariableInt(
"m_IsLowEnergy");
51 for (
int i; i < 4; i++)
60 g_Game.RegisterNetworkStaticObject(
this);
65 for (
int i = 0; i < 12; i++)
116 PlaySoundSetAtMemoryPoint(soundEff,
LAMPS_SOUND,
"lamp" + (i+1).
ToString() +
"_pos",
true, 0.1, 0.1);
131 soundEff.SetAutodestroy(
true);
181 super.OnSpawnByObjectSpawner(item);
189 foreach (
int index,
auto triggerData : jsonData.
Triggers)
191 if (triggerData.CustomSpawn)
197 foreach (
string entry : customStringData)
200 entry.Split(
"=", optionValuePair);
201 if (optionValuePair[0] ==
"undergroundTriggerTag")
203 if (optionValuePair[1] == triggerData.Tag)
274 for (
int index = 1; index <= 4; index++)
276 int bit = 1 << (index - 1);
294 for (
int index = 1; index <= 4; index++)
296 int bit = 1 << (index - 1);
322 return doorIndex - 8;
346 if (!super.CanDoorBeOpened(doorIndex, checkIfLocked))
372 return super.CanDoorBeLocked(doorIndex);
377 return doorIndex - 4;
382 return (doorIndex >= 4 && doorIndex <= 7);
387 return (doorIndex >= 8 && doorIndex <= 11);
398 return super.CanDoorBeClosed(doorIndex);
407 debug_output =
"IsDoorOpen(4) " +
IsDoorOpen(4)+
"\n";
408 debug_output +=
"IsDoorOpen(5) " +
IsDoorOpen(5)+
"\n";
409 debug_output +=
"IsDoorOpen(6) " +
IsDoorOpen(6)+
"\n";
410 debug_output +=
"IsDoorOpen(7) " +
IsDoorOpen(7)+
"\n";
414 debug_output =
"this is client";
422 super.OnVariablesSynchronized();
Param1< int > DoorStartParams
Param2< int, bool > DoorFinishParams
bool IsPlaying()
Returns true when the Effect is playing, false otherwise.
proto native void OpenDoor(int index)
Attempts to open the door.
proto native void CloseDoor(int index)
Attempts to close the door.
proto native bool IsDoorClosed(int index)
When the phase is at the close phase target (0.0)
proto native bool IsDoorOpen(int index)
When the door is requested to be fully open (animation wanted phase is greater than 0....
proto native bool IsDoorOpening(int index)
When the wanted phase is at the open phase target (1.0)
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Wrapper class for managing sound through SEffectManager.
static void SpawnParentedTriggers(EntityAI parent)
ref array< ref JsonUndergroundAreaTriggerData > Triggers
static void SpawnTriggerCarrier(EntityAI parent, int index, JsonUndergroundAreaTriggerData data)
override void OnSpawnByObjectSpawner(ITEM_SpawnerObject item)
override void OnDoorOpenStart(DoorStartParams params)
const string WARHEAD_BUNKER_TRIGGER
void Land_WarheadStorage_Main()
const string ELECTRICITY_OFF_SOUND
const string MAIN_DOOR_SELECTION1
override bool CanDoorBeClosed(int doorIndex)
void SetLeverStatesServer(int leverBits)
const string ELECTRICITY_ON_SOUND
const float DOOR_AUTOCLOSE_TIME
void AutoCloseDoor(int doorIndex)
void ~Land_WarheadStorage_Main()
const string ALARM_DOOR_OPEN_SOUND
void RemoveDoorTimer(int doorIndex)
override bool CanDoorBeOpened(int doorIndex, bool checkIfLocked=false)
override void DeferredInit()
bool IsStorageDoor(int doorIndex)
ref map< int, ref Timer > m_AutoCloseTimers
const string ALARM_POS_MEMPOINT
int GetBunkerEffectIndexByDoor(int doorIndex)
override void OnDoorOpenFinish(DoorFinishParams params)
void UpdateDoorStateServer()
EffectSound m_SoundDoorLoop[4]
override bool CanDoorBeLocked(int doorIndex)
void SetLowEnergyStateServer(bool state)
const string COLOR_LAMP_ON
override void OnVariablesSynchronized()
const string LAMP_SELECTION
const string ALARM_DOOR_CLOSE_SOUND
const string MAIN_DOOR_SELECTION2
void SetPowerServer(bool hasPower)
override void OnDoorCloseStart(DoorStartParams params)
int GetStorageLightIndexByDoor(int doorIndex)
const string ALARM_DOOR_OPEN_LOOP_SOUND
override void OnDoorCloseFinish(DoorFinishParams params)
const string VENT_POS_MEMPOINT
WarheadStorageLight m_StorageDoorLights[4]
const string VENTILATION_SOUND
void UpdateDoorStateClient()
int GetDoorIndexByLeverIndex(int LeverIndex)
override string GetDebugText()
const string COLOR_LAMP_OFF
ref array< EffectSound > m_PoweredSoundEffects
const string VENT_MAIN_POS_MEMPOINT
bool IsBunkerDoor(int doorIndex)
static void UnregisterBunker(Land_WarheadStorage_Main bunker)
static void RegisterBunker(Land_WarheadStorage_Main bunker)
static JsonUndergroundTriggers GetData()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
array< string > TStringArray
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
static const string Empty