forked from Phobos-developers/Phobos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBody.h
More file actions
204 lines (172 loc) · 5.92 KB
/
Body.h
File metadata and controls
204 lines (172 loc) · 5.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
#pragma once
#include <TechnoTypeClass.h>
#include <Helpers/Macro.h>
#include <Utilities/Container.h>
#include <Utilities/TemplateDef.h>
#include <New/Type/ShieldTypeClass.h>
#include <New/Type/LaserTrailTypeClass.h>
class Matrix3D;
class TechnoTypeExt
{
public:
using base_type = TechnoTypeClass;
class ExtData final : public Extension<TechnoTypeClass>
{
public:
Valueable<bool> HealthBar_Hide;
Valueable<CSFText> UIDescription;
Valueable<bool> LowSelectionPriority;
PhobosFixedString<0x20> GroupAs;
Valueable<int> RadarJamRadius;
Valueable<int> InhibitorRange;
Valueable<Leptons> MindControlRangeLimit;
Valueable<bool> Interceptor;
Valueable<Leptons> Interceptor_GuardRange;
Valueable<Leptons> Interceptor_MinimumGuardRange;
Valueable<Leptons> Interceptor_EliteGuardRange;
Valueable<Leptons> Interceptor_EliteMinimumGuardRange;
Valueable<CoordStruct> TurretOffset;
Valueable<bool> Powered_KillSpawns;
Valueable<bool> Spawn_LimitedRange;
Valueable<int> Spawn_LimitedExtraRange;
Nullable<bool> Harvester_Counted;
Valueable<bool> Promote_IncludeSpawns;
Valueable<bool> ImmuneToCrit;
Valueable<bool> MultiMindControl_ReleaseVictim;
Valueable<int> CameoPriority;
Valueable<bool> NoManualMove;
Nullable<int> InitialStrength;
Valueable<bool> PassengerDeletion_Soylent;
Valueable<bool> PassengerDeletion_SoylentFriendlies;
Valueable<int> PassengerDeletion_Rate;
NullableIdx<VocClass> PassengerDeletion_ReportSound;
Valueable<bool> PassengerDeletion_Rate_SizeMultiply;
Nullable<AnimTypeClass*> PassengerDeletion_Anim;
Valueable<ShieldTypeClass*> ShieldType;
Nullable<AnimTypeClass*> WarpOut;
Nullable<AnimTypeClass*> WarpIn;
Nullable<AnimTypeClass*> WarpAway;
Nullable<bool> ChronoTrigger;
Nullable<int> ChronoDistanceFactor;
Nullable<int> ChronoMinimumDelay;
Nullable<int> ChronoRangeMinimum;
Nullable<int> ChronoDelay;
ValueableVector<AnimTypeClass*> OreGathering_Anims;
ValueableVector<int> OreGathering_Tiberiums;
ValueableVector<int> OreGathering_FramesPerDir;
std::vector<DynamicVectorClass<CoordStruct>> WeaponBurstFLHs;
std::vector<DynamicVectorClass<CoordStruct>> EliteWeaponBurstFLHs;
Valueable<bool> DestroyAnim_Random;
Valueable<bool> NotHuman_RandomDeathSequence;
Nullable<InfantryTypeClass*> DefaultDisguise;
Nullable<int> OpenTopped_RangeBonus;
Nullable<float> OpenTopped_DamageMultiplier;
Nullable<int> OpenTopped_WarpDistance;
Valueable<bool> AutoFire;
Valueable<bool> AutoFire_TargetSelf;
Valueable<bool> NoSecondaryWeaponFallback;
Valueable<int> NoAmmoWeapon;
Valueable<int> NoAmmoAmount;
Nullable<bool> JumpjetAllowLayerDeviation;
Valueable<bool> DeployingAnim_KeepUnitVisible;
Valueable<bool> DeployingAnim_ReverseForUndeploy;
Valueable<bool> DeployingAnim_UseUnitDrawer;
Nullable<int> DeployDir;
struct LaserTrailDataEntry
{
ValueableIdx<LaserTrailTypeClass> idxType;
Valueable<CoordStruct> FLH;
Valueable<bool> IsOnTurret;
bool Load(PhobosStreamReader& stm, bool registerForChange);
bool Save(PhobosStreamWriter& stm) const;
private:
template <typename T>
bool Serialize(T& stm);
};
ValueableVector<LaserTrailDataEntry> LaserTrailData;
ExtData(TechnoTypeClass* OwnerObject) : Extension<TechnoTypeClass>(OwnerObject)
, HealthBar_Hide { false }
, UIDescription {}
, LowSelectionPriority { false }
, GroupAs { NONE_STR }
, RadarJamRadius { 0 }
, InhibitorRange { 0 }
, MindControlRangeLimit {}
, Interceptor { false }
, Interceptor_GuardRange {}
, Interceptor_MinimumGuardRange {}
, Interceptor_EliteGuardRange {}
, Interceptor_EliteMinimumGuardRange {}
, TurretOffset { { 0, 0, 0 } }
, Powered_KillSpawns { false }
, Spawn_LimitedRange { false }
, Spawn_LimitedExtraRange { 0 }
, Harvester_Counted {}
, Promote_IncludeSpawns { false }
, ImmuneToCrit { false }
, MultiMindControl_ReleaseVictim { false }
, CameoPriority { 0 }
, NoManualMove { false }
, InitialStrength {}
, ShieldType {}
, WarpOut {}
, WarpIn {}
, WarpAway {}
, ChronoTrigger {}
, ChronoDistanceFactor {}
, ChronoMinimumDelay {}
, ChronoRangeMinimum {}
, ChronoDelay {}
, OreGathering_Anims {}
, OreGathering_Tiberiums {}
, OreGathering_FramesPerDir {}
, LaserTrailData {}
, DestroyAnim_Random { true }
, NotHuman_RandomDeathSequence { false }
, PassengerDeletion_Soylent { false }
, PassengerDeletion_SoylentFriendlies { false }
, PassengerDeletion_Rate { 0 }
, PassengerDeletion_ReportSound {}
, PassengerDeletion_Rate_SizeMultiply { true }
, PassengerDeletion_Anim {}
, DefaultDisguise {}
, OpenTopped_RangeBonus {}
, OpenTopped_DamageMultiplier {}
, OpenTopped_WarpDistance {}
, AutoFire { false }
, AutoFire_TargetSelf { false }
, NoSecondaryWeaponFallback { false }
, NoAmmoWeapon { -1 }
, NoAmmoAmount { 0 }
, JumpjetAllowLayerDeviation {}
, DeployingAnim_KeepUnitVisible { false }
, DeployingAnim_ReverseForUndeploy { true }
, DeployingAnim_UseUnitDrawer { true }
, DeployDir {}
{ }
virtual ~ExtData() = default;
virtual void LoadFromINIFile(CCINIClass* pINI) override;
virtual void Initialize() override;
virtual void InvalidatePointer(void* ptr, bool bRemoved) override { }
virtual void LoadFromStream(PhobosStreamReader& Stm) override;
virtual void SaveToStream(PhobosStreamWriter& Stm) override;
void ApplyTurretOffset(Matrix3D* mtx, double factor = 1.0);
bool IsCountedAsHarvester();
// Ares 0.A
const char* GetSelectionGroupID() const;
private:
template <typename T>
void Serialize(T& Stm);
};
class ExtContainer final : public Container<TechnoTypeExt>
{
public:
ExtContainer();
~ExtContainer();
};
static ExtContainer ExtMap;
static void ApplyTurretOffset(TechnoTypeClass* pType, Matrix3D* mtx, double factor = 1.0);
// Ares 0.A
static const char* GetSelectionGroupID(ObjectTypeClass* pType);
static bool HasSelectionGroupID(ObjectTypeClass* pType, const char* pID);
};