Description:
Show tower on status bar.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -5,7 +5,6 | |||
|
5 | 5 | |
|
6 | 6 | public struct BudgetLineComponent : IComponent |
|
7 | 7 | { |
|
8 | ||
|
9 | 8 | public string category; |
|
10 | 9 | public decimal amount; |
|
11 | 10 | } |
@@ -19,9 +19,10 | |||
|
19 | 19 | typeof(SetFontMessage), |
|
20 | 20 | typeof(QuitGameMessage))] |
|
21 | 21 | [Reads(typeof(AreaComponent), |
|
22 |
typeof( |
|
|
23 |
typeof( |
|
|
24 |
typeof( |
|
|
22 | typeof(PointComponent), | |
|
23 | typeof(ContractStatusComponent), | |
|
24 | typeof(OptionsComponent), | |
|
25 | typeof(PreserveComponent))] | |
|
25 | 26 | class GameBridgeEngine : Engine |
|
26 | 27 | { |
|
27 | 28 | |
@@ -94,6 +95,7 | |||
|
94 | 95 | game.in_zone = false; |
|
95 | 96 | game.in_active_zone = false; |
|
96 | 97 | game.in_preserve = false; |
|
98 | game.has_tower = false; | |
|
97 | 99 | foreach (ref readonly var entity in ReadEntities<AreaComponent>()) |
|
98 | 100 | { |
|
99 | 101 | var areaComponent = GetComponent<AreaComponent>(entity); |
@@ -125,7 +127,16 | |||
|
125 | 127 | } |
|
126 | 128 | } |
|
127 | 129 | } |
|
130 | foreach (ref readonly var entity in ReadEntities<PointComponent>()) | |
|
131 | { | |
|
132 | var point_component = GetComponent<PointComponent>(entity); | |
|
128 | 133 | |
|
134 | if (game.mouseGrid == point_component.Square) | |
|
135 | { | |
|
136 | game.has_tower = true; | |
|
137 | } | |
|
138 | ||
|
139 | } | |
|
129 | 140 | |
|
130 | 141 | foreach (ref readonly var message in ReadMessages<QuitGameMessage>()) |
|
131 | 142 | { |
@@ -86,6 +86,7 | |||
|
86 | 86 | public bool in_zone; |
|
87 | 87 | public bool in_active_zone; |
|
88 | 88 | public bool in_preserve; |
|
89 | public bool has_tower; | |
|
89 | 90 | |
|
90 | 91 | public bool isPlaying = false; |
|
91 | 92 | |
@@ -881,6 +882,10 | |||
|
881 | 882 | treeType, |
|
882 | 883 | useStatus); |
|
883 | 884 | } |
|
885 | else if (this.has_tower) { | |
|
886 | status_left = String.Format("{0:},{1:} Watch Tower ({2})", this.mouseGrid.X, this.mouseGrid.Y, | |
|
887 | useStatus); | |
|
888 | } | |
|
884 | 889 | else { |
|
885 | 890 | status_left = String.Format("{0:},{1:} {2} ({3})", this.mouseGrid.X, this.mouseGrid.Y, |
|
886 | 891 | treeStatusAdjective, |
You need to be logged in to leave comments.
Login now