Description:
Cleanup.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r402:75599c841866 -

@@ -35,7 +35,7
35 35 private Grammar grammar;
36 36
37 37
38 public ContractSpawner(int mapWidth, int mapHeight, Simulation simulation, Grammar grammar)
38 public ContractSpawner(int mapWidth, int mapHeight, Simulation simulation, Grammar grammar)
39 39 {
40 40 this.random_generator = new Random();
41 41
@@ -164,7 +164,7
164 164 CreateArea(start_x, start_y, max_squares, new HashSet<Vector2>(occupied)) : message.squares;
165 165 if(i > 0)
166 166 {
167 Logging.Info(String.Format("Creating area using a {0} chance didn't work, using {1}.", odds_to_try[i-1], odds_to_try[i]));
167 Logging.Info(String.Format("Creating area using a {0} chance didn't work; using {1}.", odds_to_try[i-1], odds_to_try[i]));
168 168 }
169 169
170 170 if (retry_location[i])
@@ -175,7 +175,7
175 175
176 176 start_x = (int)start.X;
177 177 start_y = (int)start.Y;
178 Logging.Info(String.Format("Creating area using original location ({0}, {1}) didn't work, trying a new one. {2} {3}",
178 Logging.Info(String.Format("Creating area using original location ({0}, {1}) didn't work; trying a new one ({2} {3}).",
179 179 old_start_x, old_start_y, start_x, start_y));
180 180 }
181 181
@@ -227,7 +227,7
227 227 }
228 228 }
229 229
230 Logging.Warning("Never generated enough squares for area.");
230 Logging.Warning(string.Format("Never generated enough squares for area (requested {0}).", max_squares));
231 231
232 232 }
233 233 }
@@ -17,12 +17,11
17 17 [Reads(typeof(WindowTypeComponent),
18 18 typeof(VisibilityComponent),
19 19 typeof(SelectedComponent))]
20 [Writes(typeof(VisibilityComponent),
20 [Writes(typeof(VisibilityComponent),
21 21 typeof(SelectedComponent),
22 22 typeof(DialogComponent))]
23 23 class UIEngine : Engine
24 24 {
25
26 25 public override void Update(double dt)
27 26 {
28 27 foreach (var entity in ReadEntities<SelectedComponent>())
@@ -32,26 +31,17
32 31
33 32 foreach (ref readonly var windowMessage in ReadMessages<SetWindowVisibilityMessage>())
34 33 {
35 //Logging.Spy(windowMessage, "message");
36 //Logging.Spy(windowMessage.Entity, "message.Entity");
37 //Logging.Spy(windowMessage.Entity.ID, "message.Entity.ID");
38 //Logging.Spy(windowMessage.Visibility, "message.Visibility");
39 34 foreach (ref readonly var entity in ReadEntities<WindowTypeComponent>())
40 35 {
41 //Logging.Spy(entity.ID, "ID");
42 36 if (EntityExists(windowMessage.Entity) && entity.ID == windowMessage.Entity.ID)
43 37 {
44 38 SetComponent(entity, new VisibilityComponent { visible = windowMessage.Visibility });
45 39 Logging.Success("Set Visibility.");
46
47 40 }
48 41 }
49 42 }
50 43 foreach (ref readonly var windowMessage in ReadMessages<ToggleWindowMessage>())
51 44 {
52 //Logging.Spy(windowMessage, "message");
53 //Logging.Spy(windowMessage.Window, "message.Window");
54 //Logging.Spy(windowMessage.Entity, "message.Entity");
55 45 foreach (ref readonly var entity in ReadEntities<WindowTypeComponent>())
56 46 {
57 47 if (EntityExists(windowMessage.Entity) && entity.ID == windowMessage.Entity.ID)
@@ -64,11 +54,8
64 54 }
65 55 foreach (ref readonly var windowMessage in ReadMessages<ToggleWindowTypeMessage>())
66 56 {
67 //Logging.Spy(windowMessage, "message");
68 //Logging.Spy(windowMessage.Window, "message.Window");
69 57 foreach (ref readonly var entity in ReadEntities<WindowTypeComponent>())
70 58 {
71
72 59 var window_type = GetComponent<WindowTypeComponent>(entity).type;
73 60 if (window_type == windowMessage.Window)
74 61 {
@@ -96,9 +83,8
96 83 else
97 84 {
98 85 Destroy(dialogMessage.Entity);
99
100 86 }
101 87 }
102 }
88 }
103 89 }
104 90 }
You need to be logged in to leave comments. Login now