From b344bba59a1d7f41eb62c5e397d57775c4ac10ae Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 3 May 2021 11:03:27 +0100 Subject: [PATCH] Expose Aircraft move cursor to yaml. --- OpenRA.Mods.Common/Traits/Air/Aircraft.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index 1363bf7e67..110aec0b98 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -161,6 +161,14 @@ namespace OpenRA.Mods.Common.Traits [Desc("Boolean expression defining the condition under which the regular (non-force) move cursor is disabled.")] public readonly BooleanExpression RequireForceMoveCondition = null; + [CursorReference] + [Desc("Cursor to display when a move order can be issued at target location.")] + public readonly string Cursor = "move"; + + [CursorReference] + [Desc("Cursor to display when a move order cannot be issued at target location.")] + public readonly string BlockedCursor = "move-blocked"; + [CursorReference] [Desc("Cursor to display when able to land at target building.")] public readonly string EnterCursor = "enter"; @@ -1285,8 +1293,8 @@ namespace OpenRA.Mods.Common.Traits var explored = self.Owner.Shroud.IsExplored(location); cursor = !aircraft.IsTraitPaused && (explored || aircraft.Info.MoveIntoShroud) && self.World.Map.Contains(location) ? - (self.World.Map.GetTerrainInfo(location).CustomCursor ?? "move") : - "move-blocked"; + (self.World.Map.GetTerrainInfo(location).CustomCursor ?? aircraft.Info.Cursor) : + aircraft.Info.BlockedCursor; return true; }