Replace MouseButtonPreference with MouseActionType.

This commit is contained in:
Paul Chote
2025-12-15 20:30:26 +00:00
committed by Gustas Kažukauskas
parent c588c3ef8d
commit 962e7e911d
27 changed files with 212 additions and 246 deletions

View File

@@ -17,12 +17,15 @@ namespace OpenRA.Mods.Common.Orders
{
public class BeaconOrderGenerator : OrderGenerator
{
protected override MouseActionType ActionType => MouseActionType.PlaceBuilding;
public BeaconOrderGenerator(World world)
: base(world) { }
protected override IEnumerable<Order> OrderInner(World world, CPos cell, int2 worldPixel, MouseInput mi)
{
world.CancelInputMode();
if (mi.Button == MouseButton.Left)
yield return new Order("PlaceBeacon", world.LocalPlayer.PlayerActor, Target.FromCell(world, cell), false) { SuppressVisualFeedback = true };
yield return new Order("PlaceBeacon", world.LocalPlayer.PlayerActor, Target.FromCell(world, cell), false) { SuppressVisualFeedback = true };
}
protected override IEnumerable<IRenderable> Render(WorldRenderer wr, World world) { yield break; }