Use named pathfinding constants.

- Rename CostForInvalidCell to PathCostForInvalidPath
- Add MovementCostForUnreachableCell
- Update usages of int.MaxValue and short.Maxvalue to use named constants where relevant.
- Update costs on ICustomMovementLayer to return short, for consistency with costs from Locomotor.
- Rename some methods to distinguish between path/movement cost.
This commit is contained in:
RoosterDragon
2021-10-08 20:35:33 +01:00
committed by abcdefg30
parent 884e6cdb51
commit df9398a871
16 changed files with 57 additions and 54 deletions

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
public class SubterraneanLocomotorInfo : LocomotorInfo
{
[Desc("Pathfinding cost for submerging or reemerging.")]
public readonly int SubterraneanTransitionCost = 0;
public readonly short SubterraneanTransitionCost = 0;
[Desc("The terrain types that this actor can transition on. Leave empty to allow any.")]
public readonly HashSet<string> SubterraneanTransitionTerrainTypes = new HashSet<string>();
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Can this actor transition on slopes?")]
public readonly bool SubterraneanTransitionOnRamps = false;
[Desc("Depth at which the subterranian condition is applied.")]
[Desc("Depth at which the subterranean condition is applied.")]
public readonly WDist SubterraneanTransitionDepth = new WDist(-1024);
public override bool DisableDomainPassabilityCheck => true;