Skip to content

Instantly share code, notes, and snippets.

@taibenvenuti
Created March 21, 2017 17:07
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 taibenvenuti/c1186eb172daf011aef5080ed7316acb to your computer and use it in GitHub Desktop.
Save taibenvenuti/c1186eb172daf011aef5080ed7316acb to your computer and use it in GitHub Desktop.
Generate Decals List
var propsList = new List<string>();
var props = Resources.FindObjectsOfTypeAll<PropInfo>();
for (uint i = 0; i < props.Length; i++)
{
var prop = props[i];
if (prop == null || !prop.m_isDecal) continue;
prop.
Debug.Log(prop);
propsList.Add(prop.ToString() + ". Category: " + prop.category + ". Class: " + prop.m_class + ". Name: " + prop.name);
}
propsList.Sort();
var s = props.Length + " props found...\n\n";
foreach (var item in propsList)
{
s = s + item + "\n";
}
var path = Path.Combine(ColossalFramework.IO.DataLocation.addonsPath, "DecalsList.txt");
File.WriteAllText(path, s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment