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

r557:911993685493 -

@@ -7,5 +7,6
7
7
8 public struct AreaComponent : IComponent {
8 public struct AreaComponent : IComponent {
9 public Vector2[] squares;
9 public Vector2[] squares;
10 public Tool Tool;
10 }
11 }
11 }
12 }
@@ -113,7 +113,8
113 && message.Start.Y >= 0 && message.Start.Y < this.Map.MapHeight) {
113 && message.Start.Y >= 0 && message.Start.Y < this.Map.MapHeight) {
114 var entity = CreateEntity();
114 var entity = CreateEntity();
115
115
116 AddComponent(entity, new AreaComponent { squares = new[] {message.Start} });
116 AddComponent(entity, new AreaComponent { squares = new[] {message.Start} ,
117 Tool=Tool.Preserve});
117 AddComponent(entity, new SelectedComponent { selected = true, Type= SelectionType.Area});
118 AddComponent(entity, new SelectedComponent { selected = true, Type= SelectionType.Area});
118 }
119 }
119 }
120 }
@@ -145,7 +146,7
145 }
146 }
146 }
147 }
147
148
148 SetComponent(entity, new AreaComponent { squares = newSquares.ToArray() /*new[]{ area.squares[0], message.End}*/});
149 SetComponent(entity, new AreaComponent { squares = newSquares.ToArray() /*new[]{ area.squares[0], message.End}*/, Tool = area.Tool});
149 }
150 }
150 }
151 }
151 }
152 }
@@ -159,7 +160,8
159 && message.Start.Y >= 0 && message.Start.Y < this.Map.MapHeight) {
160 && message.Start.Y >= 0 && message.Start.Y < this.Map.MapHeight) {
160 var entity = CreateEntity();
161 var entity = CreateEntity();
161
162
162 AddComponent(entity, new AreaComponent { squares = new[] {message.Start} });
163 AddComponent(entity, new AreaComponent { squares = new[] {message.Start},
164 Tool = Tool.Dezone });
163 AddComponent(entity, new SelectedComponent { selected = true, Type= SelectionType.Area});
165 AddComponent(entity, new SelectedComponent { selected = true, Type= SelectionType.Area});
164 }
166 }
165 }
167 }
@@ -192,7 +194,7
192 }
194 }
193 }
195 }
194 }
196 }
195 SetComponent(entity, new AreaComponent { squares = newSquares.ToArray() /*new[]{ area.squares[0], message.End}*/});
197 SetComponent(entity, new AreaComponent { squares = newSquares.ToArray(), Tool = area.Tool});
196 }
198 }
197 }
199 }
198 }
200 }
@@ -34,10 +34,15
34 // var SelectedComponent = GetComponent<SelectedComponent>(entity);
34 // var SelectedComponent = GetComponent<SelectedComponent>(entity);
35 var selected = GetComponent<SelectedComponent>(entity).selected;
35 var selected = GetComponent<SelectedComponent>(entity).selected;
36
36
37 if (!HasComponent<ContractStatusComponent>(entity) )
37 if (HasComponent<PreserveComponent>(entity) || areaComponent.Tool == Tool.Preserve)
38 {
38 {
39 Quad.FillSquares(batch, areaComponent.squares, Color.Blue, 0.5f, 0.79f);
39 Quad.FillSquares(batch, areaComponent.squares, Color.Blue, 0.5f, 0.79f);
40 Tile.DrawOutlinedSquares(batch, areaComponent.squares, Color.Blue);
40 Tile.DrawOutlinedSquares(batch, areaComponent.squares, Color.Blue);
41 }
42 else if (!HasComponent<ContractStatusComponent>(entity))
43 {
44 Quad.FillSquares(batch, areaComponent.squares, Color.Red, 0.5f, 0.79f);
45 Tile.DrawOutlinedSquares(batch, areaComponent.squares, Color.Red);
41 }
46 }
42 else if ((!HasComponent<ContractStatusComponent>(entity)
47 else if ((!HasComponent<ContractStatusComponent>(entity)
43 || GetComponent<ContractStatusComponent>(entity).status == ContractStatus.Accepted)
48 || GetComponent<ContractStatusComponent>(entity).status == ContractStatus.Accepted)
You need to be logged in to leave comments. Login now