Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
BaseControllerClass.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_BASECONTROLLERCLASS_H
13#define TT_INCLUDE_BASECONTROLLERCLASS_H
14#include "NetworkObjectClass.h"
15#include "OBBoxClass.h"
16#include "Engine_Vector.h"
17#include "scripts.h"
18class BuildingGameObj;
19class VehicleGameObj;
20class BeaconGameObj;
21enum RadarModeEnum {
22 RADAR_NOBODY,
23 RADAR_TEAMMATES,
24 RADAR_ALL,
25};
26class BaseControllerClass :
27 public NetworkObjectClass
28{
29
30private:
31
32 float OperationTimeFactor; // 06B4
33 int team; // 06B8
34 DynamicVectorClass<BuildingGameObj*> BuildingList; // 06BC
35 bool IsPowered; // 06D4
36 bool CanGenerateSoldiers; // 06D5
37 bool CanGenerateVehicles; // 06D6
38 bool RadarEnabled; // 06D7
39 bool BaseDestroyed; // 06D8
40 bool BeaconDestroyedBase; // 06D9
41 OBBoxClass BeaconZone; // 06DC
42 unsigned int AnnouncementInterval; // 0718
43 float AnnouncementTime; // 071C
44 float AnnouncementTime2; // 0720
45 unsigned int Unknown1; // 0724
46 unsigned int Unknown2; // 0728
47
48public:
49 BaseControllerClass();
50 ~BaseControllerClass();
51 void Import_Occasional(BitStreamClass &BitStream);
52 void Export_Occasional(BitStreamClass &BitStream);
53 void Set_Delete_Pending()
54 {
55 }
56 void Delete()
57 {
58 }
59 static BaseControllerClass *Find_Base(int Team);
60 VehicleGameObj *Get_Harvester_Vehicle();
61 BuildingGameObj *Find_Building(unsigned int Type);
62 void Power_Base(bool Power);
63 void Set_Can_Generate_Soldiers(bool CanGenerate);
64 void Set_Can_Generate_Vehicles(bool CanGenerate);
65 void Set_Base_Destroyed(bool BaseDesrtoyed);
66 void Destroy_Base();
67 void Set_Beacon_Destroyed_Base(bool BeaconDestroyed);
68 void Enable_Radar(bool Enable);
69 void Distribute_Funds_To_Each_Teammate(int Amount);
70 void Distribute_Funds_To_Each_Teammate(float Amount);
71 void On_Vehicle_Generated(VehicleGameObj *);
72 void On_Beacon_Warning(BeaconGameObj* beacon);
73 void Request_Harvester(int harvesterDefinitionId);
74 void Check_Radar();
75 static BaseControllerClass *Find_Base_For_Star();
76 void On_Beacon_Armed(BeaconGameObj *);
77 void On_Beacon_Disarmed(BeaconGameObj *);
78 void Add_Building(BuildingGameObj *b);
79 void On_Building_Damaged(BuildingGameObj *);
80 void On_Building_Destroyed(BuildingGameObj *);
81 void On_Building_Revived(BuildingGameObj *);
82 void On_Vehicle_Delivered(VehicleGameObj *);
83 void On_Vehicle_Damaged(VehicleGameObj *);
84 void On_Vehicle_Destroyed(VehicleGameObj *);
85 void Check_Base_Power();
86 void Check_Vehicle_Factory();
87 void Play_Announcement(int announcement);
88 bool Can_Build_Air();
89 bool Can_Build_Ground();
90 bool Can_Build_Naval();
91 void Check_Prerequisites();
92
93 bool Is_Base_Powered() const
94 {
95 return IsPowered;
96 }
97 float Get_Operation_Time_Factor() const
98 {
99 return OperationTimeFactor;
100 }
101 bool Can_Generate_Soldiers() const
102 {
103 return CanGenerateSoldiers;
104 }
105 bool Can_Generate_Vehicles() const
106 {
107 return CanGenerateVehicles;
108 }
109 int Get_Player_Type() const
110 {
111 return team;
112 }
113 bool Is_Base_Destroyed() const
114 {
115 return BaseDestroyed;
116 }
117 bool Did_Beacon_Destroy_Base() const
118 {
119 return BeaconDestroyedBase;
120 }
121 const OBBoxClass& Get_Beacon_Zone()
122 {
123 return BeaconZone;
124 }
125 bool Is_Radar_Enabled() const
126 {
127 return RadarEnabled;
128 }
129 DynamicVectorClass<BuildingGameObj*> &Get_Building_List()
130 {
131 return BuildingList;
132 }
133 bool Are_All_Buildings_Destroyed();
134 void Initialize(int team);
135 void Initialize_Building_List();
136 void Reset_Building_List();
137 //void Notify_Team(BaseControllerClass::Notification,BuildingConstants::BuildingType);
138 void Set_Base_Powered(bool onoff);
139 void Set_Operation_Time_Factor(float time);
140 void Think();
141 void Shutdown();
142}; // 072C
143
144#endif