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:
@@ -45,10 +45,10 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
return;
|
||||
|
||||
var mobile = crusher.TraitOrDefault<Mobile>();
|
||||
if (mobile != null && !info.DetonateClasses.Overlaps(mobile.Info.Crushes))
|
||||
if (mobile != null && !info.DetonateClasses.Overlaps(mobile.Info.LocomotorInfo.Crushes))
|
||||
return;
|
||||
|
||||
self.Kill(crusher, mobile != null ? mobile.Info.CrushDamageTypes : new HashSet<string>());
|
||||
self.Kill(crusher, mobile != null ? mobile.Info.LocomotorInfo.CrushDamageTypes : new HashSet<string>());
|
||||
}
|
||||
|
||||
bool ICrushable.CrushableBy(Actor self, Actor crusher, HashSet<string> crushClasses)
|
||||
|
||||
Reference in New Issue
Block a user