Expose Aircraft move cursor to yaml.
This commit is contained in:
@@ -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.")]
|
[Desc("Boolean expression defining the condition under which the regular (non-force) move cursor is disabled.")]
|
||||||
public readonly BooleanExpression RequireForceMoveCondition = null;
|
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]
|
[CursorReference]
|
||||||
[Desc("Cursor to display when able to land at target building.")]
|
[Desc("Cursor to display when able to land at target building.")]
|
||||||
public readonly string EnterCursor = "enter";
|
public readonly string EnterCursor = "enter";
|
||||||
@@ -1285,8 +1293,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
var explored = self.Owner.Shroud.IsExplored(location);
|
var explored = self.Owner.Shroud.IsExplored(location);
|
||||||
cursor = !aircraft.IsTraitPaused && (explored || aircraft.Info.MoveIntoShroud) && self.World.Map.Contains(location) ?
|
cursor = !aircraft.IsTraitPaused && (explored || aircraft.Info.MoveIntoShroud) && self.World.Map.Contains(location) ?
|
||||||
(self.World.Map.GetTerrainInfo(location).CustomCursor ?? "move") :
|
(self.World.Map.GetTerrainInfo(location).CustomCursor ?? aircraft.Info.Cursor) :
|
||||||
"move-blocked";
|
aircraft.Info.BlockedCursor;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user