Reveal-map crate

This commit is contained in:
Paul Chote
2010-08-15 01:43:24 +12:00
parent 839043ea1b
commit ddd56e6f9b
5 changed files with 17 additions and 2 deletions

View File

@@ -170,6 +170,16 @@ namespace OpenRA.Traits
Dirty();
}
public void ExploreAll(World world)
{
for (int i = map.TopLeft.X; i < map.BottomRight.X; i++)
for (int j = map.TopLeft.Y; j < map.BottomRight.Y; j++)
exploredCells[i, j] = true;
exploredBounds = new Rectangle(world.Map.TopLeft.X,world.Map.TopLeft.Y,world.Map.Width,world.Map.Height);
Dirty();
}
public void ResetExploration() // for `hide map` crate
{

View File

@@ -15,10 +15,8 @@ using OpenRA.Traits;
/*
* Crates left to implement:
Cloak=0,STEALTH2 ; enable cloaking on nearby objects
HealBase=1,INVUN ; all buildings to full strength
ICBM=1,MISSILE2 ; nuke missile one time shot
Reveal=1,EARTH ; reveal entire radar map
Sonar=3,SONARBOX ; one time sonar pulse
Squad=20,NONE ; squad of random infantry
Unit=20,NONE ; vehicle

View File

@@ -233,6 +233,7 @@
<Compile Include="ActorLostNotification.cs" />
<Compile Include="AppearsOnRadar.cs" />
<Compile Include="ColorPickerPaletteModifier.cs" />
<Compile Include="Crates\RevealMapCrateAction.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">

View File

@@ -154,6 +154,9 @@ CRATE:
Amount: 1000
SelectionShares: 50
Effect: dollar
RevealMapCrateAction:
SelectionShares: 1
Effect: reveal-map
HideMapCrateAction:
SelectionShares: 5
Effect: hide-map

View File

@@ -224,6 +224,9 @@ CRATE:
HideMapCrateAction:
SelectionShares: 5
Effect: hide-map
RevealMapCrateAction:
SelectionShares: 1
Effect: reveal-map
SupportPowerCrateAction@parabombs:
Power: AirstrikePower
SelectionShares: 5