12#ifndef TT_INCLUDE__VEHICLEFACTORYGAMEOBJ_H
13#define TT_INCLUDE__VEHICLEFACTORYGAMEOBJ_H
15#include "BuildingGameObj.h"
17#include "OBBoxClass.h"
18class VehicleFactoryGameObjDef;
19class VehicleFactoryGameObj :
public BuildingGameObj
22 VehicleFactoryGameObj (
void);
23 ~VehicleFactoryGameObj (
void);
24 virtual void Init(
void );
25 void Init (
const VehicleFactoryGameObjDef & definition);
26 SCRIPTS_API
const VehicleFactoryGameObjDef & Get_Definition (
void)
const;
27 VehicleFactoryGameObj * As_VehicleFactoryGameObj (
void) {
return this; }
28 bool Save (ChunkSaveClass &csave);
29 bool Load (ChunkLoadClass &cload);
30 const PersistFactoryClass & Get_Factory (
void)
const;
31 void CnC_Initialize (BaseControllerClass *base);
32 void On_Destroyed (
void);
33 void On_Revived (
void);
35 bool Is_Available (
void)
const {
return !IsBusy && !IsDestroyed && !IsDisabled && !GeneratingVehicleID && !Vehicle; }
36 bool Is_Available_For_Purchase (
void)
const;
37 bool Is_Busy (
void)
const {
return IsBusy; }
38 bool Is_Disabled (
void)
const {
return IsDisabled != 0; }
39 void Set_Disabled(
bool disabled) { IsDisabled = disabled; Set_Object_Dirty_Bit (BIT_RARE,
true);}
40 int Get_Team_Vehicle_Count(
void)
const;
41 bool SCRIPTS_API Request_Vehicle (
int defintion_id,
float generation_time,SoldierGameObj * player = NULL);
42 const Matrix3D & Get_Creation_TM (
void) {
return CreationTM; }
43 void Set_Creation_TM (
const Matrix3D &tm) { CreationTM = tm; }
44 void Import_Rare (BitStreamClass &packet);
45 void Export_Rare (BitStreamClass &packet);
46 static void Set_Max_Vehicles_Per_Team(
int max) { MaxVehiclesPerTeam = max; }
47 static int Get_Max_Vehicles_Per_Team(
void) {
return MaxVehiclesPerTeam; }
48 void Set_Busy(
bool busy)
51 Set_Object_Dirty_Bit(NetworkObjectClass::BIT_RARE,
true);
54 void Load_Variables (ChunkLoadClass &cload);
55 virtual void Destroy_Blocking_Objects (
void);
56 void Deliver_Vehicle(
void);
57 VehicleGameObj * Create_Vehicle (
void);
58 virtual void Begin_Generation (
void) {};
59 virtual void On_Generation_Complete (
void);
60 ReferencerClass Vehicle;
62 OBBoxClass GeneratingRegion;
64 int GeneratingVehicleID;
67 ReferencerClass Purchaser;
69 int LastFlyingDeliveryPath;
71 static int MaxVehiclesPerTeam;