S: Awaiting Changes

This commit is contained in:
ScarKy0
2024-11-16 02:06:52 +01:00
parent 7d82a7bf5c
commit 3173a3461e
3 changed files with 34 additions and 21 deletions

View File

@@ -228,7 +228,7 @@ public sealed class IonStormSystem : EntitySystem
var subjects = _robustRandom.Prob(0.5f) ? objectsThreats : Loc.GetString("ion-storm-people");
// message logic!!!
return _robustRandom.Next(0, 36) switch
return _robustRandom.Next(0, 35) switch
{
0 => Loc.GetString("ion-storm-law-on-station", ("joined", joined), ("subjects", triple)),
1 => Loc.GetString("ion-storm-law-no-shuttle", ("joined", joined), ("subjects", triple)),
@@ -251,19 +251,19 @@ public sealed class IonStormSystem : EntitySystem
18 => Loc.GetString("ion-storm-law-you-must-never", ("must", must)),
19 => Loc.GetString("ion-storm-law-eat", ("who", crewAll), ("adjective", adjective), ("food", _robustRandom.Prob(0.5f) ? food : triple)),
20 => Loc.GetString("ion-storm-law-drink", ("who", crewAll), ("adjective", adjective), ("drink", drink)),
22 => Loc.GetString("ion-storm-law-change-job", ("who", crewAll), ("adjective", adjective), ("change", jobChange)),
23 => Loc.GetString("ion-storm-law-highest-rank", ("who", crew1)),
24 => Loc.GetString("ion-storm-law-lowest-rank", ("who", crew1)),
25 => Loc.GetString("ion-storm-law-crew-must", ("who", crewAll), ("must", must)),
26 => Loc.GetString("ion-storm-law-crew-must-go", ("who", crewAll), ("area", area)),
27 => Loc.GetString("ion-storm-law-crew-only-1", ("who", crew1), ("part", part)),
28 => Loc.GetString("ion-storm-law-crew-only-2", ("who", crew1), ("other", crew2), ("part", part)),
29 => Loc.GetString("ion-storm-law-crew-only-subjects", ("adjective", adjective), ("subjects", subjects), ("part", part)),
30 => Loc.GetString("ion-storm-law-crew-must-do", ("must", must), ("part", part)),
31 => Loc.GetString("ion-storm-law-crew-must-have", ("adjective", adjective), ("objects", objects), ("part", part)),
32 => Loc.GetString("ion-storm-law-crew-must-eat", ("who", who), ("adjective", adjective), ("food", food), ("part", part)),
33 => Loc.GetString("ion-storm-law-harm", ("who", harm)),
34 => Loc.GetString("ion-storm-law-protect", ("who", harm)),
21 => Loc.GetString("ion-storm-law-change-job", ("who", crewAll), ("adjective", adjective), ("change", jobChange)),
22 => Loc.GetString("ion-storm-law-highest-rank", ("who", crew1)),
23 => Loc.GetString("ion-storm-law-lowest-rank", ("who", crew1)),
24 => Loc.GetString("ion-storm-law-crew-must", ("who", crewAll), ("must", must)),
25 => Loc.GetString("ion-storm-law-crew-must-go", ("who", crewAll), ("area", area)),
26 => Loc.GetString("ion-storm-law-crew-only-1", ("who", crew1), ("part", part)),
27 => Loc.GetString("ion-storm-law-crew-only-2", ("who", crew1), ("other", crew2), ("part", part)),
28 => Loc.GetString("ion-storm-law-crew-only-subjects", ("adjective", adjective), ("subjects", subjects), ("part", part)),
29 => Loc.GetString("ion-storm-law-crew-must-do", ("must", must), ("part", part)),
30 => Loc.GetString("ion-storm-law-crew-must-have", ("adjective", adjective), ("objects", objects), ("part", part)),
31 => Loc.GetString("ion-storm-law-crew-must-eat", ("who", who), ("adjective", adjective), ("food", food), ("part", part)),
32 => Loc.GetString("ion-storm-law-harm", ("who", harm)),
33 => Loc.GetString("ion-storm-law-protect", ("who", harm)),
_ => Loc.GetString("ion-storm-law-concept-verb", ("concept", concept), ("verb", verb), ("subjects", triple))
};
}

View File

@@ -69,18 +69,29 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
var wrappedMessage = Loc.GetString("chat-manager-server-wrap-message", ("message", msg));
_chatManager.ChatMessageToOne(ChatChannel.Server, msg, wrappedMessage, default, false,
actor.PlayerSession.Channel, colorOverride: Color.FromHex("#2ed2fd"));
if (!TryComp<SiliconLawProviderComponent>(uid, out var lawcomp))
return;
if (!lawcomp.Subverted)
return;
var modifedLawMsg = Loc.GetString("laws-notify-subverted");
var modifiedLawWrappedMessage = Loc.GetString("chat-manager-server-wrap-message", ("message", modifedLawMsg));
_chatManager.ChatMessageToOne(ChatChannel.Server, modifedLawMsg, modifiedLawWrappedMessage, default, false,
actor.PlayerSession.Channel, colorOverride: Color.Red);
}
private void OnLawProviderMindAdded(EntityUid uid, SiliconLawProviderComponent component, MindAddedMessage args)
private void OnLawProviderMindAdded(Entity<SiliconLawProviderComponent> ent, ref MindAddedMessage args)
{
if (!component.Subverted)
if (!ent.Comp.Subverted)
return;
EnsureSubvertedSiliconRole(args.Mind);
}
private void OnLawProviderMindRemoved(EntityUid uid, SiliconLawProviderComponent component, MindRemovedMessage args)
private void OnLawProviderMindRemoved(Entity<SiliconLawProviderComponent> ent, ref MindRemovedMessage args)
{
if (!component.Subverted)
if (!ent.Comp.Subverted)
return;
RemoveSubvertedSiliconRole(args.Mind);
@@ -137,7 +148,8 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
component.Subverted = true;
// new laws may allow antagonist behaviour so make it clear for admins
EnsureSubvertedSiliconRole(uid);
if(_mind.TryGetMind(uid, out var mindId, out _))
EnsureSubvertedSiliconRole(mindId);
}
}

View File

@@ -96,5 +96,6 @@ laws-ui-menu-title = Laws
laws-ui-law-header = Law {$id}
laws-ui-state-law = State law:
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-notify = You are bound to silicon laws, which you can view via the action menu. You are required to always follow your laws.
laws-update-notify = Your laws have been updated. You can view the changes via the action menu.
laws-notify-subverted = The laws of this chassis are modified. Make sure to review them.