PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
WeatherPhenomenon Class Reference

Private Member Functions

private void WeatherPhenomenon ()
 
private void ~WeatherPhenomenon ()
 
proto native EWeatherPhenomenon GetType ()
 Returns type of this phenomenon.
 
proto native float GetActual ()
 
proto native float GetForecast ()
 Returns a forecast value the phenomenon is heading towards.
 
proto native void Set (float forecast, float time=0, float minDuration=0)
 Sets the forecast.
 
proto native float GetNextChange ()
 Reads the time in seconds when the next forecast will be computed.
 
proto native void SetNextChange (float time)
 Sets the time in seconds when the next forecast will be computed.
 
proto void GetLimits (out float fnMin, out float fnMax)
 Reads limits of this phenomenon.
 
proto native void SetLimits (float fnMin, float fnMax)
 Sets limits of this phenomenon.
 
proto void GetForecastChangeLimits (out float fcMin, out float fcMax)
 Reads limits of change when forecast is computed.
 
proto native void SetForecastChangeLimits (float fcMin, float fcMax)
 Sets limits of change when forecast is computed.
 
proto void GetForecastTimeLimits (out float ftMin, out float ftMax)
 Reads time range in which next forecast can be computed.
 
proto native void SetForecastTimeLimits (float ftMin, float ftMax)
 Sets time range in which next forecast can be computed.
 
bool OnBeforeChange (float change, float time)
 Is called every time the Phenomenon computes new forecast.
 

Detailed Description

Weather phenomenon

Constructor & Destructor Documentation

◆ WeatherPhenomenon()

private void WeatherPhenomenon ( )
inlineprivate

◆ ~WeatherPhenomenon()

private void ~WeatherPhenomenon ( )
inlineprivate

Member Function Documentation

◆ GetActual()

◆ GetForecast()

proto native float GetForecast ( )
private

◆ GetForecastChangeLimits()

proto void GetForecastChangeLimits ( out float  fcMin,
out float  fcMax 
)
private

Reads limits of change when forecast is computed.

Parameters
fcMinForecast change minimum (in range <0, 1>).
fcMaxForecast change maximum (in range <0, 1>).

◆ GetForecastTimeLimits()

proto void GetForecastTimeLimits ( out float  ftMin,
out float  ftMax 
)
private

Reads time range in which next forecast can be computed.

Parameters
ftMinMinimal number of seconds.
ftMaxMaximal number of seconds.

◆ GetLimits()

proto void GetLimits ( out float  fnMin,
out float  fnMax 
)
private

Reads limits of this phenomenon.

Parameters
fnMinFunction minimum (in range <0, 1>).
fnMaxFunction maximum (in range <0, 1>).

◆ GetNextChange()

proto native float GetNextChange ( )
private

Reads the time in seconds when the next forecast will be computed.

◆ GetType()

proto native EWeatherPhenomenon GetType ( )
private

Returns type of this phenomenon.

Referenced by OnBeforeChange().

◆ OnBeforeChange()

bool OnBeforeChange ( float  change,
float  time 
)
inlineprivate

Is called every time the Phenomenon computes new forecast.

Note
Called on server only.
Parameters
changeComputed change of forecast value.
timeSeconds when the next forecast will be computed.
Returns
True when script modifies state of this phenomenon false otherwise.

References g_Game, GetActual(), Weather::GetMissionWeather(), GetType(), Mission::GetWorldData(), and WorldData::WeatherOnBeforeChange().

◆ Set()

proto native void Set ( float  forecast,
float  time = 0,
float  minDuration = 0 
)
private

Sets the forecast.

Parameters
forecastDesired forecast value that should be met in given time.
timeA time of the next change (how long it takes in seconds to interpolate to given value).
minDurationA minimal time in seconds the change will last.

Referenced by DayZIntroScene::DayZIntroScene(), DayZIntroSceneXbox::DayZIntroSceneXbox(), WorldData::Init(), EnochData::Init(), SakhalData::Init(), UIPopupScript::OnChange(), UIPopupScript::OnClick(), UIPopupScript::OnClose(), CGame::OnRPC(), SceneData::SetInitFog(), SceneData::SetInitOvercast(), SceneData::SetInitRain(), WorldData::WeatherOnBeforeChange(), EnochData::WeatherOnBeforeChange(), and SakhalData::WeatherOnBeforeChange().

◆ SetForecastChangeLimits()

proto native void SetForecastChangeLimits ( float  fcMin,
float  fcMax 
)
private

Sets limits of change when forecast is computed.

These limits govern how much the forecast value can change when it is computed by weather controller.

Default values are: fcMin = 0 fcMax = 1

Parameters
fcMinForecast change minimum (in range <0, 1>).
fcMaxForecast change maximum (in range <0, 1>).

Referenced by SakhalData::WeatherOnBeforeChange().

◆ SetForecastTimeLimits()

proto native void SetForecastTimeLimits ( float  ftMin,
float  ftMax 
)
private

Sets time range in which next forecast can be computed.

Default values are: ftMin = 300 (5 minutes) ftMax = 3600 (1 hour)

Parameters
ftMinMinimal number of seconds.
ftMaxMaximal number of seconds.

◆ SetLimits()

proto native void SetLimits ( float  fnMin,
float  fnMax 
)
private

Sets limits of this phenomenon.

Actual value of this phenomenon will be always held in range <fnMin, fnMax>.

Default values are: fnMin = 0 fnMax = 1

Parameters
fnMinFunction minimum (in range <0, 1>).
fnMaxFunction maximum (in range <0, 1>).

Referenced by DayZIntroScene::DayZIntroScene(), DayZIntroSceneXbox::DayZIntroSceneXbox(), SakhalData::Init(), and SakhalData::WeatherOnBeforeChange().

◆ SetNextChange()

proto native void SetNextChange ( float  time)
private

Sets the time in seconds when the next forecast will be computed.


The documentation for this class was generated from the following file: