Expose Aircraft move cursor to yaml.

This commit is contained in:
Paul Chote
2021-05-03 11:03:27 +01:00
committed by abcdefg30
parent a6d393f19b
commit b344bba59a

View File

@@ -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;
}