Add an option to the admin fax menu to lock papers such that they can't be edited by cybersun pens (#28972)

* Add option to adminfax for locking papers.

* Replace dummy control with margin
This commit is contained in:
dffdff2423
2024-07-10 00:28:36 -05:00
committed by GitHub
parent 8d48096c57
commit e8b3042a38
12 changed files with 40 additions and 11 deletions

View File

@@ -102,6 +102,14 @@ namespace Content.Server.Paper
var editable = paperComp.StampedBy.Count == 0 || _tagSystem.HasTag(args.Used, "WriteIgnoreStamps");
if (_tagSystem.HasTag(args.Used, "Write") && editable)
{
if (paperComp.EditingDisabled)
{
var paperEditingDisabledMessage = Loc.GetString("paper-tamper-proof-modified-message");
_popupSystem.PopupEntity(paperEditingDisabledMessage, uid, args.User);
args.Handled = true;
return;
}
var writeEvent = new PaperWriteEvent(uid, args.User);
RaiseLocalEvent(args.Used, ref writeEvent);