SubscribeLocalEvent<SiliconLawProviderComponent, GotEmaggedEvent>(OnEmagLawsAdded);
SubscribeLocalEvent<EmagSiliconLawComponent, MindAddedMessage>(OnEmagMindAdded);
SubscribeLocalEvent<EmagSiliconLawComponent, MindRemovedMessage>(OnEmagMindRemoved);
- SubscribeLocalEvent<EmagSiliconLawComponent, ExaminedEvent>(OnExamined);
}
private void OnComponentShutdown(EntityUid uid, SiliconLawBoundComponent component, ComponentShutdown args)
});
}
- private void OnExamined(EntityUid uid, EmagSiliconLawComponent component, ExaminedEvent args)
- {
- if (!args.IsInDetailsRange || !HasComp<EmaggedComponent>(uid))
- return;
-
- if (component.RequireOpenPanel && TryComp<WiresPanelComponent>(uid, out var panel) && !panel.Open)
- return;
-
- args.PushMarkup(Loc.GetString("laws-compromised-examine"));
- }
-
protected override void OnGotEmagged(EntityUid uid, EmagSiliconLawComponent component, ref GotEmaggedEvent args)
{
if (component.RequireOpenPanel && TryComp<WiresPanelComponent>(uid, out var panel) && !panel.Open)
laws-notify = You are bound to silicon laws, which you can view via the sidebar action. You are required to always follow your laws.
laws-update-notify = Your laws have been updated. You can view the changes via the sidebar action.
-
-laws-compromised-examine = The [color=red]law-governing[/color] internals seem damaged...