- Removed implicit pip definitions and IPips interface.
New decoration traits have been added to render them.
Pip types are no longer hardcoded in OpenRA.Game.
- Decoration rendering is now managed by SelectionDecorations(Base),
which allows us to remove assumptions about the selection box
geometry from the decoration traits.
- RenderNameTag has been replaced by WithNameTagDecoration, which is
an otherwise normal decoration trait.
- Unify the configuration and reduce duplication between traits.
- Removed hardcoded references to specific selection box renderables.
- Remove legacy cruft.
Replace Constants.CellCost and Constants.DiagonalCellCost with a dynamically calculated value based on the lowest cost terrain to traverse. Using a fixed value meant the pathfinder heuristics would be incorrect.
In the four default mods, the minimum cost is in fact 100, not 125. This increase would essentially allow the pathfinder to return suboptimal paths up to 25% longer in the worst case, but it would be quicker to do so.
This is exactly what Weighted A* does - overestimate the heuristic by some factor in order to speed up the search by checking fewer routes. This makes the heuristic inadmissible and it may now return suboptimal paths, but their worst case length is bounded by the weight. A weight of 125% will never produce paths more than 25% longer than the shortest, optimal, path.
We set the default weight to 25% to effectively maintain the existing, suboptimal, behaviour due to the choice of the old constant - in future it may prove a useful tuning knob for performance.
Add GrantConditionOn*Layer traits
This allows to
- drop some booleans from Locomotor
- drop a good part of the subterranean- and jumpjet-specific code/hacks from Mobile
- grant more than 1 condition per layer type (via multiple traits)
- easily add more traits of this kind for other layers
#14558: MovingToRefinery takes actor instead of CPos
DeliveryOffset (previously added by the harvester) is now taken into account by the AutoCarryable
fix whitespaces
Otherwise the AI would consider the harvester 'idle' in too many situations.
This way, the AI now only uses its own resource search algorithm if the next resource patch is too far away for the FindResources activity to find it.