public override void OnCreated(ISerializableData serializableData) { RICOInstanceData = new RICOInstanceData[63000]; for (uint i = 0; i < 62000; i++) { RICOInstanceData[i] = new RICOInstanceData(); } base.OnCreated(serializableData); }
public static void AddBuilding(BuildingInfo prefab, uint ID) { //This is called from building tool. The data it sets is read by methods in the RICO AIs and BuildingTool detours. Debug.Log("Add Building Called with ID = " + ID); if (prefab.m_buildingAI is PloppableOffice || prefab.m_buildingAI is PloppableExtractor || prefab.m_buildingAI is PloppableResidential || prefab.m_buildingAI is PloppableCommercial || prefab.m_buildingAI is PloppableIndustrial) { RICOInstanceData data = RICOBuildingManager.RICOInstanceData[(int)ID]; if (data != null) { data.Name = prefab.name; data.plopped = true; //since this is called from building tool, it must be plopped. } } }