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
proto native bool IsDoorClosed(int index)
When the phase is at the close phase target (0.0).
proto native bool IsDoorOpening(int index)
When the wanted phase is at the open phase target (1.0).
proto native void OpenDoor(int index)
Attempts to open the door.
proto native bool IsDoorOpen(int index)
When the door is requested to be fully open (animation wanted phase is greater than 0....
proto native void CloseDoor(int index)
Attempts to close the door.
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
static void SpawnParentedTriggers(EntityAI parent)
static void SpawnTriggerCarrier(EntityAI parent, int index, JsonUndergroundAreaTriggerData data)
ref array< ref JsonUndergroundAreaTriggerData > Triggers
const string ALARM_POS_MEMPOINT
void AutoCloseDoor(int doorIndex)
const string WARHEAD_BUNKER_TRIGGER
bool IsStorageDoor(int doorIndex)
int GetBunkerEffectIndexByDoor(int doorIndex)
int GetDoorIndexByLeverIndex(int LeverIndex)
const string MAIN_DOOR_SELECTION1
void ~Land_WarheadStorage_Main()
override bool CanDoorBeOpened(int doorIndex, bool checkIfLocked=false)
override void OnDoorCloseFinish(DoorFinishParams params)
ref map< int, ref Timer > m_AutoCloseTimers
void SetLeverStatesServer(int leverBits)
override void DeferredInit()
const string VENTILATION_SOUND
override string GetDebugText()
int GetStorageLightIndexByDoor(int doorIndex)
const string MAIN_DOOR_SELECTION2
const string COLOR_LAMP_ON
WarheadStorageLight m_StorageDoorLights[4]
const string COLOR_LAMP_OFF
override bool CanDoorBeClosed(int doorIndex)
const string ELECTRICITY_OFF_SOUND
const string ALARM_DOOR_OPEN_LOOP_SOUND
void SetPowerServer(bool hasPower)
override void OnSpawnByObjectSpawner(ITEM_SpawnerObject item)
void Land_WarheadStorage_Main()
void UpdateDoorStateClient()
override void OnDoorOpenStart(DoorStartParams params)
const float DOOR_AUTOCLOSE_TIME
override bool CanDoorBeLocked(int doorIndex)
const string VENT_POS_MEMPOINT
void RemoveDoorTimer(int doorIndex)
ref array< EffectSound > m_PoweredSoundEffects
const string LAMP_SELECTION
const string ALARM_DOOR_CLOSE_SOUND
override void OnVariablesSynchronized()
const string VENT_MAIN_POS_MEMPOINT
void SetLowEnergyStateServer(bool state)
void UpdateDoorStateServer()
const string ELECTRICITY_ON_SOUND
bool IsBunkerDoor(int doorIndex)
override void OnDoorOpenFinish(DoorFinishParams params)
EffectSound m_SoundDoorLoop[4]
override void OnDoorCloseStart(DoorStartParams params)
const string ALARM_DOOR_OPEN_SOUND
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.
bool IsPlaying()
Returns true when the Effect is playing, false otherwise.
array< string > TStringArray
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
static const string Empty