DIFF

class WeatherPhenomenonSource

Weather phenomenon

Constructors 2

private void WeatherPhenomenon()
private void ~WeatherPhenomenon()

Methods 13

proto native EWeatherPhenomenon GetType()

Returns type of this phenomenon.

Referenced by OnBeforeChange()
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.

forecast
Desired forecast value that should be met in given time.
time
A time of the next change (how long it takes in seconds to interpolate to given value).
minDuration
A minimal time in seconds the change will last.
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.

fnMin
Function minimum (in range <0, 1>).
fnMax
Function maximum (in range <0, 1>).
proto native void SetLimits(float fnMin, float fnMax)

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

fnMin
Function minimum (in range <0, 1>).
fnMax
Function maximum (in range <0, 1>).
proto void GetForecastChangeLimits(out float fcMin, out float fcMax)

Reads limits of change when forecast is computed.

fcMin
Forecast change minimum (in range <0, 1>).
fcMax
Forecast change maximum (in range <0, 1>).
proto native void SetForecastChangeLimits(float fcMin, float fcMax)

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

fcMin
Forecast change minimum (in range <0, 1>).
fcMax
Forecast change maximum (in range <0, 1>).
proto void GetForecastTimeLimits(out float ftMin, out float ftMax)

Reads time range in which next forecast can be computed.

ftMin
Minimal number of seconds.
ftMax
Maximal number of seconds.
proto native void SetForecastTimeLimits(float ftMin, float ftMax)

Sets time range in which next forecast can be computed.

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

ftMin
Minimal number of seconds.
ftMax
Maximal number of seconds.
bool OnBeforeChange(float change, float time)

Is called every time the Phenomenon computes new forecast.

change
Computed change of forecast value.
time
Seconds when the next forecast will be computed.

Returns: True when script modifies state of this phenomenon false otherwise.

NoteCalled on server only.