Files
tbd-station-14/Content.Server/CartridgeLoader/Cartridges/LogProbeCartridgeComponent.cs
deltanedas 7520d8a2c8 add button to print logprobe logs (#32255)
* add EntityName at the bottom of LogProbe

* pass User into CartridgeMessageEvent

* add button to print logprobe logs

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2025-02-27 14:47:16 +01:00

52 lines
1.7 KiB
C#
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Content.Shared.CartridgeLoader.Cartridges;
using Content.Shared.Paper;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.CartridgeLoader.Cartridges;
[RegisterComponent, Access(typeof(LogProbeCartridgeSystem))]
[AutoGenerateComponentPause]
public sealed partial class LogProbeCartridgeComponent : Component
{
/// <summary>
/// The name of the scanned entity, sent to clients when they open the UI.
/// </summary>
[DataField]
public string EntityName = string.Empty;
/// <summary>
/// The list of pulled access logs
/// </summary>
[DataField, ViewVariables]
public List<PulledAccessLog> PulledAccessLogs = new();
/// <summary>
/// The sound to make when we scan something with access
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier SoundScan = new SoundPathSpecifier("/Audio/Machines/scan_finish.ogg");
/// <summary>
/// Paper to spawn when printing logs.
/// </summary>
[DataField]
public EntProtoId<PaperComponent> PaperPrototype = "PaperAccessLogs";
[DataField]
public SoundSpecifier PrintSound = new SoundPathSpecifier("/Audio/Machines/diagnoser_printing.ogg");
/// <summary>
/// How long you have to wait before printing logs again.
/// </summary>
[DataField]
public TimeSpan PrintCooldown = TimeSpan.FromSeconds(5);
/// <summary>
/// When anyone is allowed to spawn another printout.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
public TimeSpan NextPrintAllowed = TimeSpan.Zero;
}