Use faction keys for shell identity
This commit is contained in:
parent
392c24a7da
commit
8ea97a08f8
11 changed files with 77 additions and 10 deletions
|
|
@ -34,7 +34,7 @@ public class FactionPresenceConstraint : ZoneConstraint
|
|||
|
||||
protected override bool TestZone(GalaxyZone zone)
|
||||
{
|
||||
return zone.Factions.Any(f=>f.ID == TargetFaction?.ID);
|
||||
return zone.Factions.Any(f => f.HasSameKey(TargetFaction));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ public class FactionOwnerConstraint : ZoneConstraint
|
|||
|
||||
protected override bool TestZone(GalaxyZone zone)
|
||||
{
|
||||
return zone.Owner.ID == TargetFaction?.ID;
|
||||
return zone.Owner?.HasSameKey(TargetFaction) ?? false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -86,4 +86,4 @@ public class DistanceConstraint : ZoneConstraint
|
|||
{
|
||||
return _targetZone != null && _test(zone.Distance[_targetZone]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue