12#ifndef TT_INCLUDE_TEAMPURCHASESETTINGSDEFCLASS_H
13#define TT_INCLUDE_TEAMPURCHASESETTINGSDEFCLASS_H
14#include "Definition.h"
15#include "Engine_String.h"
17#include "TranslateDBClass.h"
19#include "NetworkObjectClass.h"
20#include "ExtendedNetworkObject.h"
21#define PTTEAM(t) (t?0:1)
22class TeamPurchaseSettingsDefClass
abstract :
public DefinitionClass,
public NetworkObjectClass {
28 TeamPurchaseSettingsDefClass();
29 ~TeamPurchaseSettingsDefClass();
30 void setDirtyBitsForClient(
const int clientId);
31 const PersistFactoryClass &Get_Factory()
const;
32 bool Save(ChunkSaveClass &csave);
33 bool Load(ChunkLoadClass &cload);
34 void Load_Variables(ChunkLoadClass &cload);
35 uint32 Get_Class_ID()
const;
36 virtual PersistClass *Create()
const;
37 static SCRIPTS_API TeamPurchaseSettingsDefClass *Get_Definition(TEAM team);
39 virtual void Dump (FileClass &file);
41 DECLARE_EDITABLE(TeamPurchaseSettingsDefClass,DefinitionClass);
45 void Set_Delete_Pending()
48 unsigned int Get_Network_Class_ID ()
const {
return 2005; }
52 void Export_Occasional(BitStreamClass &packet);
53 void Import_Occasional(BitStreamClass &packet);
56 const wchar_t *Get_Enlisted_Name(
int index)
58 if (index >= 0 && (index < 4))
60 return TRANSLATE(stringids[index]);
64 unsigned int Get_Enlisted_String(
int index)
66 return stringids[index];
72 int Get_Enlisted_Cost(
int index)
76 int Get_Enlisted_Definition(
int index)
78 return presetids[index];
80 const char *Get_Enlisted_Texture(
int index)
82 return textures[index];
84 unsigned int Get_Beacon_String()
86 return beaconstringid;
88 const wchar_t *Get_Beacon_Name()
90 return TRANSLATE(beaconstringid);
96 int Get_Beacon_Definition()
98 return beaconpresetid;
100 const char *Get_Beacon_Texture()
102 return beacontexture;
104 unsigned int Get_Supply_String()
106 return refillstringid;
108 const wchar_t *Get_Supply_Name()
110 return TRANSLATE(refillstringid);
112 const char *Get_Supply_Texture()
114 return refilltexture;
116 bool Get_Hidden(
int index)
118 return Hidden[index];
120 bool Get_Disabled(
int index)
122 return Disabled[index];
124 bool Get_Busy(
int index)
128 void Set_Hidden(
int index,
bool b)
131 Set_Object_Dirty_Bit(BIT_OCCASIONAL,
true);
133 void Set_Disabled(
int index,
bool b)
136 Set_Object_Dirty_Bit(BIT_OCCASIONAL,
true);
138 void Set_Busy(
int index,
bool b)
141 Set_Object_Dirty_Bit(BIT_OCCASIONAL,
true);
148 unsigned int stringids[4];
149 StringClass textures[4];
155 unsigned int beaconstringid;
156 StringClass beacontexture;
157 unsigned int refillstringid;
158 StringClass refilltexture;
159 static TeamPurchaseSettingsDefClass *DefinitionArray[2];
160 friend class PresetDump;
163IMPLEMENT_EXTENDED_NETWORK_OBJECT(TeamPurchaseSettingsDefClass);