From ddd56e6f9bc12497e84b7d4fb6e186d051dc17e8 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 15 Aug 2010 01:43:24 +1200 Subject: [PATCH] Reveal-map crate --- OpenRA.Game/Traits/World/Shroud.cs | 10 ++++++++++ OpenRA.Mods.RA/Crate.cs | 2 -- OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 1 + mods/cnc/system.yaml | 3 +++ mods/ra/system.yaml | 3 +++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Traits/World/Shroud.cs b/OpenRA.Game/Traits/World/Shroud.cs index d82cdabeb515..b80596d14fb8 100644 --- a/OpenRA.Game/Traits/World/Shroud.cs +++ b/OpenRA.Game/Traits/World/Shroud.cs @@ -170,6 +170,16 @@ public void Explore(World world, int2 center, int range) 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 { diff --git a/OpenRA.Mods.RA/Crate.cs b/OpenRA.Mods.RA/Crate.cs index cbad36c3bdfd..6189d750a14d 100644 --- a/OpenRA.Mods.RA/Crate.cs +++ b/OpenRA.Mods.RA/Crate.cs @@ -15,10 +15,8 @@ /* * 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 diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index de6aeeadfe3c..475dd1b1e80a 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -233,6 +233,7 @@ + diff --git a/mods/cnc/system.yaml b/mods/cnc/system.yaml index 871ddb9dee38..0b42dffe2eeb 100644 --- a/mods/cnc/system.yaml +++ b/mods/cnc/system.yaml @@ -154,6 +154,9 @@ CRATE: Amount: 1000 SelectionShares: 50 Effect: dollar + RevealMapCrateAction: + SelectionShares: 1 + Effect: reveal-map HideMapCrateAction: SelectionShares: 5 Effect: hide-map diff --git a/mods/ra/system.yaml b/mods/ra/system.yaml index 576889f487d0..059853f5c40c 100644 --- a/mods/ra/system.yaml +++ b/mods/ra/system.yaml @@ -224,6 +224,9 @@ CRATE: HideMapCrateAction: SelectionShares: 5 Effect: hide-map + RevealMapCrateAction: + SelectionShares: 1 + Effect: reveal-map SupportPowerCrateAction@parabombs: Power: AirstrikePower SelectionShares: 5