static TileSet GetOrMakeTileset(string path) { TileSet tileset; if (PathLookup.ContainsKey(path)) { tileset = PathLookup[path]; tileset.MakeNew(); } else { tileset = new TileSet(); // Add the tileset to Freeplay CustomLevel_GUI.FreeplayTilesets.Add(tileset); } return(tileset); }
public static void Load(string path) { BackgroundTemplate template; if (PathLookup.ContainsKey(path)) { template = PathLookup[path]; } else { template = new BackgroundTemplate(); var name = Tools.GetFileName(path); template.Name = name; template.File = path; AddTemplate(template); } template.MadeOfCode = false; template.MadeOfText = true; }