Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirror: More fax logging #174

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions Content.Server/Fax/FaxSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ private void OnFileButtonPressed(EntityUid uid, FaxMachineComponent component, F

private void OnCopyButtonPressed(EntityUid uid, FaxMachineComponent component, FaxCopyMessage args)
{
Copy(uid, component);
Copy(uid, component, args);
}

private void OnSendButtonPressed(EntityUid uid, FaxMachineComponent component, FaxSendMessage args)
Expand Down Expand Up @@ -416,13 +416,20 @@ public void PrintFile(EntityUid uid, FaxMachineComponent component, FaxFileMessa
component.SendTimeoutRemaining += component.SendTimeout;

UpdateUserInterface(uid, component);

if (args.Session.AttachedEntity != null)
_adminLogger.Add(LogType.Action, LogImpact.Low,
$"{ToPrettyString(args.Session.AttachedEntity.Value):actor} added print job to {ToPrettyString(uid):tool} with text: {args.Content}");
else
_adminLogger.Add(LogType.Action, LogImpact.Low,
$"Someone added print job to {ToPrettyString(uid):tool} with text: {args.Content}");
}

/// <summary>
/// Copies the paper in the fax. A timeout is set after copying,
/// which is shared by the send button.
/// </summary>
public void Copy(EntityUid uid, FaxMachineComponent? component = null)
public void Copy(EntityUid uid, FaxMachineComponent? component, FaxCopyMessage args)
{
if (!Resolve(uid, ref component))
return;
Expand All @@ -449,6 +456,10 @@ public void Copy(EntityUid uid, FaxMachineComponent? component = null)
// will start immediately.

UpdateUserInterface(uid, component);

if (args.Session.AttachedEntity != null)
_adminLogger.Add(LogType.Action, LogImpact.Low,
$"{ToPrettyString(args.Session.AttachedEntity.Value):actor} added copy job to {ToPrettyString(uid):tool} with text: {ToPrettyString(component.PaperSlot.Item):subject}");
}

/// <summary>
Expand Down
Loading