# HG changeset patch # User Alys Brooks # Date 2022-01-22 23:35:48 # Node ID b5bd408780c7c7f9ac968869b73d623c5b9089dd # Parent 48442f91e7bea1c63e8cfd45d56d7e6c6638da34 Display tree type. diff --git a/isometric-park-fna/CellMap.cs b/isometric-park-fna/CellMap.cs --- a/isometric-park-fna/CellMap.cs +++ b/isometric-park-fna/CellMap.cs @@ -199,11 +199,23 @@ private set; } - public TreeType type { + public String StatusAdjective { + get { + return this.status.ToString().Replace("Tree", ""); + } + } + + public TreeType Type { get; private set; } + public String TypeName { + get { + return this.Type.ToString().Replace("Generic", ""); + } + } + public Boolean hasTree { get { return this.status == CellStatus.LivingTree; @@ -217,7 +229,7 @@ this.planted = datetime; - this.type = type; + this.Type = type; } public void removeTree() { diff --git a/isometric-park-fna/FNAGame.cs b/isometric-park-fna/FNAGame.cs --- a/isometric-park-fna/FNAGame.cs +++ b/isometric-park-fna/FNAGame.cs @@ -730,7 +730,7 @@ { if (this.simulation.map.cells[i][j].hasTree) { //until we actually simulate: - if (this.simulation.map.cells[i][j].type == TreeType.GenericDeciduous) { + if (this.simulation.map.cells[i][j].Type == TreeType.GenericDeciduous) { drawTileAt(i, j, 142, 2); } else { @@ -784,9 +784,21 @@ if (MathUtils.BetweenExclusive(this.mouseGrid.X, -1, this.simulation.map.MapWidth) && MathUtils.BetweenExclusive(this.mouseGrid.Y, -1, this.simulation.map.MapHeight)) { - status_left = String.Format("{0:},{1:} {2} ({3})", this.mouseGrid.X, this.mouseGrid.Y, - this.simulation.map.cells[(int)this.mouseGrid.X][(int)this.mouseGrid.Y].status, - this.in_active_zone ? "Contracted" : (this.in_zone ? "Proposed Contract": "Unused")); + var treeStatus = this.simulation.map.cells[(int)this.mouseGrid.X][(int)this.mouseGrid.Y].status; + var treeStatusAdjective = this.simulation.map.cells[(int)this.mouseGrid.X][(int)this.mouseGrid.Y].StatusAdjective; + var treeType = this.simulation.map.cells[(int)this.mouseGrid.X][(int)this.mouseGrid.Y].TypeName; + if (treeStatus != CellStatus.Clear) + { + status_left = String.Format("{0:},{1:} {2} {3} ({4})", this.mouseGrid.X, this.mouseGrid.Y, + treeStatusAdjective, + treeType, + this.in_active_zone ? "Contracted" : (this.in_zone ? "Proposed Contract": "Unused")); + } + else { + status_left = String.Format("{0:},{1:} {2} ({3})", this.mouseGrid.X, this.mouseGrid.Y, + treeStatusAdjective, + this.in_active_zone ? "Contracted" : (this.in_zone ? "Proposed Contract": "Unused")); + } } String header_left = String.Format("${0:}|{1:} \ue124", this.simulation.money, this.simulation.map.tree_count);