18class UniversalTemperatureSourceResult
25class UniversalTemperatureSourceTimer :
Timer
55 protected bool m_Active
56 protected ref UniversalTemperatureSourceTimer
m_Timer;
64 m_Settings = pSettings;
66 m_ResultValues =
new UniversalTemperatureSourceResult();
67 m_Timer =
new UniversalTemperatureSourceTimer();
78 pParent.SetUniversalTemperatureSource(
this);
115 return GetTemperatureRaw();
122 return m_ResultValues.m_Temperature;
161 if (pActive && !
m_Timer.IsRunning())
191 lambda.
Execute(settings, m_ResultValues);
201 const string DELIMITER_DATA =
"|";
247 if (
m_Names.Count() - 1 < pIndex)
249 Debug.
Log(
string.Format(
"GetName index: %1 from data of length: %2", pIndex,
m_Names.Count()),
"UniversalTemperatureSourceDebug");
260 Debug.
Log(
string.Format(
"GetValue index: %1 from data of length: %2", pIndex,
m_Values.Count()),
"UniversalTemperatureSourceDebug");
286 for (
int i = 0; i <
m_Pairs.Count(); i++)
299 for (
int i = 0; i <
m_Names.Count(); i++)
protected void ParseKeyPairs()
class UniversalTemperatureSourceSettings m_Temperature
ref array< string > m_Pairs
values parsed from m_Pairs
protected array< string > ParseData()
ref array< string > m_Names
void AddHeader(string header)
void Add(string name, string value)
const string DELIMITER_KEYPAIR
ref array< string > m_Values
names parsed from m_Pairs
override ScriptCallQueue GetCallQueue(int call_category)
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
proto void CallLaterByName(Class obj, string fnName, int delay=0, bool repeat=false, Param params=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
protected bool m_Active protected ref UniversalTemperatureSourceTimer m_Timer
void UniversalTemperatureSource(EntityAI pParent, UniversalTemperatureSourceSettings pSettings, UniversalTemperatureSourceLambdaBase pLambda)
protected ref UniversalTemperatureSourceLambdaBase m_Lambda
void ChangeSettings(UniversalTemperatureSourceSettings pSettings)
float GetTemperatureMax()
void SetDefferedActive(bool pActive, float pSeconds)
float GetTemperatureMin()
void SetActive(bool pActive)
protected ref UniversalTemperatureSourceResult m_ResultValues
void Init(EntityAI pParent)
protected UniversalTemperatureSourceSettings m_Settings
float GetTemperatureRaw()
void ~UniversalTemperatureSource()
void Update(UniversalTemperatureSourceSettings settings, UniversalTemperatureSourceLambdaBase lambda)
original Timer deletes m_params which is unwanted
void SetParams(Param params)
void Execute(UniversalTemperatureSourceSettings pSettings, UniversalTemperatureSourceResult resultValues)
float m_TemperatureMax
min temperature you can get from the TemperatureSource
bool m_Updateable
maximum range where the receiver can get some temperature
bool m_AffectStat
update is called manually (ex. own tick of parent entity)
float m_RangeFull
temperature cap that will limit the return value from GetTemperature method
vector m_Position
if the temperature generated is also set as Temperature Stat on Item itself
bool m_ManualUpdate
if the Update is running periodically
float m_TemperatureMin
how often the Update is ticking
float m_RangeMax
range where the full temperature is given to receiver
float m_TemperatureCap
max temperature you can get from the TemperatureSource
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
proto volatile int CallFunction(Class inst, string function, out void returnVal, void parm)
proto volatile int CallFunctionParams(Class inst, string function, out void returnVal, Class parms)
static proto float Min(float x, float y)
Returns smaller of two given values.
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.