Add configurable cursors for entering allied actor targeters

This commit is contained in:
Ivaylo Draganov
2020-05-15 15:40:34 +03:00
committed by abcdefg30
parent 393f6eca3a
commit d5ff5c672b
9 changed files with 40 additions and 12 deletions

View File

@@ -37,6 +37,9 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Boolean expression defining the condition under which the regular (non-force) enter cursor is disabled.")]
public readonly BooleanExpression RequireForceMoveCondition = null;
public readonly string EnterCursor = "enter";
public readonly string EnterBlockedCursor = "enter-blocked";
public override object Create(ActorInitializer init) { return new Repairable(init.Self, this); }
}
@@ -65,7 +68,7 @@ namespace OpenRA.Mods.Common.Traits
get
{
if (!isAircraft)
yield return new EnterAlliedActorTargeter<BuildingInfo>("Repair", 5, CanRepairAt, _ => CanRepair() || CanRearm());
yield return new EnterAlliedActorTargeter<BuildingInfo>("Repair", 5, Info.EnterCursor, Info.EnterBlockedCursor, CanRepairAt, _ => CanRepair() || CanRearm());
}
}