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:
@@ -300,8 +300,9 @@ public sealed class FaxSystem : EntitySystem
|
||||
args.Data.TryGetValue(FaxConstants.FaxPaperStampStateData, out string? stampState);
|
||||
args.Data.TryGetValue(FaxConstants.FaxPaperStampedByData, out List<StampDisplayInfo>? stampedBy);
|
||||
args.Data.TryGetValue(FaxConstants.FaxPaperPrototypeData, out string? prototypeId);
|
||||
args.Data.TryGetValue(FaxConstants.FaxPaperLockedData, out bool? locked);
|
||||
|
||||
var printout = new FaxPrintout(content, name, label, prototypeId, stampState, stampedBy);
|
||||
var printout = new FaxPrintout(content, name, label, prototypeId, stampState, stampedBy, locked ?? false);
|
||||
Receive(uid, printout, args.SenderAddress);
|
||||
|
||||
break;
|
||||
@@ -473,7 +474,8 @@ public sealed class FaxSystem : EntitySystem
|
||||
labelComponent?.CurrentLabel,
|
||||
metadata.EntityPrototype?.ID ?? DefaultPaperPrototypeId,
|
||||
paper.StampState,
|
||||
paper.StampedBy);
|
||||
paper.StampedBy,
|
||||
paper.EditingDisabled);
|
||||
|
||||
component.PrintingQueue.Enqueue(printout);
|
||||
component.SendTimeoutRemaining += component.SendTimeout;
|
||||
@@ -522,6 +524,7 @@ public sealed class FaxSystem : EntitySystem
|
||||
{ FaxConstants.FaxPaperNameData, nameMod?.BaseName ?? metadata.EntityName },
|
||||
{ FaxConstants.FaxPaperLabelData, labelComponent?.CurrentLabel },
|
||||
{ FaxConstants.FaxPaperContentData, paper.Content },
|
||||
{ FaxConstants.FaxPaperLockedData, paper.EditingDisabled },
|
||||
};
|
||||
|
||||
if (metadata.EntityPrototype != null)
|
||||
@@ -598,6 +601,8 @@ public sealed class FaxSystem : EntitySystem
|
||||
_paperSystem.TryStamp(printed, stamp, printout.StampState);
|
||||
}
|
||||
}
|
||||
|
||||
paper.EditingDisabled = printout.Locked;
|
||||
}
|
||||
|
||||
_metaData.SetEntityName(printed, printout.Name);
|
||||
|
||||
Reference in New Issue
Block a user