Use faction keys for shell identity

This commit is contained in:
Meta Vens 2026-06-16 11:43:37 +01:00
commit 8ea97a08f8
11 changed files with 77 additions and 10 deletions

View file

@ -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]);
}
}
}