# HG changeset patch # User alys # Date 2020-12-31 01:17:13 # Node ID ce8b160270cfb048afde67e86f9e022b08d5de58 # Parent 0855cc15846645e2ed25b6d84658683f4153a45c Add season display. 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 @@ -714,7 +714,9 @@ String header_left = String.Format("${0:}|{1:} trees⚘𐂷🌳", this.simulation.money, this.simulation.map.tree_count); - String header_middle = String.Format("{0:yyyy MMMMM}", this.simulation.DateTime); + String header_middle = String.Format("{0:MMMMM yyyy} ({1:})", this.simulation.DateTime, this.simulation.Season); + + this.Window.Title = String.Format("Isometric Park [{0:}]",header_middle); Vector2 dimensions = monoFont.MeasureString(header_middle); float middle_start = (FNAGame.width / 2) - (dimensions.X / 2); diff --git a/isometric-park-fna/Simulation.cs b/isometric-park-fna/Simulation.cs --- a/isometric-park-fna/Simulation.cs +++ b/isometric-park-fna/Simulation.cs @@ -38,6 +38,26 @@ public decimal money; public float millisecondsPerAdvance { get; private set; } + public String Season { get + { + if (MathUtils.Between(this.DateTime.Month, 3, 5)) + { + return "Spring"; + } + else if (MathUtils.Between(this.DateTime.Month, 6, 8)) + { + return "Summer"; + } + else if (MathUtils.Between(this.DateTime.Month, 9, 11)) + { + return "Fall"; + } + else + { + return "Winter"; + } + } + } public TileMap map;