16#define DISABLED_UNIT 2
17#define DISABLED_BOTH 3
19#define VEHTYPE_GROUND 1
20#define VEHTYPE_FLYING 2
21#define VEHTYPE_NAVAL 3
22#define VEHTYPE_SUPPORT 4
24#include "PurchaseSettingsDefClass.h"
26 UnitInfo(PurchaseSettingsDefClass::TYPE type,
unsigned int pos,
unsigned int preset,
bool alternate) : Type(type), Pos(pos), Preset(preset), Alternate(alternate), Support(false)
30 PurchaseSettingsDefClass::TYPE Type;
45 SimpleDynVecClass<UnitInfo*> Units;
46 SimpleDynVecClass<CreationPos*> Naval_Creation_Pos_Per_Vehicle;
47 int Last_Flying_Landing_Pos;
48 int Last_Naval_Creation_Pos;
52 ObjectCreateHookStruct *OHookStruct;
53 bool Is_In_Vector(SimpleDynVecClass<unsigned int> &Vec,
unsigned int Preset);
54 Vector3 Get_Flying_Landing_Position();
55 GameObject *Get_Naval_Creation_Position(
unsigned int Preset);
60 unsigned int Ground_Limit;
61 unsigned int Flying_Limit;
62 unsigned int Naval_Limit;
63 unsigned int Support_Limit;
64 unsigned int Ground_Amount;
65 unsigned int Flying_Amount;
66 unsigned int Naval_Amount;
67 unsigned int Support_Amount;
68 SimpleDynVecClass<GameObject*> *Naval_Creation_Positions;
69 SimpleDynVecClass<GameObject*> *Flying_Landing_Positions;
70 float Ground_Build_Time[2];
71 float Flying_Build_Time[2];
72 float Naval_Build_Time[2];
73 bool Is_Ground_Building;
74 bool Is_Flying_Building;
75 bool Is_Naval_Building;
77 unsigned int LastFlyVehID;
78 unsigned int LastFlyVehOwner;
80 ExpVehFacClass(
unsigned int team);
82 void Set_Ground_Currently_Building(
bool building);
83 void Set_Flying_Currently_Building(
bool building);
84 void Set_Naval_Currently_Building(
bool building);
85 void Set_Ground_Limit_Reached(
bool Reached);
86 void Set_Flying_Limit_Reached(
bool Reached);
87 void Set_Naval_Limit_Reached(
bool Reached);
88 void Set_Support_Limit_Reached(
bool Reached);
89 UnitInfo *Get_Unit_Info(
unsigned int Preset);
90 void Load(
const char *NavalVehicles,
const char *NavalCreationPresets,GameObject *script,
const char *SupportVehicles = 0);
92 static PurchaseStatus Purchase_Hook(BaseControllerClass *base, GameObject *purchaser,
unsigned int cost,
unsigned int preset,
const char *data);
93 static void Object_Hook(
void *,GameObject *obj);
96extern ExpVehFacClass *ExpVehFac[2];
98class MDB_ExpVehFac_Helipad :
public ScriptImpClass {
99 void Created(GameObject *obj);
100 void Killed(GameObject *obj,GameObject *killer);
101 void Custom(GameObject *obj,
int type,
int param, GameObject *sender);
102 void Destroyed(GameObject *obj);
105class MDB_ExpVehFac_Naval :
public ScriptImpClass {
106 void Created(GameObject *obj);
107 void Killed(GameObject *obj,GameObject *killer);
108 void Custom(GameObject *obj,
int type,
int param, GameObject *sender);
109 void Destroyed(GameObject *obj);
112class MDB_ExpVehFac_Vehicle_Factory :
public ScriptImpClass {
113 void Created(GameObject *obj);
114 void Killed(GameObject *obj,GameObject *killer);
115 void Custom(GameObject *obj,
int type,
int param, GameObject *sender);
116 void Timer_Expired(GameObject *obj,
int number);
117 void Destroyed(GameObject *obj);
120class MDB_ExpVehFac_Cinematic :
public ScriptImpClass {
122 void Created(GameObject *obj);
123 void Timer_Expired(GameObject *obj,
int number);
124 public:
void Register_Auto_Save_Variables();
127class MDB_ExpVehFac_Cinematic_Vehicle :
public ScriptImpClass {
128 void Damaged(GameObject *obj,GameObject *damager,
float amount);
131class MDB_ExpVehFac_Limit :
public ScriptImpClass {
133 void Created(GameObject *obj);
134 void Destroyed(GameObject *obj);
135 public:
void Register_Auto_Save_Variables();