Split Locomotor trait from Mobile
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
This commit is contained in:
@@ -185,8 +185,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
// Start a search from each refinery's delivery location:
|
||||
List<CPos> path;
|
||||
var mi = self.Info.TraitInfo<MobileInfo>();
|
||||
using (var search = PathSearch.FromPoints(self.World, mi, self, refs.Values.Select(r => r.Location), self.Location, false)
|
||||
var li = self.Info.TraitInfo<MobileInfo>().LocomotorInfo;
|
||||
using (var search = PathSearch.FromPoints(self.World, li, self, refs.Values.Select(r => r.Location), self.Location, false)
|
||||
.WithCustomCost(loc =>
|
||||
{
|
||||
if (!refs.ContainsKey(loc))
|
||||
|
||||
Reference in New Issue
Block a user