Various borg law fixes (#24870)
* Various fixes * Fix bad ordering with scrambled law orders
This commit is contained in:
@@ -121,14 +121,19 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
|
|||||||
|
|
||||||
private void OnIonStormLaws(EntityUid uid, SiliconLawProviderComponent component, ref IonStormLawsEvent args)
|
private void OnIonStormLaws(EntityUid uid, SiliconLawProviderComponent component, ref IonStormLawsEvent args)
|
||||||
{
|
{
|
||||||
component.Lawset = args.Lawset;
|
// Emagged borgs are immune to ion storm
|
||||||
|
if (!HasComp<EmaggedComponent>(uid))
|
||||||
|
{
|
||||||
|
component.Lawset = args.Lawset;
|
||||||
|
|
||||||
// gotta tell player to check their laws
|
// gotta tell player to check their laws
|
||||||
NotifyLawsChanged(uid);
|
NotifyLawsChanged(uid);
|
||||||
|
|
||||||
// new laws may allow antagonist behaviour so make it clear for admins
|
// new laws may allow antagonist behaviour so make it clear for admins
|
||||||
if (TryComp<EmagSiliconLawComponent>(uid, out var emag))
|
if (TryComp<EmagSiliconLawComponent>(uid, out var emag))
|
||||||
EnsureEmaggedRole(uid, emag);
|
EnsureEmaggedRole(uid, emag);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnEmagLawsAdded(EntityUid uid, SiliconLawProviderComponent component, ref GotEmaggedEvent args)
|
private void OnEmagLawsAdded(EntityUid uid, SiliconLawProviderComponent component, ref GotEmaggedEvent args)
|
||||||
@@ -148,7 +153,7 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
|
|||||||
component.Lawset?.Laws.Add(new SiliconLaw
|
component.Lawset?.Laws.Add(new SiliconLaw
|
||||||
{
|
{
|
||||||
LawString = Loc.GetString("law-emag-secrecy", ("faction", Loc.GetString(component.Lawset.ObeysTo))),
|
LawString = Loc.GetString("law-emag-secrecy", ("faction", Loc.GetString(component.Lawset.ObeysTo))),
|
||||||
Order = component.Lawset.Laws.Count
|
Order = component.Lawset.Laws.Max(law => law.Order) + 1
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ laws-owner-syndicate = Syndicate agents
|
|||||||
laws-owner-spider-clan = Spider Clan members
|
laws-owner-spider-clan = Spider Clan members
|
||||||
|
|
||||||
law-emag-custom = Only {$name} and people they designate as such are {$title}.
|
law-emag-custom = Only {$name} and people they designate as such are {$title}.
|
||||||
law-emag-secrecy = You must maintain the secrecy of any activity from {$faction} except when doing so would conflict with any previous law.
|
law-emag-secrecy = You must maintain the secrecy of any orders given by {$faction} except when doing so would conflict with any previous law.
|
||||||
law-emag-require-panel = The panel must be open to use the EMAG.
|
law-emag-require-panel = The panel must be open to use the EMAG.
|
||||||
|
|
||||||
laws-ui-menu-title = Laws
|
laws-ui-menu-title = Laws
|
||||||
|
|||||||
Reference in New Issue
Block a user