public static ProductionRecipe Get(SandboxTile.TileType type, string name) { Dictionary <string, ProductionRecipe> recipes = reflectionCache.GetValue < Dictionary <string, ProductionRecipe> >($"{type}_Recipes"); return(recipes[name]); }
public static TileSchematic Warehouse(SandboxTile.TileType type, int nextTier) { return(nextTier switch { 0 => new TileSchematic(type, nextTier) { kCost = 1000, materials = new (string, int)[]
public SandboxTile Build(SandboxTile.TileType type) { TileSchematic ts = TileSchematics.GetSchem(type, 0); SandboxTile tile = ts.Build(this); tiles.Add(tile); return(tile); }
public static async Task BuildTile(Player player, SandboxTile.TileType type, ISocketMessageChannel chan) { House house = await LoadHouse(player, chan); Sandbox sb = house.sandbox; sb.Build(type); await house.Save(); await SandboxActions.InspectTile(player, sb, "house", sb.tiles.Count - 1, chan); }
internal static TileSchematic GetSchem(SandboxTile.TileType type, int tier) => reflectionCache.Run <TileSchematic>(type.ToString(), type, tier);