Initial GpsSatellite support

This commit is contained in:
Paul Chote
2010-01-08 19:35:43 +13:00
parent b570f3c9a7
commit b332785d2e
4 changed files with 38 additions and 1 deletions

View File

@@ -216,6 +216,7 @@
<Compile Include="Traits\Explodes.cs" />
<Compile Include="Traits\ChronoshiftDeploy.cs" />
<Compile Include="Traits\Fake.cs" />
<Compile Include="Traits\GpsSatellite.cs" />
<Compile Include="Traits\Harvester.cs" />
<Compile Include="Traits\Helicopter.cs" />
<Compile Include="Traits\InvisibleToOthers.cs" />

View File

@@ -26,6 +26,20 @@ namespace OpenRa.Game
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)
{

View 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();
}
}
}

View File

@@ -345,7 +345,7 @@ MINV
; `Produces` is a category of objects that this building can produce.
[ATEK]
Description=Allied Tech Center
Traits=Building, RenderBuilding, IronCurtainable
Traits=Building, RenderBuilding, IronCurtainable, GpsSatellite
Dimensions=2,2
Footprint=xx xx
SelectionPriority=3