DIFF

class Land_Underground_WaterReservoirSource

Land_Underground_WaterReservoir BuildingBase Building EntityAI Entity ObjectTyped Object IEntity Managed

All members, including inherited

Constructors 2

void Land_Underground_WaterReservoir()
void ~Land_Underground_WaterReservoir()

Constants 50

protected const string OBJECT_NAME_WATER_PLANE = "Land_Underground_WaterReservoir_Water"
Referenced by LateInit()
protected const int WL_MIN = 0
protected const int WL_ABOVE_PIPES = 1
protected const int PL_MIN = 0
protected const int PL_AVERAGE = 1
protected const int PL_MAX = 2
protected const int VALVES_COUNT = 2
protected const int PIPES_BROKEN_COUNT = 2
Referenced by Init()
protected const int PIPE_INDEX_BROKEN1 = 0

main broken pipe

Referenced by HandleVisualEffects()
protected const int PIPE_INDEX_BROKEN2 = 1

tighter broken pipe

Referenced by HandleVisualEffects()
protected const string ANIM_PHASE_VALVE_GAUGE_DRAIN = "ValveGauge1"
protected const string ANIM_PHASE_VALVE_GAUGE_FILL = "ValveGauge2"
protected const string ANIM_PHASE_VALVE_DRAIN = "Valve1"
Referenced by AnimateValve()
protected const string ANIM_PHASE_VALVE_FILL = "Valve2"
Referenced by AnimateValve()
protected const string VALVE_NAME_DRAIN = "valve1"
protected const string VALVE_NAME_FILL = "valve2"
protected const string PIPE_NAME_BROKEN1 = "pipe_broken_1"
protected const string PIPE_NAME_BROKEN2 = "pipe_broken_2"
Referenced by HandleVisualEffects()
protected const string PIPE_NAME_LEAKING_DRAIN = "pipe_leaking_1"
Referenced by HandleVisualEffects()
protected const string PIPE_NAME_LEAKING_FILL = "pipe_leaking_2"
Referenced by HandleVisualEffects()
protected const string SOUND_NAME_PIPE_CREAKING = "WaterObjectUndergroundPipeCreaking_SoundSet"
protected const string SOUND_NAME_VALVE_MANIPULATION = "WaterObjectUndergroundValve_SoundSet"
protected const string SOUND_NAME_PIPE_SPRINKLING_START = "WaterObjectUndergroundPipeSprinkling_Start_SoundSet"
protected const string SOUND_NAME_PIPE_SPRINKLING_END = "WaterObjectUndergroundPipeSprinkling_End_SoundSet"
protected const string SOUND_NAME_PIPE_SPRINKLING_LOOP1 = "WaterObjectUndergroundPipeSprinkling_Loop1_SoundSet"
protected const string SOUND_NAME_PIPE_SPRINKLING_LOOP2 = "WaterObjectUndergroundPipeSprinkling_Loop2_SoundSet"
protected const string SOUND_NAME_UPIPE_SPRINKLING_START = "WaterObjectUndergroundUnderwaterPipe_Start_SoundSet"
protected const string SOUND_NAME_UPIPE_SPRINKLING_END = "WaterObjectUndergroundUnderwaterPipe_End_SoundSet"
protected const string SOUND_NAME_UPIPE_SPRINKLING_LOOP = "WaterObjectUndergroundUnderwaterPipe_Loop_SoundSet"
protected const string SOUND_NAME_WATER_FILL_LOOP = "WaterObjectUndergroundUnderwaterFill_Loop_SoundSet"
protected const string SOUND_NAME_WATER_DRAIN_LOOP = "WaterObjectUndergroundUnderwaterEmpty_Loop_SoundSet"
protected const int PARTICLE_DRAIN_PIPE_MAX_PRESSURE = ParticleList.WATER_SPILLING
Referenced by HandleVisualEffects()
protected const int PARTICLE_FILL_PIPE_MAX_PRESSURE = ParticleList.WATER_SPILLING
Referenced by HandleVisualEffects()
protected const int PARTICLE_FILL_PIPE_JET = ParticleList.WATER_JET
Referenced by HandleVisualEffects()
protected const int PARTICLE_FILL_PIPE_JET_WEAK = ParticleList.WATER_JET_WEAK
Referenced by HandleVisualEffects()
protected static const string WATER_LEVEL_MAX = "water_level_max"
protected static const string WATER_LEVEL_AVERAGE = "water_level_average"
Referenced by HeightToWaterLevel(), LateInit(), ResetState()
Show 1 more, WaterLevelToHeight()
protected static const string WATER_LEVEL_ABOVE_PIPES = "water_level_above_pipes"
protected static const string WATER_LEVEL_MIN = "water_level_min"
protected const int WATER_LEVELS_COUNT = 4
protected const string WATER_LEVELS[WATER_LEVELS_COUNT] = { WATER_LEVEL_MAX, WATER_LEVEL_AVERAGE, WATER_LEVEL_ABOVE_PIPES, WATER_LEVEL_MIN }
protected const int PIPE_CREAKING_MIN_TIME_DELAY_MS = 10000
protected const int PIPE_CREAKING_MAX_TIME_DELAY_MS = 15000
protected const int PIPE_CREAKING_SOUND_LOCATIONS_COUNT = 4
protected const string PIPE_CREAKING_SOUND_LOCATIONS[PIPE_CREAKING_SOUND_LOCATIONS_COUNT] = { "pipe_creaking_sound_pos_1", "pipe_creaking_sound_pos_2", "pipe_creaking_sound_pos_3", "pipe_creaking_sound_pos_4" }
private const float TEMP_HOTIX_TIMESLICE = 0.01
Referenced by EOnPostSimulate(), and Init()

Members 39

protected ref array<ref WaterLevelSettings> m_DrainValveWaterStageSettings

valve/pipe stages for water and pressure levels

protected ref array<ref PressureLevelSettings> m_DrainValvePressureDeanimationSettings

for deanimation purposes

protected ref array<ref PressureLevelSettings> m_FillValvePressureDeanimationSettings

for deanimation purposes

protected ref WaterLevelSnapshot m_WaterLevelSnapshot
Referenced by EOnPostSimulate(), and Init()
protected int m_DrainValveWaterLevelStageIndex

pointing to specific stage for each valve/pipe

protected int m_ValveStatesPacked
protected int m_ValveStatesPackedPrev
Referenced by SyncValveVariables()
protected int m_ValveManipulatedIndexPrev
Referenced by Init(), and ResetState()
protected ref array<string> m_ValveNames
protected ref map<string, vector> m_WaterLevelsAvailable
protected ref array<bool> m_PressureAnimationRequests
protected ref array<bool> m_PressureDeanimationRequests
Referenced by EOnPostSimulate(), Init(), RegisterValve()
Show 1 more, ResetState()
protected ref array<float> m_WaterLevelTimesAccumulated
Referenced by EOnPostSimulate(), Init(), RegisterValve()
Show 1 more, ResetState()
protected ref array<float> m_PressureTimesAccumulated
Referenced by EOnPostSimulate(), Init(), RegisterValve()
Show 1 more, ResetState()
protected int m_LastActiveValve
Referenced by EOnPostSimulate(), Init(), ResetState()
Show 1 more, SetLastActiveValve()
protected Object m_SpawnedWaterObject
protected vector m_WaterLevelDefault
protected float m_WaterLevelHeightActual
protected bool m_ValveManipulationSoundRequested

VFX/SFX

protected ref EffectSound m_ValveManipulationSound
protected ref array<EffectSound> m_PipeSounds
protected bool m_PipeCreakingSoundRequested
protected ref EffectSound m_PipeCreakingSounds
protected bool m_PipeUnderwaterSoundRunning
protected ref EffectSound m_PipeUnderwaterSound
protected ref EffectSound m_WaterLevelMovementSound
protected ref ParticleSourceArray m_ValveParticles
protected ref ParticleSourceArray m_PipeBrokenParticles
private ref Timer m_TempHotfixTimer

Methods 52

override void OnVariablesSynchronized()

end of deanimation - overlapped activation of valves

override void SetActions()
override bool HasTurnableValveBehavior()
override bool IsValveTurnable(int pValveIndex)

for deanimation purposes only while valves activation overllaps

protected bool IsAnyValveActive()
protected bool IsValveActive(int pValveIndex)
References m_ValveStates, and VALVES_COUNT
void OnValveManipulationStart(int pValveIndex)
void OnValveManipulationCanceled(int pValveIndex)
array<vector> GetValveAligningPointsWS(int pValveIndex)

for the animation aligning returns data in order: start point; direction point

protected void SetLastActiveValve(int pValveIndex)
protected void TranslateMemoryPointsToWaterLevels()
Referenced by LateInit()
protected float WaterLevelToHeight(int pWaterLevel)
Referenced by EOnPostSimulate(), and ResetState()
protected int HeightToWaterLevel(float pHeight)
Referenced by SetWaterLevelHeight()
protected float PressureLevelToValue(int pPressureLevel)
References PL_AVERAGE, PL_MAX, and PL_MIN
Referenced by EOnPostSimulate()
protected void SetDefaultPressureLevelStageSettings(int pValveIndex)
Referenced by EOnPostSimulate()
protected void SetValvePressureLevelGauge(int pValveIndex, float pValue)
Referenced by EOnPostSimulate(), and ResetState()
protected bool IsValvePressureLevelGaugeAtBase(int pValveIndex)
protected vector GetMemoryPointPosition(string pMemoryPoint)
protected void HandleSoundEffectsWaterLevelMovementSounds()

strong water jet sound only when fill valve activated

Referenced by HandleSoundEffects()
protected void CleanSoundEffects()
protected void CleanVisualEffects()

weak jet stream

References array.Count(), StopParticle(), StopParticle()
Show 3 more, m_PipeBrokenParticles, m_ValveParticles, and VALVES_COUNT
protected void SyncValveVariables()
protected int PackArrayOfBoolStatesIntoBits(array<bool> pStates)
References array.Count()
Referenced by SyncValveVariables()
protected array<bool> UnpackBitsToArrayOfBoolStates(int pPackedBits, int pArrayLength)
References array.Insert()