#include <unit.h>
Collaboration diagram for a_unit:
Public Attributes | |
short | type |
int | id |
char * | name |
int | number |
a_unit_view * | uview |
a_image_family * | imf |
char * | image_name |
short | x |
short | y |
short | z |
a_side * | side |
a_side * | origside |
short | hp |
short | hp2 |
short | cp |
short | cxp |
short | morale |
a_unit * | transport |
SideMask | tracking |
long * | supply |
short | s_flow |
short | s_conn |
short * | tooling |
short * | opinions |
a_actorstate * | act |
a_plan * | plan |
a_unit_extras * | extras |
char * | aihook |
a_unit * | occupant |
a_unit * | nexthere |
a_unit * | prev |
a_unit * | next |
a_unit * | unext |
short | prevx |
short | prevy |
Obj * | transport_id |
short | flags |
short | size |
short | reach |
short | usedcells |
short | maxcells |
short | curadvance |
long | population |
short * | production |
short | cp_stash |
short | researchdone |
short | busy |
int | creation_id |
The Unit structure should be small, because there may be many of them. Unit semantics go in this structure, while unit brains go into the act/plan. Test: a unit that is like a rock and can't do anything at all just needs basic slots, plan needn't be allocated. Another test: unit should still function correctly after its current plan has been destroyed and replae`d with another.
|
the unit's current actor state |
|
used by AI to keep info about this unit |
|
Broadcasted action that has not yet executed.
|
|
state of construction |
|
CP's recovered from incomplete build tasks. |
|
Id of unit's unbuilt creation. |
|
Advance currently being researched. |
|
combat experience |
|
pointer to optional stuff |
|
assorted flags |
|
how much more damage each part can take |
|
buffer for next value of hp |
|
truly unique id number |
|
the name of the image, if given |
|
the image family |
|
Max number of cells that unit can use |
|
morale |
|
the name, if given |
|
next unit in list of side's units |
|
pointer to fellow occupant |
|
semi-unique number |
|
pointer to first unit being carried |
|
opinion of each side, both own and others |
|
the first side this unit was on |
|
the unit's current plan |
|
Size of units population |
|
previous unit in list of side's units |
|
x co-odinate of where were we last |
|
y co-ordinate of where were we last |
|
Cache of units last production. |
|
Size of the unit's zone of influence |
|
We are done with research for this turn. |
|
how well connected we are to supply zones |
|
how much supply we received this turn |
|
whose side this unit is on |
|
Abstract size of the unit |
|
how much supply we're carrying |
|
level of preparation for construction |
|
which sides always see us (bit vector) |
|
pointer to transporting unit if any |
|
read-in id of transport |
|
type |
|
next unit in list of all units |
|
Number of cells actually used by unit |
|
master view of unit |
|
x position of unit in world |
|
y position of unit in world |
|
z position of unit in world |