diff --git a/isometric-park-fna/Engines/Spawners/ContractSpawner.cs b/isometric-park-fna/Engines/Spawners/ContractSpawner.cs --- a/isometric-park-fna/Engines/Spawners/ContractSpawner.cs +++ b/isometric-park-fna/Engines/Spawners/ContractSpawner.cs @@ -35,7 +35,7 @@ private Grammar grammar; - public ContractSpawner(int mapWidth, int mapHeight, Simulation simulation, Grammar grammar) + public ContractSpawner(int mapWidth, int mapHeight, Simulation simulation, Grammar grammar) { this.random_generator = new Random(); @@ -164,7 +164,7 @@ CreateArea(start_x, start_y, max_squares, new HashSet(occupied)) : message.squares; if(i > 0) { - Logging.Info(String.Format("Creating area using a {0} chance didn't work, using {1}.", odds_to_try[i-1], odds_to_try[i])); + Logging.Info(String.Format("Creating area using a {0} chance didn't work; using {1}.", odds_to_try[i-1], odds_to_try[i])); } if (retry_location[i]) @@ -175,7 +175,7 @@ start_x = (int)start.X; start_y = (int)start.Y; - Logging.Info(String.Format("Creating area using original location ({0}, {1}) didn't work, trying a new one. {2} {3}", + Logging.Info(String.Format("Creating area using original location ({0}, {1}) didn't work; trying a new one ({2} {3}).", old_start_x, old_start_y, start_x, start_y)); } @@ -227,7 +227,7 @@ } } - Logging.Warning("Never generated enough squares for area."); + Logging.Warning(string.Format("Never generated enough squares for area (requested {0}).", max_squares)); } } diff --git a/isometric-park-fna/Engines/UIEngine.cs b/isometric-park-fna/Engines/UIEngine.cs --- a/isometric-park-fna/Engines/UIEngine.cs +++ b/isometric-park-fna/Engines/UIEngine.cs @@ -17,12 +17,11 @@ [Reads(typeof(WindowTypeComponent), typeof(VisibilityComponent), typeof(SelectedComponent))] - [Writes(typeof(VisibilityComponent), + [Writes(typeof(VisibilityComponent), typeof(SelectedComponent), typeof(DialogComponent))] class UIEngine : Engine { - public override void Update(double dt) { foreach (var entity in ReadEntities()) @@ -32,26 +31,17 @@ foreach (ref readonly var windowMessage in ReadMessages()) { - //Logging.Spy(windowMessage, "message"); - //Logging.Spy(windowMessage.Entity, "message.Entity"); - //Logging.Spy(windowMessage.Entity.ID, "message.Entity.ID"); - //Logging.Spy(windowMessage.Visibility, "message.Visibility"); foreach (ref readonly var entity in ReadEntities()) { - //Logging.Spy(entity.ID, "ID"); if (EntityExists(windowMessage.Entity) && entity.ID == windowMessage.Entity.ID) { SetComponent(entity, new VisibilityComponent { visible = windowMessage.Visibility }); Logging.Success("Set Visibility."); - } } } foreach (ref readonly var windowMessage in ReadMessages()) { - //Logging.Spy(windowMessage, "message"); - //Logging.Spy(windowMessage.Window, "message.Window"); - //Logging.Spy(windowMessage.Entity, "message.Entity"); foreach (ref readonly var entity in ReadEntities()) { if (EntityExists(windowMessage.Entity) && entity.ID == windowMessage.Entity.ID) @@ -64,11 +54,8 @@ } foreach (ref readonly var windowMessage in ReadMessages()) { - //Logging.Spy(windowMessage, "message"); - //Logging.Spy(windowMessage.Window, "message.Window"); foreach (ref readonly var entity in ReadEntities()) { - var window_type = GetComponent(entity).type; if (window_type == windowMessage.Window) { @@ -96,9 +83,8 @@ else { Destroy(dialogMessage.Entity); - } } - } + } } }