5 protected ref array<int> m_aDestroyedBuildings = {};
10 Print(
"--- SCR_BuildingDestructionStruct ------------------------");
11 for (
int i = 0, count = m_aDestroyedBuildings.Count(); i < count; i++)
13 Print(
"Destroyed building ID: " + m_aDestroyedBuildings[i]);
15 Print(
"---------------------------------------------");
19 override bool Serialize()
21 m_aDestroyedBuildings = {};
23 array<SCR_DestructibleBuildingComponent> destroyedBuildings = {};
24 int count =
GetGame().GetBuildingDestructionManager().GetDestroyedBuildings(destroyedBuildings);
26 for (
int i = 0; i < count; i++)
28 m_aDestroyedBuildings.Insert(destroyedBuildings[i].GetBuildingId());
35 override bool Deserialize()
37 for (
int i = 0, count = m_aDestroyedBuildings.Count(); i < count; i++)
40 destructibleBuilding.GoToDestroyedStateLoad();
49 RegV(
"m_aDestroyedBuildings");