Initial GpsSatellite support
This commit is contained in:
@@ -216,6 +216,7 @@
|
|||||||
<Compile Include="Traits\Explodes.cs" />
|
<Compile Include="Traits\Explodes.cs" />
|
||||||
<Compile Include="Traits\ChronoshiftDeploy.cs" />
|
<Compile Include="Traits\ChronoshiftDeploy.cs" />
|
||||||
<Compile Include="Traits\Fake.cs" />
|
<Compile Include="Traits\Fake.cs" />
|
||||||
|
<Compile Include="Traits\GpsSatellite.cs" />
|
||||||
<Compile Include="Traits\Harvester.cs" />
|
<Compile Include="Traits\Harvester.cs" />
|
||||||
<Compile Include="Traits\Helicopter.cs" />
|
<Compile Include="Traits\Helicopter.cs" />
|
||||||
<Compile Include="Traits\InvisibleToOthers.cs" />
|
<Compile Include="Traits\InvisibleToOthers.cs" />
|
||||||
|
|||||||
@@ -27,6 +27,20 @@ namespace OpenRa.Game
|
|||||||
dirty = true;
|
dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RevealAll()
|
||||||
|
{
|
||||||
|
for (int x = 0; x < 128; x++)
|
||||||
|
for (int y = 0; y < 128; y++)
|
||||||
|
explored[x, y] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideAll()
|
||||||
|
{
|
||||||
|
for (int x = 0; x < 128; x++)
|
||||||
|
for (int y = 0; y < 128; y++)
|
||||||
|
explored[x, y] = false;
|
||||||
|
}
|
||||||
|
|
||||||
Sprite ChooseShroud(int i, int j)
|
Sprite ChooseShroud(int i, int j)
|
||||||
{
|
{
|
||||||
// bits are for exploredness: left, right, up, down, self
|
// bits are for exploredness: left, right, up, down, self
|
||||||
|
|||||||
22
OpenRa.Game/Traits/GpsSatellite.cs
Normal file
22
OpenRa.Game/Traits/GpsSatellite.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenRa.Game.Traits
|
||||||
|
{
|
||||||
|
class GpsSatellite
|
||||||
|
{
|
||||||
|
public GpsSatellite(Actor self)
|
||||||
|
{
|
||||||
|
// TODO: connect this to a special power that calls Activate();
|
||||||
|
Activate(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Activate(Actor self)
|
||||||
|
{
|
||||||
|
// TODO: Launch satellite
|
||||||
|
self.Owner.Shroud.RevealAll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -345,7 +345,7 @@ MINV
|
|||||||
; `Produces` is a category of objects that this building can produce.
|
; `Produces` is a category of objects that this building can produce.
|
||||||
[ATEK]
|
[ATEK]
|
||||||
Description=Allied Tech Center
|
Description=Allied Tech Center
|
||||||
Traits=Building, RenderBuilding, IronCurtainable
|
Traits=Building, RenderBuilding, IronCurtainable, GpsSatellite
|
||||||
Dimensions=2,2
|
Dimensions=2,2
|
||||||
Footprint=xx xx
|
Footprint=xx xx
|
||||||
SelectionPriority=3
|
SelectionPriority=3
|
||||||
|
|||||||
Reference in New Issue
Block a user