Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
gmgame.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_GMGAME_H
13#define TT_INCLUDE_GMGAME_H
14#include "gmplugin.h"
15#include "engine_ttdef.h"
16class SSGMGameManager {
17public:
18 static void Init();
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);
42};
43
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;
48};
49
50class SSGM_Log_Scores : public ScriptImpClass {
51 void Created(GameObject *obj);
52 void Timer_Expired(GameObject *obj, int number);
53};
54
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;
64 bool killed;
65};
66
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);
72 bool WasDisarmed;
73 bool WasDetonated;
74};
75
76class SSGM_Powerup_Expire : public ScriptImpClass {
77 void Created(GameObject *obj);
78 void Timer_Expired(GameObject *obj, int number);
79};
80
81class SSGM_Powerup : public ScriptImpClass {
82 void Custom(GameObject *obj, int message, int param, GameObject *sender);
83};
84
85class SSGM_Drop_DNA_Powerup : public ScriptImpClass {
86 void Destroyed(GameObject *obj);
87};
88
89class SSGM_Powerup_SBH : public ScriptImpClass {
90 void Custom(GameObject *obj, int message, int param, GameObject *sender);
91};
92
93class SSGM_Powerup_Havoc : public ScriptImpClass {
94 void Custom(GameObject *obj, int message, int param, GameObject *sender);
95};
96
97class SSGM_Powerup_Deadeye : public ScriptImpClass {
98 void Custom(GameObject *obj, int message, int param, GameObject *sender);
99};
100
101class SSGM_Powerup_BHSniper : public ScriptImpClass {
102 void Custom(GameObject *obj, int message, int param, GameObject *sender);
103};
104
105class SSGM_Powerup_Sakura : public ScriptImpClass {
106 void Custom(GameObject *obj, int message, int param, GameObject *sender);
107};
108
109class SSGM_Powerup_SydneyPower : public ScriptImpClass {
110 void Custom(GameObject *obj, int message, int param, GameObject *sender);
111};
112
113class SSGM_Powerup_Raveshaw : public ScriptImpClass {
114 void Custom(GameObject *obj, int message, int param, GameObject *sender);
115};
116
117class SSGM_Powerup_Mobius : public ScriptImpClass {
118 void Custom(GameObject *obj, int message, int param, GameObject *sender);
119};
120
121class SSGM_Powerup_Mendoza : public ScriptImpClass {
122 void Custom(GameObject *obj, int message, int param, GameObject *sender);
123};
124
125class SSGM_Powerup_GDI_RSoldier : public ScriptImpClass {
126 void Custom(GameObject *obj, int message, int param, GameObject *sender);
127};
128
129class SSGM_Powerup_Nod_RSoldier : public ScriptImpClass {
130 void Custom(GameObject *obj, int message, int param, GameObject *sender);
131};
132
133class SSGM_Powerup_Hotwire : public ScriptImpClass {
134 void Custom(GameObject *obj, int message, int param, GameObject *sender);
135};
136
137class SSGM_Powerup_Technician : public ScriptImpClass {
138 void Custom(GameObject *obj, int message, int param, GameObject *sender);
139};
140
141class SSGM_Powerup_Gunner : public ScriptImpClass {
142 void Custom(GameObject *obj, int message, int param, GameObject *sender);
143};
144
145class SSGM_Powerup_GDI_Sydney : public ScriptImpClass {
146 void Custom(GameObject *obj, int message, int param, GameObject *sender);
147};
148
149class SSGM_Powerup_GDI_Officer : public ScriptImpClass {
150 void Custom(GameObject *obj, int message, int param, GameObject *sender);
151};
152
153class SSGM_Powerup_Nod_Officer : public ScriptImpClass {
154 void Custom(GameObject *obj, int message, int param, GameObject *sender);
155};
156
157class SSGM_Powerup_LCG : public ScriptImpClass {
158 void Custom(GameObject *obj, int message, int param, GameObject *sender);
159};
160
161class SSGM_Powerup_Patch : public ScriptImpClass {
162 void Custom(GameObject *obj, int message, int param, GameObject *sender);
163};
164
165class SSGM_Powerup_Chemwar : public ScriptImpClass {
166 void Custom(GameObject *obj, int message, int param, GameObject *sender);
167};
168
169
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;
213#endif