Add input style to match other, non-C&C, RTS games

Uses left-click for targeted orders (attack move, guard, selecting movement types from the command bar, etc.) and right-click for contextual ones. Works like basically all non-C&C games

Removed GameSettings.UseClassicMouseStyle, as it is replaced by MouseControlStyle


Changed Minelayer and Chronotank teleport to UnitOrderGenerator

Fixes bug with Modern controls issuing a move order cancelling a mine field order

Better organizes all unit orders into a single order generator base class, rather than having their logic spread across multiple base classes, which required some hacks to get the control logic to match
This commit is contained in:
Dominic Renaud
2025-11-10 22:12:48 -08:00
committed by Paul Chote
parent c47ebfbb52
commit f8eefe310c
22 changed files with 530 additions and 157 deletions

View File

@@ -115,14 +115,8 @@ namespace OpenRA.Mods.Common.Traits
.ToArray();
}
public override IEnumerable<Order> Order(World world, CPos cell, int2 worldPixel, MouseInput mi)
protected override IEnumerable<Order> OrderInner(World world, CPos cell, int2 worldPixel, MouseInput mi)
{
if (mi.Button != ActionButton)
{
world.CancelInputMode();
yield break;
}
var queued = mi.Modifiers.HasModifier(Modifiers.Shift);
if (!queued)
world.CancelInputMode();