public Building(Vector2Int position, TilableDef def) { this.position = position; this.def = def; this.recipe = new Recipe(this.def.recipeDef, this, position); this.work = 0; if (this.def.type == TilableType.BuildingConnected) { this.mainGraphic = GraphicInstance.GetNew( this.def.graphics, new Color(112 / 255f, 78 / 255f, 46 / 255f, .5f), // update alpha when constructed Res.textures[this.def.graphics.textureName + "_0"], 1 ); this._connectedUtility = new ConnectedTilable(this); } this.addGraphics = new Dictionary <string, GraphicInstance>(); Tilable tilable = Loki.map.grids[Layer.Plant].GetTilableAt(this.position); if (tilable != null && tilable.def.cuttable) { tilable.AddOrder(Defs.orders["cut_plants"]); } }
public Mountain(Vector2Int position, TilableDef def) { this.position = position; this.def = def; this._connectedUtility = new ConnectedTilable(this); this.mainGraphic = GraphicInstance.GetNew( this.def.graphics, default(Color), Res.textures[this.def.graphics.textureName + "_0"], 1 ); this.addGraphics = new Dictionary <string, GraphicInstance>(); }