12#ifndef TT_INCLUDE_GMGAME_H
13#define TT_INCLUDE_GMGAME_H
15#include "engine_ttdef.h"
16class SSGMGameManager {
19 static void Shutdown();
20 static bool ChatHook(
int PlayerID,TextMessageEnum Type,
const wchar_t *Message,
int recieverID);
21 static bool RadioHook(
int PlayerType,
int PlayerID,
int AnnouncementID,
int IconID, AnnouncementEnum AnnouncementType);
22 static void ObjectCreateHook(
void *data,GameObject *obj);
23 static void LoadLevelHook();
24 static void PreLoadLevelHook();
25 static void GameOverHook();
26 static void ConsoleOutputHook(
const char *output);
27 static void LogFileHook(
const char *output);
28 static bool RefillHook(GameObject *purchaser);
29 static void PlayerJoinHook(
int PlayerID,
const char *PlayerName);
30 static void PlayerLeaveHook(
int PlayerID);
31 static PurchaseStatus PowerupPurchaseHook(BaseControllerClass *base,GameObject *purchaser,
unsigned int cost,
unsigned int preset,
const char *data);
32 static PurchaseStatus VehiclePurchaseHook(BaseControllerClass *base,GameObject *purchaser,
unsigned int cost,
unsigned int preset,
const char *data);
33 static PurchaseStatus CharacterPurchaseHook(BaseControllerClass *base,GameObject *purchaser,
unsigned int cost,
unsigned int preset,
const char *data);
34 static void ReadConfig(INIClass *SSGMIni = NULL);
35 static void ReadMapConfig();
36 static void FreeData();
37 static void FreeMapData();
38 static void ThinkHook();
39 static bool StockDamageHook(PhysicalGameObj* damager, PhysicalGameObj* target,
float damage, uint warheadId);
40 static bool TtDamageHook(PhysicalGameObj* damager, PhysicalGameObj* target,
const AmmoDefinitionClass* ammo,
const char* bone);
41 static void DialogHook(
int PlayerID,
int DialogID,
int ControlID, DialogMessageType MessageType);
44class SSGM_Random_Weather :
public ScriptImpClass {
45 void Created(GameObject *obj);
46 void Timer_Expired(GameObject *obj,
int number);
47 float Range, CurrentClouds, CurrentRain, CurrentLightning, CurrentSnow, CurrentAsh, CurrentWind, FogEnd;
50class SSGM_Log_Scores :
public ScriptImpClass {
51 void Created(GameObject *obj);
52 void Timer_Expired(GameObject *obj,
int number);
55class SSGM_Log_Beacon :
public ScriptImpClass {
56 void Created(GameObject *obj);
57 void Destroyed(GameObject *obj);
58 void Killed(GameObject *obj, GameObject *shooter);
59 void Damaged(GameObject *obj, GameObject *damager,
float damage);
60 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
61 void Timer_Expired(GameObject *obj,
int number);
62 public:
void Register_Auto_Save_Variables();
63 bool triggerrepairing;
67class SSGM_Log_Mine :
public ScriptImpClass {
68 void Destroyed(GameObject *obj);
69 void Killed(GameObject *obj, GameObject *shooter);
70 void Damaged(GameObject *obj, GameObject *damager,
float damage);
71 void Created(GameObject *obj);
76class SSGM_Powerup_Expire :
public ScriptImpClass {
77 void Created(GameObject *obj);
78 void Timer_Expired(GameObject *obj,
int number);
81class SSGM_Powerup :
public ScriptImpClass {
82 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
85class SSGM_Drop_DNA_Powerup :
public ScriptImpClass {
86 void Destroyed(GameObject *obj);
89class SSGM_Powerup_SBH :
public ScriptImpClass {
90 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
93class SSGM_Powerup_Havoc :
public ScriptImpClass {
94 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
97class SSGM_Powerup_Deadeye :
public ScriptImpClass {
98 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
101class SSGM_Powerup_BHSniper :
public ScriptImpClass {
102 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
105class SSGM_Powerup_Sakura :
public ScriptImpClass {
106 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
109class SSGM_Powerup_SydneyPower :
public ScriptImpClass {
110 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
113class SSGM_Powerup_Raveshaw :
public ScriptImpClass {
114 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
117class SSGM_Powerup_Mobius :
public ScriptImpClass {
118 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
121class SSGM_Powerup_Mendoza :
public ScriptImpClass {
122 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
125class SSGM_Powerup_GDI_RSoldier :
public ScriptImpClass {
126 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
129class SSGM_Powerup_Nod_RSoldier :
public ScriptImpClass {
130 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
133class SSGM_Powerup_Hotwire :
public ScriptImpClass {
134 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
137class SSGM_Powerup_Technician :
public ScriptImpClass {
138 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
141class SSGM_Powerup_Gunner :
public ScriptImpClass {
142 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
145class SSGM_Powerup_GDI_Sydney :
public ScriptImpClass {
146 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
149class SSGM_Powerup_GDI_Officer :
public ScriptImpClass {
150 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
153class SSGM_Powerup_Nod_Officer :
public ScriptImpClass {
154 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
157class SSGM_Powerup_LCG :
public ScriptImpClass {
158 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
161class SSGM_Powerup_Patch :
public ScriptImpClass {
162 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
165class SSGM_Powerup_Chemwar :
public ScriptImpClass {
166 void Custom(GameObject *obj,
int message,
int param, GameObject *sender);
170SCRIPTS_API
const char *Get_Translated_Preset_Name_Ex(GameObject *obj);
171SCRIPTS_API
const char *Get_Translated_Preset_Name_Ini(GameObject *obj);
172SCRIPTS_API
const char *Get_Translated_Definition_Name_Ini(
const char *preset);
173SCRIPTS_API
void Log_Killed_Message(GameObject *obj, GameObject *killer,
const char *objectType);
174SCRIPTS_API
void RegisterEvent(EventType evt,Plugin *plugin);
175SCRIPTS_API
void UnregisterEvent(EventType evt,Plugin *plugin);
176SCRIPTS_API
bool IsPresetDisabled(
int preset);
177SCRIPTS_API
void Print_C4(GameObject *Player);
178SCRIPTS_API
extern bool BuildingDeathPages;
179SCRIPTS_API
extern unsigned int RefillLimit;
180SCRIPTS_API
extern int WeatherType;
181SCRIPTS_API
extern int MapWeatherType;
182SCRIPTS_API
extern int ForceTeam;
183SCRIPTS_API
extern int MapForceTeam;
184SCRIPTS_API
extern bool InvincibleBuildings;
185SCRIPTS_API
extern bool DisableBeacons;
186SCRIPTS_API
extern bool DisableBaseDefenses;
187SCRIPTS_API
extern bool DisablePowerPlants;
188SCRIPTS_API
extern bool DisableRefineries;
189SCRIPTS_API
extern bool DisableSoldierFactories;
190SCRIPTS_API
extern bool DisableVehicleFactories;
191SCRIPTS_API
extern bool DisableRepairPads;
192SCRIPTS_API
extern bool DisableCommCenters;
193SCRIPTS_API
extern bool FreePurchases;
194SCRIPTS_API
extern bool DisableExtraWeapons;
195SCRIPTS_API
extern bool BuildingDeathPages;
196SCRIPTS_API
extern bool VehicleOwnership;
197SCRIPTS_API
extern bool DisableConstructionYards;
198SCRIPTS_API
extern bool DisableShrines;
199SCRIPTS_API
extern bool DisableHelipads;
200SCRIPTS_API
extern bool DisableSpecials;
201SCRIPTS_API
extern bool DisableTechCenters;
202SCRIPTS_API
extern bool DisableNavalFactories;
203SCRIPTS_API
extern bool ExtraKillMessages;
204SCRIPTS_API
extern bool PlayPowerupSounds;
205SCRIPTS_API
extern bool PlayQuakeSounds;
206SCRIPTS_API
extern bool SBHCanPickupDropWeapons;
207SCRIPTS_API
extern bool CharactersDropDNA;
208SCRIPTS_API
extern bool ShowExtraMessages;
209SCRIPTS_API
extern float PowerupExpireTime;
210SCRIPTS_API
extern float WreckDestroySelfTime;
211SCRIPTS_API
extern bool VehicleLockIcons;
212SCRIPTS_API
extern bool MapExtraKillMessages;