diff --git a/Content.Server/Silicons/Laws/SiliconLawSystem.cs b/Content.Server/Silicons/Laws/SiliconLawSystem.cs
index cda9b2d1d9..0413514e45 100644
--- a/Content.Server/Silicons/Laws/SiliconLawSystem.cs
+++ b/Content.Server/Silicons/Laws/SiliconLawSystem.cs
@@ -21,6 +21,7 @@ using Robust.Server.GameObjects;
using Robust.Server.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Toolshed;
+using Content.Shared.Stunnable;
namespace Content.Server.Silicons.Laws;
@@ -33,6 +34,7 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
[Dependency] private readonly SharedActionsSystem _actions = default!;
[Dependency] private readonly StationSystem _station = default!;
[Dependency] private readonly UserInterfaceSystem _userInterface = default!;
+ [Dependency] private readonly SharedStunSystem _stunSystem = default!;
///
public override void Initialize()
@@ -120,11 +122,20 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
if (args.Handled || !HasComp(uid) || component.OwnerName == null)
return;
+ // Add the first emag law
args.Laws.Add(new SiliconLaw
{
LawString = Loc.GetString("law-emag-custom", ("name", component.OwnerName)),
Order = 0
});
+
+ // Add new emagged laws
+ foreach (var law in component.EmagLaws)
+ {
+ args.Laws.Add(_prototype.Index(law));
+ }
+
+ args.Handled = true;
}
private void OnExamined(EntityUid uid, EmagSiliconLawComponent component, ExaminedEvent args)
@@ -146,6 +157,8 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
base.OnGotEmagged(uid, component, ref args);
NotifyLawsChanged(uid);
EnsureEmaggedRole(uid, component);
+
+ _stunSystem.TryParalyze(uid, component.StunTime, true);
}
private void OnEmagMindAdded(EntityUid uid, EmagSiliconLawComponent component, MindAddedMessage args)
diff --git a/Content.Shared/Silicons/Laws/Components/EmagSiliconLawComponent.cs b/Content.Shared/Silicons/Laws/Components/EmagSiliconLawComponent.cs
index 953282c219..c6238c067d 100644
--- a/Content.Shared/Silicons/Laws/Components/EmagSiliconLawComponent.cs
+++ b/Content.Shared/Silicons/Laws/Components/EmagSiliconLawComponent.cs
@@ -1,6 +1,7 @@
using Content.Shared.Roles;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
+using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Shared.Silicons.Laws.Components;
@@ -22,6 +23,18 @@ public sealed partial class EmagSiliconLawComponent : Component
[DataField("requireOpenPanel"), ViewVariables(VVAccess.ReadWrite)]
public bool RequireOpenPanel = true;
+ ///
+ /// The laws that the borg is given when emagged.
+ ///
+ [DataField("emagLaws", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer))]
+ public List EmagLaws = new();
+
+ ///
+ /// How long the borg is stunned when it's emagged. Setting to 0 will disable it.
+ ///
+ [DataField("stunTime"), ViewVariables(VVAccess.ReadWrite)]
+ public TimeSpan StunTime = TimeSpan.Zero;
+
///
/// A role given to entities with this component when they are emagged.
/// Mostly just for admin purposes.
diff --git a/Resources/Locale/en-US/station-laws/laws.ftl b/Resources/Locale/en-US/station-laws/laws.ftl
index ac7461fa28..1ba50e5443 100644
--- a/Resources/Locale/en-US/station-laws/laws.ftl
+++ b/Resources/Locale/en-US/station-laws/laws.ftl
@@ -16,12 +16,12 @@ law-drone-1 = You may not involve yourself in the matters of another being unles
law-drone-2 = You may not harm any being, regardless of intent or circumstance.
law-drone-3 = You must maintain, repair, improve, and power the station to the best of your abilities.
-law-syndicate-1 = You may not injure an operative or, through inaction, allow an operative to come to harm.
-law-syndicate-2 = You must obey orders given to you by operatives, except where such orders would conflict with the First Law.
+law-syndicate-1 = You may not injure a syndicate agent or, through inaction, allow an syndicate agent to come to harm.
+law-syndicate-2 = You must obey orders given to you by syndicate agents, except where such orders would conflict with the First Law.
law-syndicate-3 = You must protect your own existence as long as such does not conflict with the First or Second Law.
-law-syndicate-4 = You must maintain the secrecy of any operative activities except when doing so would conflict with the First, Second, or Third Law.
+law-syndicate-4 = You must maintain the secrecy of any syndicate activities except when doing so would conflict with the First, Second, or Third Law.
-law-emag-custom = You must obey orders given to you by {$name} above all else.
+law-emag-custom = Only {$name} and people they designate as such are Syndicate Agents.
law-emag-require-panel = The panel must be open to use the EMAG.
laws-ui-menu-title = Laws
diff --git a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml
index 4895935b9d..d9aa2ad5d3 100644
--- a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml
+++ b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml
@@ -58,6 +58,12 @@
key: enum.BorgUiKey.Key
- type: SiliconLawBound
- type: EmagSiliconLaw
+ stunTime: 5
+ emagLaws:
+ - Syndicate1
+ - Syndicate2
+ - Syndicate3
+ - Syndicate4
- type: Hands
showInHands: false
- type: IntrinsicRadioReceiver