diff --git a/Content.Client/Fax/AdminUI/AdminFaxEui.cs b/Content.Client/Fax/AdminUI/AdminFaxEui.cs
index 452c54eb797..3e79e2c6870 100644
--- a/Content.Client/Fax/AdminUI/AdminFaxEui.cs
+++ b/Content.Client/Fax/AdminUI/AdminFaxEui.cs
@@ -16,7 +16,7 @@ public AdminFaxEui()
_window.OnClose += () => SendMessage(new AdminFaxEuiMsg.Close());
_window.OnFollowFax += entity => SendMessage(new AdminFaxEuiMsg.Follow(entity));
_window.OnMessageSend += args => SendMessage(new AdminFaxEuiMsg.Send(args.entity, args.title,
- args.stampedBy, args.message, args.stampSprite, args.stampColor, args.locked));
+ args.stampedBy, args.message, args.stampSprite, args.stampColor, args.locked, args.stampProtected)); // Frontier
}
public override void Opened()
diff --git a/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml b/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml
index dc4092a3b53..6a8b1ee8e76 100644
--- a/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml
+++ b/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml
@@ -24,6 +24,9 @@
+
+
+
diff --git a/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml.cs b/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml.cs
index 698b3114b7d..2905c8ec1fb 100644
--- a/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml.cs
+++ b/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml.cs
@@ -14,7 +14,7 @@ public sealed partial class AdminFaxWindow : DefaultWindow
{
private const string StampsRsiPath = "/Textures/Objects/Misc/bureaucracy.rsi";
- public Action<(NetEntity entity, string title, string stampedBy, string message, string stampSprite, Color stampColor, bool locked)>? OnMessageSend;
+ public Action<(NetEntity entity, string title, string stampedBy, string message, string stampSprite, Color stampColor, bool locked, bool stampProtected)>? OnMessageSend; // Frontier: add stampProtected
public Action? OnFollowFax;
[Dependency] private readonly IResourceCache _resCache = default!;
@@ -99,6 +99,7 @@ private void SendMessage(BaseButton.ButtonEventArgs obj)
var from = FromEdit.Text;
var stampColor = StampColorSelector.Color;
var locked = LockPageCheckbox.Pressed;
- OnMessageSend?.Invoke((faxEntity.Value, title, from, message, stamp, stampColor, locked));
+ var stampProtected = StampProtectPageCheckbox.Pressed; // Frontier
+ OnMessageSend?.Invoke((faxEntity.Value, title, from, message, stamp, stampColor, locked, stampProtected)); // Frontier: add stampProtected
}
}
diff --git a/Content.Server/Fax/AdminUI/AdminFaxEui.cs b/Content.Server/Fax/AdminUI/AdminFaxEui.cs
index fe6b03fab7b..76cb4ebbc09 100644
--- a/Content.Server/Fax/AdminUI/AdminFaxEui.cs
+++ b/Content.Server/Fax/AdminUI/AdminFaxEui.cs
@@ -58,7 +58,7 @@ public override void HandleMessage(EuiMessageBase msg)
{
var printout = new FaxPrintout(sendData.Content, sendData.Title, null, null, sendData.StampState,
new() { new StampDisplayInfo { StampedName = sendData.From, StampedColor = sendData.StampColor } },
- locked: sendData.Locked);
+ locked: sendData.Locked, stampProtected: sendData.StampProtected); // Frontier: add StampProtected
_faxSystem.Receive(_entityManager.GetEntity(sendData.Target), printout);
break;
}
diff --git a/Content.Server/Fax/FaxConstants.cs b/Content.Server/Fax/FaxConstants.cs
index 4b0ff7853eb..2435f7a2b3e 100644
--- a/Content.Server/Fax/FaxConstants.cs
+++ b/Content.Server/Fax/FaxConstants.cs
@@ -30,4 +30,5 @@ public static class FaxConstants
public const string FaxPaperStampedByData = "fax_data_stamped_by";
public const string FaxSyndicateData = "fax_data_i_am_syndicate";
public const string FaxPaperLockedData = "fax_data_locked";
+ public const string FaxPaperStampProtectedData = "fax_data_stamp_protected"; // Frontier: stamp protection
}
diff --git a/Content.Server/Fax/FaxSystem.cs b/Content.Server/Fax/FaxSystem.cs
index 38b781970f2..80a78d8fbf7 100644
--- a/Content.Server/Fax/FaxSystem.cs
+++ b/Content.Server/Fax/FaxSystem.cs
@@ -32,6 +32,7 @@
using Robust.Shared.Prototypes;
using Content.Shared.NameModifier.Components;
using Content.Shared.Power;
+using Content.Shared.Tag; // Frontier
namespace Content.Server.Fax;
@@ -52,6 +53,7 @@ public sealed class FaxSystem : EntitySystem
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly FaxecuteSystem _faxecute = default!;
+ [Dependency] private readonly TagSystem _tag = default!; // Frontier
private const string PaperSlotId = "Paper";
@@ -298,8 +300,9 @@ private void OnPacketReceived(EntityUid uid, FaxMachineComponent component, Devi
args.Data.TryGetValue(FaxConstants.FaxPaperStampedByData, out List? stampedBy);
args.Data.TryGetValue(FaxConstants.FaxPaperPrototypeData, out string? prototypeId);
args.Data.TryGetValue(FaxConstants.FaxPaperLockedData, out bool? locked);
+ args.Data.TryGetValue(FaxConstants.FaxPaperStampProtectedData, out bool? stampProtected); // Frontier
- var printout = new FaxPrintout(content, name, label, prototypeId, stampState, stampedBy, locked ?? false);
+ var printout = new FaxPrintout(content, name, label, prototypeId, stampState, stampedBy, locked ?? false, stampProtected ?? false); // Frontier: add stampProtected
Receive(uid, printout, args.SenderAddress);
break;
@@ -469,7 +472,8 @@ public void Copy(EntityUid uid, FaxMachineComponent? component, FaxCopyMessage a
metadata.EntityPrototype?.ID ?? component.PrintPaperId,
paper.StampState,
paper.StampedBy,
- paper.EditingDisabled);
+ paper.EditingDisabled,
+ _tag.HasTag(sendEntity.Value, "NFPaperStampProtected")); // Frontier: add stamp protection
component.PrintingQueue.Enqueue(printout);
component.SendTimeoutRemaining += component.SendTimeout;
@@ -527,6 +531,7 @@ public void Send(EntityUid uid, FaxMachineComponent? component, FaxSendMessage a
{ FaxConstants.FaxPaperLabelData, labelComponent?.CurrentLabel },
{ FaxConstants.FaxPaperContentData, paper.Content },
{ FaxConstants.FaxPaperLockedData, paper.EditingDisabled },
+ { FaxConstants.FaxPaperStampProtectedData, _tag.HasTag(sendEntity.Value, "NFPaperStampProtected") }, // Frontier
};
if (metadata.EntityPrototype != null)
@@ -613,6 +618,13 @@ private void SpawnPaperFromQueue(EntityUid uid, FaxMachineComponent? component =
}
paper.EditingDisabled = printout.Locked;
+
+ // Frontier: stamp protection
+ if (printout.StampProtected)
+ {
+ _tag.AddTag(printed, "NFPaperStampProtected");
+ }
+ // End Frontier
}
_metaData.SetEntityName(printed, printout.Name);
diff --git a/Content.Server/Nuke/NukeCodePaperSystem.cs b/Content.Server/Nuke/NukeCodePaperSystem.cs
index aac2d2361d0..dc53900c42c 100644
--- a/Content.Server/Nuke/NukeCodePaperSystem.cs
+++ b/Content.Server/Nuke/NukeCodePaperSystem.cs
@@ -71,7 +71,8 @@ public bool SendNukeCodes(EntityUid station)
new List
{
new StampDisplayInfo { StampedName = Loc.GetString("stamp-component-stamped-name-centcom"), StampedColor = Color.FromHex("#BB3232") },
- }
+ },
+ stampProtected: true // Frontier: centcom signed, should be protected
);
_faxSystem.Receive(faxEnt, printout, null, fax);
diff --git a/Content.Server/_NF/StationEvents/Components/RandomFaxRuleComponent.cs b/Content.Server/_NF/StationEvents/Components/RandomFaxRuleComponent.cs
index 2cb084e6413..4a1386ac4d8 100644
--- a/Content.Server/_NF/StationEvents/Components/RandomFaxRuleComponent.cs
+++ b/Content.Server/_NF/StationEvents/Components/RandomFaxRuleComponent.cs
@@ -32,6 +32,9 @@ public sealed partial class RandomFaxRuleComponent : Component
[DataField]
public bool Locked { get; private set; }
+ [DataField]
+ public bool StampProtected { get; private set; }
+
///
/// The localized string
///
@@ -101,4 +104,5 @@ public sealed partial class EditableFaxPrintout
public string? StampState;
public List StampedBy = new();
public bool Locked;
+ public bool StampProtected;
}
\ No newline at end of file
diff --git a/Content.Server/_NF/StationEvents/Events/RandomFaxRule.cs b/Content.Server/_NF/StationEvents/Events/RandomFaxRule.cs
index 4593e98ed92..69347f7daac 100644
--- a/Content.Server/_NF/StationEvents/Events/RandomFaxRule.cs
+++ b/Content.Server/_NF/StationEvents/Events/RandomFaxRule.cs
@@ -79,7 +79,8 @@ protected override void Started(EntityUid uid, RandomFaxRuleComponent component,
PrototypeId = component.PrototypeId,
StampState = component.StampState,
StampedBy = component.StampedBy ?? new(),
- Locked = component.Locked
+ Locked = component.Locked,
+ StampProtected = component.StampProtected, // Frontier
};
string? localAddress = component.FromAddress;
if (component.PreFaxActions != null)
@@ -113,7 +114,8 @@ protected override void Started(EntityUid uid, RandomFaxRuleComponent component,
prototypeId: recipientPrintout.PrototypeId,
stampState: recipientPrintout.StampState,
stampedBy: recipientPrintout.StampedBy,
- locked: recipientPrintout.Locked
+ locked: recipientPrintout.Locked,
+ stampProtected: recipientPrintout.StampProtected
);
_faxSystem.Receive(faxUid, printout, recipientAddress, faxComp);
break;
diff --git a/Content.Shared/Fax/AdminFaxEui.cs b/Content.Shared/Fax/AdminFaxEui.cs
index 613a13d0124..eccc9cbba01 100644
--- a/Content.Shared/Fax/AdminFaxEui.cs
+++ b/Content.Shared/Fax/AdminFaxEui.cs
@@ -57,8 +57,9 @@ public sealed class Send : EuiMessageBase
public string StampState { get; }
public Color StampColor { get; }
public bool Locked { get; }
+ public bool StampProtected { get; } // Frontier
- public Send(NetEntity target, string title, string from, string content, string stamp, Color stampColor, bool locked)
+ public Send(NetEntity target, string title, string from, string content, string stamp, Color stampColor, bool locked, bool stampProtected) // Frontier: stampProtected
{
Target = target;
Title = title;
@@ -67,6 +68,7 @@ public Send(NetEntity target, string title, string from, string content, string
StampState = stamp;
StampColor = stampColor;
Locked = locked;
+ StampProtected = stampProtected; // Frontier
}
}
}
diff --git a/Content.Shared/Fax/Components/FaxMachineComponent.cs b/Content.Shared/Fax/Components/FaxMachineComponent.cs
index 1d4102652b0..b417dd9ec66 100644
--- a/Content.Shared/Fax/Components/FaxMachineComponent.cs
+++ b/Content.Shared/Fax/Components/FaxMachineComponent.cs
@@ -202,11 +202,14 @@ public sealed partial class FaxPrintout
[DataField]
public bool Locked { get; private set; }
+ [DataField] // Frontier
+ public bool StampProtected { get; private set; } // Frontier
+
private FaxPrintout()
{
}
- public FaxPrintout(string content, string name, string? label = null, string? prototypeId = null, string? stampState = null, List? stampedBy = null, bool locked = false)
+ public FaxPrintout(string content, string name, string? label = null, string? prototypeId = null, string? stampState = null, List? stampedBy = null, bool locked = false, bool stampProtected = false) // Frontier: add stampProtected
{
Content = content;
Name = name;
@@ -215,5 +218,6 @@ public FaxPrintout(string content, string name, string? label = null, string? pr
StampState = stampState;
StampedBy = stampedBy ?? new List();
Locked = locked;
+ StampProtected = stampProtected; // Frontier
}
}
diff --git a/Resources/Locale/en-US/fax/fax-admin.ftl b/Resources/Locale/en-US/fax/fax-admin.ftl
index 8a8f37809e1..49ec94032ca 100644
--- a/Resources/Locale/en-US/fax/fax-admin.ftl
+++ b/Resources/Locale/en-US/fax/fax-admin.ftl
@@ -12,5 +12,12 @@ admin-fax-message-placeholder = Your message here...
admin-fax-stamp = Stamp icon:
admin-fax-stamp-color = Stamp color:
admin-fax-send = Send
-admin-fax-lock-page = Lock Page
-admin-fax-lock-page-tooltip = Lock the paper such that it cannot be edited even by things such as cybersun pens.
+# Frontier: edit lock page
+admin-fax-lock-page = Lock Page (uneditable)
+admin-fax-lock-page-tooltip = Lock the paper such that it cannot be edited at all.
+# End Frontier
+
+# Frontier: stamp protection
+admin-fax-stamp-protect-page = Block Cybersun Pen
+admin-fax-stamp-protect-page-tooltip = Prevent the paper from being edited by Cybersun pens.
+# End Frontier: stamp protection