Add map beacons and radar pings

This commit is contained in:
ScottNZ
2014-02-19 21:43:54 +13:00
parent 7be3078115
commit 2a8efde8e6
24 changed files with 345 additions and 17 deletions

View File

@@ -63,6 +63,9 @@ namespace OpenRA.Mods.RA.Widgets
if (key == ks.ToggleStatusBarsKey)
return ToggleStatusBars();
if (key == ks.PlaceBeaconKey)
return PerformPlaceBeacon();
// Put all functions that aren't unit-specific before this line!
if (!world.Selection.Actors.Any())
return false;
@@ -180,6 +183,15 @@ namespace OpenRA.Mods.RA.Widgets
return true;
}
bool PerformPlaceBeacon()
{
if (world.LocalPlayer == null)
return true;
world.OrderGenerator = new GenericSelectTarget(world.LocalPlayer.PlayerActor, "PlaceBeacon", "ability");
return true;
}
bool CycleBases()
{
var bases = world.ActorsWithTrait<BaseBuilding>()