Advanced Strategic Command
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
AiParameter Class Reference

All parameters the AI stores persistently about a unit. More...

#include <baseaiinterface.h>

Inheritance diagram for AiParameter:
Inheritance graph
[legend]

Public Types

enum  Task {
  tsk_nothing, tsk_tactics, tsk_tactwait, tsk_stratwait,
  tsk_wait, tsk_strategy, tsk_serviceRetreat, tsk_move
}
 
enum  Job {
  job_undefined, job_fight, job_supply, job_conquer,
  job_build, job_recon, job_guard, job_script
}
 
typedef vector< AiParameter::JobJobList
 

Public Member Functions

Task getTask ()
 
void setTask (Task t)
 
Job getJob ()
 
void addJob (Job j, bool front=false)
 
void setNextJob ()
 
void restartJobs ()
 
void clearJobs ()
 
void setJob (const JobList &jobs)
 
void setJob (Job j)
 
bool hasJob (Job j)
 
void reset (Vehicle *_unit)
 
void setNewHeight ()
 
void resetTask ()
 
 AiParameter (Vehicle *_unit)
 
void read (tnstream &stream)
 
void write (tnstream &stream)
 
- Public Member Functions inherited from AiValue
void reset (int _valueType)
 
 AiValue (int _valueType)
 
int getValue ()
 
void setValue (int _value)
 
void setAdditionalValue (int _addedValue)
 
void resetAdditionalValue ()
 
void read (tnstream &stream)
 
void write (tnstream &stream)
 

Public Attributes

int lastDamage
 
GameTime damageTime
 
MapCoordinate3D dest
 
int dest_nwid
 
int data
 
bool resetAfterJobCompletion
 
- Public Attributes inherited from AiValue
AiThreat threat
 
int valueType
 

Static Public Attributes

static const int taskNum = 8
 
static const int jobNum = 8
 

Detailed Description

All parameters the AI stores persistently about a unit.

Definition at line 83 of file baseaiinterface.h.

Member Typedef Documentation

Definition at line 90 of file baseaiinterface.h.

Member Enumeration Documentation

Enumerator
job_undefined 
job_fight 
job_supply 
job_conquer 
job_build 
job_recon 
job_guard 
job_script 

Definition at line 89 of file baseaiinterface.h.

Enumerator
tsk_nothing 
tsk_tactics 
tsk_tactwait 
tsk_stratwait 
tsk_wait 
tsk_strategy 
tsk_serviceRetreat 
tsk_move 

Definition at line 88 of file baseaiinterface.h.

Constructor & Destructor Documentation

AiParameter::AiParameter ( Vehicle _unit)

Definition at line 2091 of file gamemap.cpp.

References reset().

Member Function Documentation

void AiParameter::addJob ( Job  j,
bool  front = false 
)

Definition at line 2104 of file gamemap.cpp.

Referenced by setJob().

void AiParameter::clearJobs ( )

Definition at line 2163 of file gamemap.cpp.

Referenced by reset().

Job AiParameter::getJob ( )
inline
Task AiParameter::getTask ( )
inline
bool AiParameter::hasJob ( AiParameter::Job  j)

Definition at line 2130 of file gamemap.cpp.

void AiParameter::read ( tnstream stream)

Definition at line 2054 of file gamemap.cpp.

References AiValue::read(), and tnstream::readInt().

void AiParameter::reset ( Vehicle _unit)
void AiParameter::resetTask ( )

Definition at line 2097 of file gamemap.cpp.

References dest, dest_nwid, MapCoordinate3D::setnum(), and tsk_nothing.

Referenced by reset().

void AiParameter::restartJobs ( )

Definition at line 2158 of file gamemap.cpp.

void AiParameter::setJob ( const JobList jobs)
void AiParameter::setJob ( Job  j)

Definition at line 2117 of file gamemap.cpp.

References addJob().

void AiParameter::setNewHeight ( )

Definition at line 2135 of file gamemap.cpp.

References getFirstBit(), Vehicle::height, and AiValue::reset().

void AiParameter::setNextJob ( )

Definition at line 2153 of file gamemap.cpp.

void AiParameter::setTask ( Task  t)
inline

Definition at line 93 of file baseaiinterface.h.

Referenced by EditAiParam::buttonpressed().

void AiParameter::write ( tnstream stream)

Definition at line 2035 of file gamemap.cpp.

References AiValue::write(), and tnstream::writeInt().

Referenced by Vehicle::write().

Member Data Documentation

GameTime AiParameter::damageTime

Definition at line 107 of file baseaiinterface.h.

int AiParameter::data

Definition at line 111 of file baseaiinterface.h.

Referenced by reset().

MapCoordinate3D AiParameter::dest
int AiParameter::dest_nwid

Definition at line 110 of file baseaiinterface.h.

Referenced by EditAiParam::init(), and resetTask().

const int AiParameter::jobNum = 8
static

Definition at line 87 of file baseaiinterface.h.

Referenced by EditAiParam::buttonpressed(), and VehicleType::runTextIO().

int AiParameter::lastDamage

Definition at line 106 of file baseaiinterface.h.

Referenced by reset().

bool AiParameter::resetAfterJobCompletion

Definition at line 112 of file baseaiinterface.h.

Referenced by EditAiParam::init(), and reset().

const int AiParameter::taskNum = 8
static

Definition at line 86 of file baseaiinterface.h.

Referenced by EditAiParam::buttonpressed().


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