Add missing trait descriptions for cursors and unify the language

This commit is contained in:
Ivaylo Draganov
2020-05-18 15:18:35 +03:00
committed by abcdefg30
parent 227567dfe1
commit b8a9f41892
25 changed files with 59 additions and 11 deletions

View File

@@ -93,7 +93,7 @@ namespace OpenRA.Mods.Cnc.Traits
"A dictionary of [actor id]: [condition].")] "A dictionary of [actor id]: [condition].")]
public readonly Dictionary<string, string> DisguisedAsConditions = new Dictionary<string, string>(); public readonly Dictionary<string, string> DisguisedAsConditions = new Dictionary<string, string>();
[Desc("Cursor to show when hovering over a valid actor to disguise as.")] [Desc("Cursor to display when hovering over a valid actor to disguise as.")]
public readonly string Cursor = "ability"; public readonly string Cursor = "ability";
[GrantedConditionReference] [GrantedConditionReference]

View File

@@ -42,6 +42,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Experience to grant to the infiltrating player.")] [Desc("Experience to grant to the infiltrating player.")]
public readonly int PlayerExperience = 0; public readonly int PlayerExperience = 0;
[Desc("Cursor to display when able to infiltrate the target actor.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
public override object Create(ActorInitializer init) { return new Infiltrates(this); } public override object Create(ActorInitializer init) { return new Infiltrates(this); }

View File

@@ -49,13 +49,13 @@ namespace OpenRA.Mods.Cnc.Traits
public readonly bool KillCargo = true; public readonly bool KillCargo = true;
[Desc("Cursor sequence to use when selecting targets for the chronoshift.")] [Desc("Cursor to display when selecting targets for the chronoshift.")]
public readonly string SelectionCursor = "chrono-select"; public readonly string SelectionCursor = "chrono-select";
[Desc("Cursor sequence to use when targeting an area for the chronoshift.")] [Desc("Cursor to display when targeting an area for the chronoshift.")]
public readonly string TargetCursor = "chrono-target"; public readonly string TargetCursor = "chrono-target";
[Desc("Cursor sequence to use when the targeted area is blocked.")] [Desc("Cursor to display when the targeted area is blocked.")]
public readonly string TargetBlockedCursor = "move-blocked"; public readonly string TargetBlockedCursor = "move-blocked";
public override object Create(ActorInitializer init) { return new ChronoshiftPower(init.Self, this); } public override object Create(ActorInitializer init) { return new ChronoshiftPower(init.Self, this); }

View File

@@ -139,7 +139,10 @@ 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;
[Desc("Cursor to display when able to land at target building.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
[Desc("Cursor to display when unable to land at target building.")]
public readonly string EnterBlockedCursor = "enter-blocked"; public readonly string EnterBlockedCursor = "enter-blocked";
public int GetInitialFacing() { return InitialFacing; } public int GetInitialFacing() { return InitialFacing; }

View File

@@ -76,9 +76,11 @@ namespace OpenRA.Mods.Common.Traits
// TODO: instead of having multiple Armaments and unique AttackBase, // TODO: instead of having multiple Armaments and unique AttackBase,
// an actor should be able to have multiple AttackBases with // an actor should be able to have multiple AttackBases with
// a single corresponding Armament each // a single corresponding Armament each
[Desc("Cursor to display when hovering over a valid target.")]
public readonly string Cursor = "attack"; public readonly string Cursor = "attack";
// TODO: same as above // TODO: same as above
[Desc("Cursor to display when hovering over a valid target that is outside of range.")]
public readonly string OutsideRangeCursor = "attackoutsiderange"; public readonly string OutsideRangeCursor = "attackoutsiderange";
public override object Create(ActorInitializer init) { return new Armament(init.Self, this); } public override object Create(ActorInitializer init) { return new Armament(init.Self, this); }

View File

@@ -28,8 +28,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Armament names")] [Desc("Armament names")]
public readonly string[] Armaments = { "primary", "secondary" }; public readonly string[] Armaments = { "primary", "secondary" };
[Desc("Cursor to display when hovering over a valid target.")]
public readonly string Cursor = null; public readonly string Cursor = null;
[Desc("Cursor to display when hovering over a valid target that is outside of range.")]
public readonly string OutsideRangeCursor = null; public readonly string OutsideRangeCursor = null;
[Desc("Color to use for the target line.")] [Desc("Color to use for the target line.")]

View File

@@ -30,6 +30,7 @@ namespace OpenRA.Mods.Common.Traits
[SequenceReference("Image")] [SequenceReference("Image")]
public readonly string CirclesSequence = "circles"; public readonly string CirclesSequence = "circles";
[Desc("Cursor to display when rally point can be set.")]
public readonly string Cursor = "ability"; public readonly string Cursor = "ability";
[PaletteReference("IsPlayerPalette")] [PaletteReference("IsPlayerPalette")]

View File

@@ -36,7 +36,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Require the force-move modifier to display the move cursor.")] [Desc("Require the force-move modifier to display the move cursor.")]
public readonly bool RequiresForceMove = false; public readonly bool RequiresForceMove = false;
[Desc("Cursor to display when able to land at target building.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
[Desc("Cursor to display when unable to land at target building.")]
public readonly string EnterBlockedCursor = "enter-blocked"; public readonly string EnterBlockedCursor = "enter-blocked";
public override object Create(ActorInitializer init) { return new TransformsIntoAircraft(init, this); } public override object Create(ActorInitializer init) { return new TransformsIntoAircraft(init, this); }

View File

@@ -23,7 +23,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Add to a building to expose a move cursor that triggers Transforms and issues an enter tunnel order to the transformed actor.")] [Desc("Add to a building to expose a move cursor that triggers Transforms and issues an enter tunnel order to the transformed actor.")]
public class TransformsIntoEntersTunnelsInfo : ConditionalTraitInfo, Requires<TransformsInfo> public class TransformsIntoEntersTunnelsInfo : ConditionalTraitInfo, Requires<TransformsInfo>
{ {
[Desc("Cursor to display when able to enter target tunnel.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
[Desc("Cursor to display when unable to enter target tunnel.")]
public readonly string EnterBlockedCursor = "enter-blocked"; public readonly string EnterBlockedCursor = "enter-blocked";
[VoiceReference] [VoiceReference]

View File

@@ -27,7 +27,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Locomotor used by the transformed actor. Must be defined on the World actor.")] [Desc("Locomotor used by the transformed actor. Must be defined on the World actor.")]
public readonly string Locomotor = null; public readonly string Locomotor = null;
[Desc("Cursor to display when a move order can be issued at target location.")]
public readonly string Cursor = "move"; public readonly string Cursor = "move";
[Desc("Cursor to display when a move order cannot be issued at target location.")]
public readonly string BlockedCursor = "move-blocked"; public readonly string BlockedCursor = "move-blocked";
[VoiceReference] [VoiceReference]

View File

@@ -32,7 +32,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Require the force-move modifier to display the enter cursor.")] [Desc("Require the force-move modifier to display the enter cursor.")]
public readonly bool RequiresForceMove = false; public readonly bool RequiresForceMove = false;
[Desc("Cursor to display when able to enter target actor.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
[Desc("Cursor to display when unable to enter target actor.")]
public readonly string EnterBlockedCursor = "enter-blocked"; public readonly string EnterBlockedCursor = "enter-blocked";
public override object Create(ActorInitializer init) { return new TransformsIntoPassenger(init.Self, this); } public override object Create(ActorInitializer init) { return new TransformsIntoPassenger(init.Self, this); }

View File

@@ -33,7 +33,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Require the force-move modifier to display the enter cursor.")] [Desc("Require the force-move modifier to display the enter cursor.")]
public readonly bool RequiresForceMove = false; public readonly bool RequiresForceMove = false;
[Desc("Cursor to display when able to be repaired at target actor.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
[Desc("Cursor to display when unable to be repaired at target actor.")]
public readonly string EnterBlockedCursor = "enter-blocked"; public readonly string EnterBlockedCursor = "enter-blocked";
public override object Create(ActorInitializer init) { return new TransformsIntoRepairable(init.Self, this); } public override object Create(ActorInitializer init) { return new TransformsIntoRepairable(init.Self, this); }

View File

@@ -46,8 +46,13 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Stance that the structure's previous owner needs to have for the capturing player to receive Experience.")] [Desc("Stance that the structure's previous owner needs to have for the capturing player to receive Experience.")]
public readonly Stance PlayerExperienceStances = Stance.Enemy; public readonly Stance PlayerExperienceStances = Stance.Enemy;
[Desc("Cursor to display when the health of the target actor is above the sabotage threshold.")]
public readonly string SabotageCursor = "capture"; public readonly string SabotageCursor = "capture";
[Desc("Cursor to display when able to capture the target actor.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
[Desc("Cursor to display when unable to capture the target actor.")]
public readonly string EnterBlockedCursor = "enter-blocked"; public readonly string EnterBlockedCursor = "enter-blocked";
[VoiceReference] [VoiceReference]

View File

@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Sound to play when delivering cash")] [Desc("Sound to play when delivering cash")]
public readonly string[] Sounds = { }; public readonly string[] Sounds = { };
[Desc("Cursor to show when hovering over a valid actor to deliver cash to.")] [Desc("Cursor to display when hovering over a valid actor to deliver cash to.")]
public readonly string Cursor = "enter"; public readonly string Cursor = "enter";
[VoiceReference] [VoiceReference]

View File

@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Identifier checked against AcceptsDeliveredExperience.ValidTypes. Only needed if the latter is not empty.")] [Desc("Identifier checked against AcceptsDeliveredExperience.ValidTypes. Only needed if the latter is not empty.")]
public readonly string Type = null; public readonly string Type = null;
[Desc("Cursor to show when hovering over a valid actor to deliver experience to.")] [Desc("Cursor to display when hovering over a valid actor to deliver experience to.")]
public readonly string Cursor = "enter"; public readonly string Cursor = "enter";
[VoiceReference] [VoiceReference]

View File

@@ -44,6 +44,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly Stance TargetStances = Stance.Enemy | Stance.Neutral; public readonly Stance TargetStances = Stance.Enemy | Stance.Neutral;
public readonly Stance ForceTargetStances = Stance.Enemy | Stance.Neutral | Stance.Ally; public readonly Stance ForceTargetStances = Stance.Enemy | Stance.Neutral | Stance.Ally;
[Desc("Cursor to display when hovering over a demolishable target.")]
public readonly string Cursor = "c4"; public readonly string Cursor = "c4";
public override object Create(ActorInitializer init) { return new Demolition(this); } public override object Create(ActorInitializer init) { return new Demolition(this); }

View File

@@ -37,10 +37,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Sound to play when repairing is done.")] [Desc("Sound to play when repairing is done.")]
public readonly string RepairSound = null; public readonly string RepairSound = null;
[Desc("Cursor to show when hovering over a valid actor to repair.")] [Desc("Cursor to display when hovering over a valid actor to repair.")]
public readonly string Cursor = "goldwrench"; public readonly string Cursor = "goldwrench";
[Desc("Cursor to show when target actor has full health so it can't be repaired.")] [Desc("Cursor to display when target actor has full health so it can't be repaired.")]
public readonly string RepairBlockedCursor = "goldwrench-blocked"; public readonly string RepairBlockedCursor = "goldwrench-blocked";
public override object Create(ActorInitializer init) { return new EngineerRepair(init, this); } public override object Create(ActorInitializer init) { return new EngineerRepair(init, this); }

View File

@@ -22,7 +22,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("This actor can interact with TunnelEntrances to move through TerrainTunnels.")] [Desc("This actor can interact with TunnelEntrances to move through TerrainTunnels.")]
public class EntersTunnelsInfo : TraitInfo, Requires<IMoveInfo>, IObservesVariablesInfo public class EntersTunnelsInfo : TraitInfo, Requires<IMoveInfo>, IObservesVariablesInfo
{ {
[Desc("Cursor to display when able to enter target tunnel.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
[Desc("Cursor to display when unable to enter target tunnel.")]
public readonly string EnterBlockedCursor = "enter-blocked"; public readonly string EnterBlockedCursor = "enter-blocked";
[VoiceReference] [VoiceReference]

View File

@@ -84,7 +84,10 @@ namespace OpenRA.Mods.Common.Traits
[VoiceReference] [VoiceReference]
public readonly string DeliverVoice = "Action"; public readonly string DeliverVoice = "Action";
[Desc("Cursor to display when able to unload at target actor.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
[Desc("Cursor to display when unable to unload at target actor.")]
public readonly string EnterBlockedCursor = "enter-blocked"; public readonly string EnterBlockedCursor = "enter-blocked";
public override object Create(ActorInitializer init) { return new Harvester(init.Self, this); } public override object Create(ActorInitializer init) { return new Harvester(init.Self, this); }

View File

@@ -37,7 +37,10 @@ namespace OpenRA.Mods.Common.Traits
public readonly int Speed = 1; public readonly int Speed = 1;
[Desc("Cursor to display when a move order can be issued at target location.")]
public readonly string Cursor = "move"; public readonly string Cursor = "move";
[Desc("Cursor to display when a move order cannot be issued at target location.")]
public readonly string BlockedCursor = "move-blocked"; public readonly string BlockedCursor = "move-blocked";
[VoiceReference] [VoiceReference]

View File

@@ -47,7 +47,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Boolean expression defining the condition under which the regular (non-force) enter cursor is disabled.")] [Desc("Boolean expression defining the condition under which the regular (non-force) enter cursor is disabled.")]
public readonly BooleanExpression RequireForceMoveCondition = null; public readonly BooleanExpression RequireForceMoveCondition = null;
[Desc("Cursor to display when able to enter target actor.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
[Desc("Cursor to display when unable to enter target actor.")]
public readonly string EnterBlockedCursor = "enter-blocked"; public readonly string EnterBlockedCursor = "enter-blocked";
public override object Create(ActorInitializer init) { return new Passenger(this); } public override object Create(ActorInitializer init) { return new Passenger(this); }

View File

@@ -37,7 +37,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Boolean expression defining the condition under which the regular (non-force) enter cursor is disabled.")] [Desc("Boolean expression defining the condition under which the regular (non-force) enter cursor is disabled.")]
public readonly BooleanExpression RequireForceMoveCondition = null; public readonly BooleanExpression RequireForceMoveCondition = null;
[Desc("Cursor to display when able to be repaired at target actor.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
[Desc("Cursor to display when unable to be repaired at target actor.")]
public readonly string EnterBlockedCursor = "enter-blocked"; public readonly string EnterBlockedCursor = "enter-blocked";
public override object Create(ActorInitializer init) { return new Repairable(init.Self, this); } public override object Create(ActorInitializer init) { return new Repairable(init.Self, this); }

View File

@@ -34,7 +34,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Boolean expression defining the condition under which the regular (non-force) enter cursor is disabled.")] [Desc("Boolean expression defining the condition under which the regular (non-force) enter cursor is disabled.")]
public readonly BooleanExpression RequireForceMoveCondition = null; public readonly BooleanExpression RequireForceMoveCondition = null;
[Desc("Cursor to display when able to be repaired near target actor.")]
public readonly string EnterCursor = "enter"; public readonly string EnterCursor = "enter";
[Desc("Cursor to display when unable to be repaired near target actor.")]
public readonly string EnterBlockedCursor = "enter-blocked"; public readonly string EnterBlockedCursor = "enter-blocked";
public override object Create(ActorInitializer init) { return new RepairableNear(init.Self, this); } public override object Create(ActorInitializer init) { return new RepairableNear(init.Self, this); }

View File

@@ -27,10 +27,10 @@ namespace OpenRA.Mods.Common.Traits
"Possible values are Exit, Suicide, Dispose.")] "Possible values are Exit, Suicide, Dispose.")]
public readonly EnterBehaviour EnterBehaviour = EnterBehaviour.Dispose; public readonly EnterBehaviour EnterBehaviour = EnterBehaviour.Dispose;
[Desc("Cursor to use when targeting an unrepaired bridge.")] [Desc("Cursor to display when targeting an unrepaired bridge.")]
public readonly string TargetCursor = "goldwrench"; public readonly string TargetCursor = "goldwrench";
[Desc("Cursor to use when repairing is denied.")] [Desc("Cursor to display when repairing is denied.")]
public readonly string TargetBlockedCursor = "goldwrench-blocked"; public readonly string TargetBlockedCursor = "goldwrench-blocked";
[NotificationReference("Speech")] [NotificationReference("Speech")]

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Skip playing (reversed) make animation.")] [Desc("Skip playing (reversed) make animation.")]
public readonly bool SkipMakeAnimation = false; public readonly bool SkipMakeAnimation = false;
[Desc("Cursor type to use when the sell order generator hovers over this actor.")] [Desc("Cursor to display when the sell order generator hovers over this actor.")]
public readonly string Cursor = "sell"; public readonly string Cursor = "sell";
public override object Create(ActorInitializer init) { return new Sellable(init.Self, this); } public override object Create(ActorInitializer init) { return new Sellable(init.Self, this); }