44 virtual void SpawnKey(
string,
string);
77 virtual void Save(
float);
82 virtual void Restore(
string,
string);
91 virtual void Input(entity,
string,
string);
119 nonvirtual
void SaveFloat(
float,
string,
float);
121 nonvirtual
void SaveInt(
float,
string,
int);
123 nonvirtual
void SaveString(
float,
string,
string);
125 nonvirtual
void SaveVector(
float,
string,vector);
127 nonvirtual
void SaveBool(
float,
string,
bool);
129 nonvirtual
void SaveEntity(
float,
string,entity);
152 nonvirtual
int ReadInt(
string);
167 nonvirtual
float GetTime(
void);
173 nonvirtual
void DebugInt(
string,
int);
184 string m_strSpawnData;
186 string m_strOnTrigger;
193 string m_strModelEventCB;
200_NSEntLog(
string className,
string functionName,
float edictNum,
string warnMessage)
203 print(sprintf(
"^9%f ^7%s (%d)^7: %s\n", time, className, edictNum, warnMessage));
205 print(sprintf(
"^7%s (%d)^7: %s\n", className, edictNum, warnMessage));
209_NSEntWarning(
string className,
string functionName,
float edictNum,
string warnMessage)
212 print(sprintf(
"^9%f ^3%s (%d)^7: %s\n", time, functionName, edictNum, warnMessage));
214 print(sprintf(
"^3%s (%d)^7: %s\n", functionName, edictNum, warnMessage));
218_NSEntError(
string className,
string functionName,
float edictNum,
string warnMessage)
221 print(sprintf(
"^9%f ^1%s (id: %d)^7: %s\n", time, functionName, edictNum, warnMessage));
223 print(sprintf(
"^1%s (id: %d)^7: %s\n", functionName, edictNum, warnMessage));
229#define EntLog(...) if (autocvar_g_logLevel >= LOGLEVEL_DEBUG) _NSEntLog(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__))
235#define EntWarning(...) if (autocvar_g_logLevel >= LOGLEVEL_WARNINGS) _NSEntWarning(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__))
241#define EntError(...) if (autocvar_g_logLevel >= LOGLEVEL_ERRORS) _NSEntError(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__))
void _NSEntWarning(string className, string functionName, float edictNum, string warnMessage)
Definition: NSIO.h:209
void _NSEntError(string className, string functionName, float edictNum, string warnMessage)
Definition: NSIO.h:218
void _NSEntLog(string className, string functionName, float edictNum, string warnMessage)
Definition: NSIO.h:200
bool _mapspawned
Definition: NSIO.h:197
This class is responsible for handling core entity functionality.
Definition: NSIO.h:27
nonvirtual int GetDefInt(string)
Looks up the integer value of a key within this entity's declaration.
Definition: NSIO.qc:102
nonvirtual bool GetDefBool(string)
Looks up the boolean value of a key within this entity's declaration.
Definition: NSIO.qc:96
nonvirtual void SaveFloat(float, string, float)
Saves a floating point key/value pair to a filehandle.
Definition: NSIO.qc:394
nonvirtual bool GetSubDefBool(string, string)
Like GetDefBool, but queries a specified def, falling back to reading from our own if it's not define...
Definition: NSIO.qc:154
nonvirtual void SaveEntity(float, string, entity)
Saves an entity id key/value pair to a filehandle.
Definition: NSIO.qc:418
nonvirtual int GetSubDefInt(string, string)
Like GetDefInt, but queries a specified def, falling back to reading from our own if it's not defined...
Definition: NSIO.qc:160
nonvirtual float GetDefAct(string)
Looks up a sequence from an act of a key within this entity's declaration.
Definition: NSIO.qc:63
virtual void Respawn(void)
Server: Called when the entity first spawns or when game-logic requests the entity to return to its o...
Definition: NSIO.qc:42
nonvirtual float GetDefFloat(string)
Looks up the floating-point value of a key within this entity's declaration.
Definition: NSIO.qc:90
nonvirtual void DebugVector(string, vector)
Debug print for a given vector.
Definition: NSIO.qc:918
void NSIO(void)
Definition: NSIO.qc:18
nonvirtual vector GetDefVector(string)
Looks up the integer value of a key within this entity's declaration.
Definition: NSIO.qc:84
nonvirtual bool GetSpawnBool(string)
Returns the boolean value of a named key in the entity's spawn data.
Definition: NSIO.qc:224
nonvirtual void SaveInt(float, string, int)
Saves a integer key/value pair to a filehandle.
Definition: NSIO.qc:400
nonvirtual int GetSpawnInt(string)
Returns the integer value of a named key in the entity's spawn data.
Definition: NSIO.qc:236
nonvirtual float GetSpawnFloat(string)
Returns the floating-point value of a named key in the entity's spawn data.
Definition: NSIO.qc:230
nonvirtual vector ReadVector(string)
Returns a vector from a string.
Definition: NSIO.qc:205
nonvirtual float GetTime(void)
Get the level time the entity finds itself in.
Definition: NSIO.qc:891
virtual void Input(entity, string, string)
Called when we are being prompted by another object/function with an input message.
Definition: NSIO.qc:361
nonvirtual string GetSubDefString(string, string)
Like GetDefString, but queries a specified def, falling back to reading from our own if it's not defi...
Definition: NSIO.qc:129
virtual void Spawned(void)
Called when the entity is fulled initialized.
Definition: NSIO.qc:48
nonvirtual vector GetSubDefVector(string, string)
Like GetDefVector, but queries a specified def, falling back to reading from our own if it's not defi...
Definition: NSIO.qc:142
virtual void Restore(string, string)
Similar to NSIO::SpawnKey but for save-game fields.
Definition: NSIO.qc:530
nonvirtual int ReadInt(string)
Returns an integer value from a string.
Definition: NSIO.qc:181
nonvirtual string CreateOutput(string)
Called at the end of setting up an entity's output field.
Definition: NSIO.qc:293
nonvirtual void DebugEntity(string, entity)
Debug print for a given entity.
Definition: NSIO.qc:923
virtual void Save(float)
Handles saving a copy of this entity to a given filehandle.
Definition: NSIO.qc:427
nonvirtual void DebugBool(string, bool)
Debug print for a given boolean.
Definition: NSIO.qc:898
nonvirtual void DebugFloat(string, float)
Debug print for a given float.
Definition: NSIO.qc:903
nonvirtual void SaveBool(float, string, bool)
Saves a boolean key/value pair to a filehandle.
Definition: NSIO.qc:388
nonvirtual void UseOutput(entity, string)
Triggers an output field that has been created beforehand.
Definition: NSIO.qc:272
virtual void RestoreComplete(void)
Called when the entity has been successfully restored from a savegame file.
Definition: NSIO.qc:827
nonvirtual void DebugString(string, string)
Debug print for a given string.
Definition: NSIO.qc:913
nonvirtual string PrepareOutput(string, string)
Prepares an output field.
Definition: NSIO.qc:351
nonvirtual entity GetSpawnEntity(string, entity)
Returns an entity of a named key in the entity's spawn data.
Definition: NSIO.qc:263
nonvirtual float ReadFloat(string)
Returns a floating point value from a string value.
Definition: NSIO.qc:174
nonvirtual float GetSubDefAct(string, string)
Like GetDefAct, but queries a specified def, falling back to reading from our own if it's not defined...
Definition: NSIO.qc:108
nonvirtual void SaveVector(float, string, vector)
Saves a vector key/value pair to a filehandle.
Definition: NSIO.qc:412
nonvirtual bool CheckOutput(string)
Returns whether the Output is ready, or has done firing - not currently scheduled to fire,...
Definition: NSIO.qc:338
nonvirtual string GetDefString(string)
Looks up the string value of a key within this entity's declaration.
Definition: NSIO.qc:78
nonvirtual string ReadString(string)
Returns a string value from a string (with error checking).
Definition: NSIO.qc:188
nonvirtual vector GetSpawnVector(string)
Returns the vector value of a named key in the entity's spawn data.
Definition: NSIO.qc:257
nonvirtual entity ReadEntity(string)
Reads an entity id from a string and returns the entity.
Definition: NSIO.qc:212
virtual void TransitionComplete(void)
Called when the entity has successfully completed a level transition.
Definition: NSIO.qc:832
nonvirtual void SaveString(float, string, string)
Saves a string key/value pair to a filehandle.
Definition: NSIO.qc:406
nonvirtual void DebugInt(string, int)
Debug print for a given integer.
Definition: NSIO.qc:908
nonvirtual bool ReadBool(string)
Returns a boolean value from a string.
Definition: NSIO.qc:167
nonvirtual string GetSpawnString(string)
Returns the string value of a named key in the entity's spawn data.
Definition: NSIO.qc:242
nonvirtual float GetSubDefFloat(string, string)
Like GetDefFloat, but queries a specified def, falling back to reading from our own if it's not defin...
Definition: NSIO.qc:148
virtual void ParentUpdate(void)
Called when we need to re-align the entity to our parent entity.
Definition: NSIO.qc:837
virtual void SpawnKey(string, string)
This method handles entity key/value pairs on map load.
Definition: NSIO.qc:844
var bool autocvar_g_logTimestamps
Definition: global.h:17