12#ifndef TT_INCLUDE__NAVALFACTORYGAMEOBJ_H
13#define TT_INCLUDE__NAVALFACTORYGAMEOBJ_H
14#include "BuildingGameObj.h"
15class NavalFactoryGameObjDef;
17class ScriptZoneGameObjDef;
18class NavalFactoryGameObj :
public BuildingGameObj
21 NavalFactoryGameObj (
void);
22 ~NavalFactoryGameObj (
void);
23 virtual void Init(
void );
24 void Init (
const NavalFactoryGameObjDef & definition);
25 SCRIPTS_API
const NavalFactoryGameObjDef & Get_Definition (
void)
const;
26 NavalFactoryGameObj * As_NavalFactoryGameObj (
void) {
return this; }
27 bool Save (ChunkSaveClass &csave);
28 bool Load (ChunkLoadClass &cload);
29 const PersistFactoryClass & Get_Factory (
void)
const;
30 void CnC_Initialize (BaseControllerClass *base);
31 void On_Destroyed (
void);
32 void On_Revived (
void);
34 bool Is_Available (
void)
const {
return (IsBusy ==
false) && (IsDestroyed ==
false) && (IsDisabled ==
false); }
35 bool Can_Spawn(
int definition_id);
36 bool Is_Available_For_Purchase (
void)
const;
37 bool Is_Busy (
void)
const {
return IsBusy; }
38 bool Is_Disabled (
void)
const {
return IsDisabled; }
39 void Set_Disabled(
bool disabled) { IsDisabled = disabled; Set_Object_Dirty_Bit (BIT_RARE,
true);}
40 int Get_Team_Vehicle_Count(
void)
const;
41 static void Set_Max_Vehicles_Per_Team(
int max) { MaxVehiclesPerTeam = max; }
42 static int Get_Max_Vehicles_Per_Team(
void) {
return MaxVehiclesPerTeam; }
43 void Import_Rare (BitStreamClass &packet);
44 void Export_Rare (BitStreamClass &packet);
45 void Create_Vehicle(
int defintion_id,SoldierGameObj * player);
46 void Set_Busy(
bool busy)
49 Set_Object_Dirty_Bit(NetworkObjectClass::BIT_RARE,
true);
52 void Load_Variables (ChunkLoadClass &cload);
57 ReferencerClass Purchaser;
58 ScriptZoneGameObj *SpawnPos;
59 ScriptZoneGameObjDef *ConstructionZone1Def;
60 DynamicVectorClass<ScriptZoneGameObj *> ConstructionZone1Instances;
61 ScriptZoneGameObjDef *ConstructionZone2Def;
62 DynamicVectorClass<ScriptZoneGameObj *> ConstructionZone2Instances;
63 ScriptZoneGameObjDef *ConstructionZone3Def;
64 DynamicVectorClass<ScriptZoneGameObj *> ConstructionZone3Instances;
65 ScriptZoneGameObjDef *ConstructionZone4Def;
66 DynamicVectorClass<ScriptZoneGameObj *> ConstructionZone4Instances;
67 ScriptZoneGameObjDef *ConstructionZone5Def;
68 DynamicVectorClass<ScriptZoneGameObj *> ConstructionZone5Instances;
69 ScriptZoneGameObjDef *ConstructionZone6Def;
70 DynamicVectorClass<ScriptZoneGameObj *> ConstructionZone6Instances;
71 static int MaxVehiclesPerTeam;