* Move the definition of struct BRAIN_STATS from statsdef.h to stats-db2.tpl
* Make it possible to declare "references" to struct WEAPON by adding a %fetchRowById code block git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5525 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
8344514617
commit
13c4c559c5
|
@ -952,6 +952,68 @@ typedef struct WEAPON_STATS
|
|||
SDWORD iAudioImpactID;
|
||||
} WEAPON_STATS;
|
||||
|
||||
typedef struct BRAIN_STATS
|
||||
{
|
||||
/* BEGIN of inherited "COMPONENT" definition */
|
||||
/* BEGIN of inherited "BASE" definition */
|
||||
/**
|
||||
* Unique ID of the item
|
||||
*/
|
||||
UDWORD ref;
|
||||
|
||||
/**
|
||||
* Unique language independant name that can be used to identify a specific
|
||||
* stats instance
|
||||
*
|
||||
* Unique across all instances
|
||||
*/
|
||||
char* pName;
|
||||
/* END of inherited "BASE" definition */
|
||||
/**
|
||||
* Power required to build this component
|
||||
*/
|
||||
UDWORD buildPower;
|
||||
|
||||
/**
|
||||
* Build points (which are rate-limited in the construction units) required
|
||||
* to build this component.
|
||||
*/
|
||||
UDWORD buildPoints;
|
||||
|
||||
/**
|
||||
* Weight of this component
|
||||
*/
|
||||
UDWORD weight;
|
||||
|
||||
/**
|
||||
* Body points of this component
|
||||
*/
|
||||
UDWORD body;
|
||||
|
||||
/**
|
||||
* Indicates whether this component is "designable" and can thus be used in
|
||||
* the design screen.
|
||||
*/
|
||||
bool designable;
|
||||
|
||||
/**
|
||||
* The "base" IMD model representing this component in 3D space.
|
||||
*
|
||||
* This field is optional and can be NULL to indicate that it has no value
|
||||
*/
|
||||
iIMDShape* pIMD;
|
||||
/* END of inherited "COMPONENT" definition */
|
||||
/**
|
||||
* Program capacity
|
||||
*/
|
||||
UDWORD progCap;
|
||||
|
||||
/**
|
||||
* Weapon stats associated with this brain - for Command Droids
|
||||
*/
|
||||
WEAPON_STATS* psWeaponStat;
|
||||
} BRAIN_STATS;
|
||||
|
||||
typedef struct CONSTRUCT_STATS
|
||||
{
|
||||
/* BEGIN of inherited "COMPONENT" definition */
|
||||
|
|
|
@ -283,6 +283,9 @@ end;
|
|||
struct WEAPON
|
||||
%inherit COMPONENT;
|
||||
%nomacro;
|
||||
%fetchRowById Row Id
|
||||
$Row = statsGetWeapon($Id - 1);
|
||||
end;
|
||||
|
||||
# Max distance to target for short range shot
|
||||
UDWORD shortRange;
|
||||
|
@ -383,6 +386,17 @@ struct WEAPON
|
|||
SDWORD iAudioImpactID;
|
||||
end;
|
||||
|
||||
struct BRAIN
|
||||
%inherit COMPONENT;
|
||||
%nomacro;
|
||||
|
||||
# Program capacity
|
||||
UDWORD progCap;
|
||||
|
||||
# Weapon stats associated with this brain - for Command Droids
|
||||
struct WEAPON psWeaponStat;
|
||||
end;
|
||||
|
||||
struct CONSTRUCT
|
||||
%inherit COMPONENT;
|
||||
%nomacro;
|
||||
|
|
|
@ -59,15 +59,6 @@ typedef struct _body_stats
|
|||
iIMDShape* pFlameIMD; ///< pointer to which flame graphic to use - for VTOLs only at the moment
|
||||
} BODY_STATS;
|
||||
|
||||
typedef struct _brain_stats
|
||||
{
|
||||
/* Common stats */
|
||||
STATS_COMPONENT;
|
||||
|
||||
UDWORD progCap; ///< Program capacity
|
||||
struct WEAPON_STATS* psWeaponStat; ///< weapon stats associated with this brain - for Command Droids
|
||||
} BRAIN_STATS;
|
||||
|
||||
/************************************************************************************
|
||||
* Additional stats tables
|
||||
************************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue