Skip to content

Instantly share code, notes, and snippets.

@Azzurite
Created June 14, 2017 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Azzurite/50bde343f2114884ca8ba539a53eeebd to your computer and use it in GitHub Desktop.
Save Azzurite/50bde343f2114884ca8ba539a53eeebd to your computer and use it in GitHub Desktop.
using (System.IO.StreamWriter file = new System.IO.StreamWriter("c:\\test.txt")) {
for (uint i = 0; i < PrefabCollection<BuildingInfo>.LoadedCount(); i++) {
var bi = PrefabCollection<BuildingInfo>.GetLoaded(i);
if (bi.name == "Empty Park 12x8") {
continue;
}
var prefabAI = bi.GetAI();
if (prefabAI.GetType() == typeof(ParkAI)) {
var ai = (ParkAI) prefabAI;
file.Write(bi.GetLocalizedTitle());
file.Write("\t");
file.Write(bi.name);
file.Write("\t");
file.Write(ai.GetConstructionCost() / 100);
file.Write("\t");
file.Write(ai.GetMaintenanceCost() / 625);
file.Write("\t");
file.Write(ai.GetWaterConsumption() * 16);
file.Write("\t");
file.Write(ai.GetElectricityConsumption() * 16);
file.Write("\t");
file.Write(ai.m_visitPlaceCount0 + ai.m_visitPlaceCount1 + ai.m_visitPlaceCount2);
file.Write("\t");
file.Write(bi.GetWidth());
file.Write("\t");
file.Write(bi.GetLength());
file.Write("\t");
file.Write("\t");
file.Write(ai.m_entertainmentAccumulation);
file.Write("\t");
file.WriteLine(ai.m_entertainmentRadius);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment