30 m_Identity = identity;
46 m_Dimension = dimension;
70 return SCR_Enum.HasFlag(m_Icons, icon);
86 m_Amplifier = amplifier;
98 m_Identity = identity;
99 m_Dimension = dimension;
101 m_Amplifier = amplifier;
110 m_Identity = from.m_Identity;
111 m_Dimension = from.m_Dimension;
112 m_Icons = from.m_Icons;
113 m_Amplifier = from.m_Amplifier;
122 return m_Identity == symbol.m_Identity
123 && m_Dimension == symbol.m_Dimension
124 && m_Icons == symbol.m_Icons
125 && m_Amplifier == symbol.m_Amplifier;
132 void Log(LogLevel logLevel = LogLevel.DEBUG)
139 Print(
string.Format(
"%1 | %2 | %3 | %4", identityName, dimensionName, iconNames, amplifierName), logLevel);
143 static void Encode(SSnapSerializerBase snapshot, ScriptCtx hint, ScriptBitSerializer packet)
145 snapshot.Serialize(packet, 16);
147 static bool Decode(ScriptBitSerializer packet, ScriptCtx hint, SSnapSerializerBase snapshot)
149 return snapshot.Serialize(packet, 16);
151 static bool SnapCompare(SSnapSerializerBase lhs, SSnapSerializerBase rhs, ScriptCtx hint)
153 return lhs.CompareSnapshots(rhs, 16);
155 static bool PropCompare(
SCR_MilitarySymbol prop, SSnapSerializerBase snapshot, ScriptCtx hint)
157 return snapshot.CompareInt(prop.m_Identity)
158 && snapshot.CompareInt(prop.m_Dimension)
159 && snapshot.CompareInt(prop.m_Icons)
160 && snapshot.CompareInt(prop.m_Amplifier);
162 static bool Extract(
SCR_MilitarySymbol prop, ScriptCtx hint, SSnapSerializerBase snapshot)
164 snapshot.SerializeInt(prop.m_Identity);
165 snapshot.SerializeInt(prop.m_Dimension);
166 snapshot.SerializeInt(prop.m_Icons);
167 snapshot.SerializeInt(prop.m_Amplifier);
170 static bool Inject(SSnapSerializerBase snapshot, ScriptCtx hint,
SCR_MilitarySymbol prop)
172 snapshot.SerializeInt(prop.m_Identity);
173 snapshot.SerializeInt(prop.m_Dimension);
174 snapshot.SerializeInt(prop.m_Icons);
175 snapshot.SerializeInt(prop.m_Amplifier);
179 void OnRplSave(ScriptBitWriter writer)
181 writer.WriteInt(m_Identity);
182 writer.WriteInt(m_Dimension);
183 writer.WriteInt(m_Icons);
184 writer.WriteInt(m_Amplifier);
186 void OnRplLoad(ScriptBitReader reader)
188 reader.ReadInt(m_Identity);
189 reader.ReadInt(m_Dimension);
190 reader.ReadInt(m_Icons);
191 reader.ReadInt(m_Amplifier);
196 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
199 source.Get(
"m_Identity", identity);
202 source.Get(
"m_Dimension", dimension);
205 source.Get(
"m_Icons", icons);
208 source.Get(
"m_Amplifier", amplifier);
215 title =
string.Format(
"%1 | %2 | %3 | %4", identityName, dimensionName, iconNames, amplifierName);