diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
index b8d440bbf6..869c7ea7e7 100644
--- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
+++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
@@ -488,6 +488,7 @@
+
diff --git a/OpenRA.Mods.RA/Orders/BeaconOrderGenerator.cs b/OpenRA.Mods.RA/Orders/BeaconOrderGenerator.cs
new file mode 100644
index 0000000000..98e9d8ce03
--- /dev/null
+++ b/OpenRA.Mods.RA/Orders/BeaconOrderGenerator.cs
@@ -0,0 +1,35 @@
+#region Copyright & License Information
+/*
+ * Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
+ * This file is part of OpenRA, which is free software. It is made
+ * available to you under the terms of the GNU General Public License
+ * as published by the Free Software Foundation. For more information,
+ * see COPYING.
+ */
+#endregion
+
+using System.Collections.Generic;
+using OpenRA.Graphics;
+
+namespace OpenRA.Mods.RA.Orders
+{
+ public class BeaconOrderGenerator : IOrderGenerator
+ {
+ public IEnumerable Order(World world, CPos xy, MouseInput mi)
+ {
+ if (mi.Button != MouseButton.Left)
+ world.CancelInputMode();
+
+ if (world.Map.IsInMap(xy))
+ {
+ world.CancelInputMode();
+ yield return new Order("PlaceBeacon", world.LocalPlayer.PlayerActor, false) { TargetLocation = xy };
+ }
+ }
+
+ public virtual void Tick(World world) { }
+ public IEnumerable Render(WorldRenderer wr, World world) { yield break; }
+ public void RenderAfterWorld(WorldRenderer wr, World world) { }
+ public string GetCursor(World world, CPos xy, MouseInput mi) { return world.Map.IsInMap(xy) ? "ability" : "generic-blocked"; }
+ }
+}
diff --git a/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs
index a9793db2f3..3826a02773 100644
--- a/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs
+++ b/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs
@@ -32,6 +32,13 @@ namespace OpenRA.Mods.RA.Widgets.Logic
BindOrderButton(world, repair, "repair");
}
+ var beacon = widget.GetOrNull("BEACON_BUTTON");
+ if (beacon != null)
+ {
+ beacon.GetKey = _ => Game.Settings.Keys.PlaceBeaconKey;
+ BindOrderButton(world, beacon, "beacon");
+ }
+
var power = widget.GetOrNull("POWER_BUTTON");
if (power != null)
{
diff --git a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs
index 77387d9875..84cec991bc 100644
--- a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs
+++ b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs
@@ -65,9 +65,6 @@ 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;
@@ -189,15 +186,6 @@ 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()
diff --git a/artsrc/cnc/chrome.svg b/artsrc/cnc/chrome.svg
index 19a978210e..ecd33e9e92 100644
--- a/artsrc/cnc/chrome.svg
+++ b/artsrc/cnc/chrome.svg
@@ -13,9 +13,9 @@
height="512"
id="svg2"
version="1.1"
- inkscape:version="0.48.4 r9939"
+ inkscape:version="0.48.2 r9819"
sodipodi:docname="chrome.svg"
- inkscape:export-filename="/home/matthias/Projekte/OpenRA/mods/cnc/uibits/chrome.png"
+ inkscape:export-filename="/Users/paul/src/OpenRA/mods/cnc/uibits/chrome.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
enable-background="new">
@@ -99,17 +99,17 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="5.6568539"
- inkscape:cx="424.27411"
- inkscape:cy="420.32669"
+ inkscape:zoom="11.313708"
+ inkscape:cx="399.83211"
+ inkscape:cy="452.59159"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
- inkscape:window-width="1920"
- inkscape:window-height="1060"
- inkscape:window-x="1364"
- inkscape:window-y="-3"
- inkscape:window-maximized="1"
+ inkscape:window-width="1151"
+ inkscape:window-height="1004"
+ inkscape:window-x="540"
+ inkscape:window-y="22"
+ inkscape:window-maximized="0"
showguides="true"
inkscape:guide-bbox="true">
image/svg+xml
-
+
@@ -870,14 +870,14 @@
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path3948"
- d="m 400,588.3622 4,4 0,0 -4,4 z"
+ d="m 416,588.3622 4,4 0,0 -4,4 z"
style="fill:#ffffff;fill-opacity:1;stroke:none" />
+
+
+
+
+
+