Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
NavalFactoryGameObj.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#ifndef TT_INCLUDE__NAVALFACTORYGAMEOBJ_H
13#define TT_INCLUDE__NAVALFACTORYGAMEOBJ_H
14#include "BuildingGameObj.h"
15class NavalFactoryGameObjDef;
16class SimpleGameObj;
17class ScriptZoneGameObjDef;
18class NavalFactoryGameObj : public BuildingGameObj
19{
20public:
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);
33 void Think (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)
47 {
48 IsBusy = busy;
49 Set_Object_Dirty_Bit(NetworkObjectClass::BIT_RARE,true);
50 }
51private:
52 void Load_Variables (ChunkLoadClass &cload);
53 bool IsBusy;
54 bool IsDisabled;
55 float Timer;
56 int DefinitionID;
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;
72};
73
74#endif