Planeshift
|
Given to the NPC upon ever tick of game minute. More...
#include <perceptions.h>
Public Member Functions | |
virtual Perception * | MakeCopy () |
Make a copy of this perception. More... | |
virtual bool | ShouldReact (Reaction *reaction, NPC *npc) |
Check if this perception should react to a reaction. More... | |
TimePerception (int hour, int minute, int year, int month, int day) | |
virtual csString | ToString (NPC *npc) |
Get a text description of the perception. More... | |
virtual | ~TimePerception () |
![]() | |
virtual void | ExecutePerception (NPC *npc, float weight) |
All preconditions has been checked, now excecute the perception. More... | |
virtual bool | GetLocation (csVector3 &pos, iSector *§or) |
Get a location assosiated with the perception. More... | |
virtual const csString & | GetName () const |
Get the name of the perception. More... | |
virtual float | GetRadius () const |
Get the radius of the perception. More... | |
virtual gemNPCObject * | GetTarget () |
Some perception has a target/source. More... | |
const csString & | GetType () const |
Get the type of the perception. More... | |
Perception (const char *name) | |
Constructor. More... | |
Perception (const char *name, const char *type) | |
Constructor. More... | |
void | SetType (const char *type) |
Set the type of the perception. More... | |
virtual | ~Perception () |
Destructor. More... | |
Static Public Member Functions | |
static void | NormalizeReaction (Reaction *reaction) |
Called from Reaction for time types to normalize the values used. More... | |
Protected Attributes | |
int | gameDay |
int | gameHour |
int | gameMinute |
int | gameMonth |
int | gameYear |
![]() | |
csString | name |
The name of this perception. More... | |
csString | type |
Type used by perceptions. Usally they correspond to the same value in a reaction. More... | |
Given to the NPC upon ever tick of game minute.
Perception to allow reaction based on time. Any combination of hours,minutes,years,months,days can be matched.
Definition at line 180 of file perceptions.h.
Definition at line 186 of file perceptions.h.
|
inlinevirtual |
Definition at line 188 of file perceptions.h.
|
virtual |
|
static |
Called from Reaction for time types to normalize the values used.
This to allow 1.5hour random values.
Check if this perception should react to a reaction.
reaction | The reaction to check for. |
npc | The NPC that might receive this. |
Reimplemented from Perception.
|
virtual |
Get a text description of the perception.
Reimplemented from Perception.
|
protected |
Definition at line 183 of file perceptions.h.
|
protected |
Definition at line 183 of file perceptions.h.
|
protected |
Definition at line 183 of file perceptions.h.
|
protected |
Definition at line 183 of file perceptions.h.
|
protected |
Definition at line 183 of file perceptions.h.