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:
@@ -121,7 +121,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
// Make sure that the actor can collect this crate type
|
||||
// Crate can only be crushed if it is not in the air.
|
||||
return self.IsAtGroundLevel() && mi.Crushes.Contains(info.CrushClass);
|
||||
return self.IsAtGroundLevel() && mi.LocomotorInfo.Crushes.Contains(info.CrushClass);
|
||||
});
|
||||
|
||||
// Destroy the crate if none of the units in the cell are valid collectors
|
||||
|
||||
Reference in New Issue
Block a user