# Conflicts: # Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs # Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTabEntry.xaml # Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTabEntry.xaml.cs # Content.IntegrationTests/Tests/PostMapInitTest.cs # Content.Server/Chat/Systems/ChatSystem.cs # Content.Server/Clothing/Components/GloveHeatResistanceComponent.cs # Content.Server/Light/EntitySystems/PoweredLightSystem.cs # Content.Server/Medical/HealthAnalyzerSystem.cs # Content.Server/Medical/SuitSensors/SuitSensorComponent.cs # Content.Server/StationEvents/Events/MeteorSwarmSystem.cs # Content.Server/StationEvents/Events/StationEventSystem.cs # Content.Shared/Actions/SharedActionsSystem.cs # Content.Shared/Interaction/SharedInteractionSystem.cs # Resources/Prototypes/AlertLevels/alert_levels.yml # Resources/Prototypes/Catalog/Fills/Lockers/heads.yml # Resources/Prototypes/Catalog/Fills/Lockers/misc.yml # Resources/Prototypes/Catalog/VendingMachines/Inventories/engivend.yml # Resources/Prototypes/Datasets/Names/fortunes.yml # Resources/Prototypes/Datasets/ion_storm.yml # Resources/Prototypes/Entities/Clothing/Neck/mantles.yml # Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml # Resources/Prototypes/Entities/Markers/Spawners/Random/maintenance.yml # Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml # Resources/Prototypes/Entities/Objects/Fun/pai.yml # Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml # Resources/Prototypes/Entities/Objects/Specific/Medical/handheld_crew_monitor.yml # Resources/Prototypes/Entities/Structures/Machines/lathe.yml # Resources/Prototypes/GameRules/events.yml # Resources/Prototypes/Loadouts/Jobs/Science/research_director.yml # Resources/Prototypes/Recipes/Lathes/clothing.yml # Resources/Prototypes/game_presets.yml # Resources/Prototypes/secret_weights.yml # Resources/ServerInfo/Guidebook/Engineering/Singularity.xml # Resources/Textures/Clothing/Head/Helmets/security.rsi/equipped-HELMET-vox.png # Resources/Textures/Clothing/Head/Helmets/security.rsi/equipped-HELMET.png # Resources/Textures/Clothing/Head/Helmets/security.rsi/icon.png # Resources/Textures/Clothing/Head/Helmets/security.rsi/inhand-left.png # Resources/Textures/Clothing/Head/Helmets/security.rsi/inhand-right.png # Resources/Textures/Clothing/Head/Helmets/security.rsi/meta.json # Resources/Textures/Clothing/Mask/ert.rsi/meta.json # Resources/Textures/Clothing/Mask/joy.rsi/meta.json # Resources/Textures/Clothing/Mask/squadron.rsi/meta.json # Resources/Textures/Clothing/Neck/Cloaks/cmo.rsi/equipped-NECK.png # Resources/Textures/Clothing/Neck/Cloaks/cmo.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Armor/security.rsi/equipped-OUTERCLOTHING.png # Resources/Textures/Clothing/OuterClothing/Armor/security.rsi/icon.png # Resources/Textures/Clothing/OuterClothing/Armor/security.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Hardsuits/medical.rsi/inhand-left.png # Resources/Textures/Clothing/OuterClothing/Hardsuits/medical.rsi/inhand-right.png # Resources/Textures/Clothing/Uniforms/Jumpsuit/hos_alt.rsi/equipped-INNERCLOTHING.png # Resources/Textures/Objects/Specific/Hydroponics/aloe.rsi/produce.png # Resources/Textures/Objects/Specific/Hydroponics/apple.rsi/produce.png # Resources/Textures/Objects/Specific/Hydroponics/cannabis.rsi/produce.png # Resources/Textures/Objects/Tools/crowbar.rsi/meta.json # Resources/Textures/Objects/Tools/crowbar.rsi/red-icon.png # Resources/Textures/Objects/Tools/crowbar.rsi/red-storage.png # Resources/Textures/Structures/Wallmounts/Lighting/light_tube.rsi/base.png # Resources/Textures/Structures/Wallmounts/Lighting/light_tube.rsi/broken.png # Resources/Textures/Structures/Wallmounts/Lighting/light_tube.rsi/burned.png # Resources/Textures/Structures/Wallmounts/Lighting/light_tube.rsi/empty.png # Resources/Textures/Structures/Wallmounts/Lighting/light_tube.rsi/glow.png # Resources/Textures/Structures/Wallmounts/Lighting/light_tube.rsi/meta.json # Resources/migration.yml
193 lines
5.7 KiB
C#
193 lines
5.7 KiB
C#
using Content.Shared.Containers.ItemSlots;
|
|
using Content.Shared.Paper;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Shared.Fax.Components;
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class FaxMachineComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Name with which the fax will be visible to others on the network
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField("name")]
|
|
public string FaxName { get; set; } = "Unknown";
|
|
|
|
/// <summary>
|
|
/// Sprite to use when inserting an object.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField, AutoNetworkedField]
|
|
public string InsertingState = "inserting";
|
|
|
|
/// <summary>
|
|
/// Device address of fax in network to which data will be send
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField("destinationAddress")]
|
|
public string? DestinationFaxAddress { get; set; }
|
|
|
|
/// <summary>
|
|
/// Contains the item to be sent, assumes it's paper...
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public ItemSlot PaperSlot = new();
|
|
|
|
/// <summary>
|
|
/// Is fax machine should respond to pings in network
|
|
/// This will make it visible to others on the network
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField]
|
|
public bool ResponsePings { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Should admins be notified on message receive
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField]
|
|
public bool NotifyAdmins { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Should that fax receive nuke codes send by admins. Probably should be captain fax only
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField]
|
|
public bool ReceiveNukeCodes { get; set; } = false;
|
|
|
|
// Sunrise-StationGoal-Start
|
|
/// <summary>
|
|
/// Should that fax receive station goal info
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField("receiveStationGoal")]
|
|
public bool ReceiveStationGoal { get; set; } = false;
|
|
// Sunrise-StationGoal-End
|
|
|
|
/// <summary>
|
|
/// Sound to play when fax has been emagged
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier EmagSound = new SoundCollectionSpecifier("sparks");
|
|
|
|
/// <summary>
|
|
/// Sound to play when fax printing new message
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier PrintSound = new SoundPathSpecifier("/Audio/Machines/printer.ogg");
|
|
|
|
/// <summary>
|
|
/// Sound to play when fax successfully send message
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier SendSound = new SoundPathSpecifier("/Audio/Machines/high_tech_confirm.ogg");
|
|
|
|
/// <summary>
|
|
/// Known faxes in network by address with fax names
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public Dictionary<string, string> KnownFaxes { get; } = new();
|
|
|
|
/// <summary>
|
|
/// Print queue of the incoming message
|
|
/// </summary>
|
|
[ViewVariables]
|
|
[DataField]
|
|
public Queue<FaxPrintout> PrintingQueue { get; private set; } = new();
|
|
|
|
/// <summary>
|
|
/// Message sending timeout
|
|
/// </summary>
|
|
[ViewVariables]
|
|
[DataField]
|
|
public float SendTimeoutRemaining;
|
|
|
|
/// <summary>
|
|
/// Message sending timeout
|
|
/// </summary>
|
|
[ViewVariables]
|
|
[DataField]
|
|
public float SendTimeout = 5f;
|
|
|
|
/// <summary>
|
|
/// Remaining time of inserting animation
|
|
/// </summary>
|
|
[DataField]
|
|
public float InsertingTimeRemaining;
|
|
|
|
/// <summary>
|
|
/// How long the inserting animation will play
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public float InsertionTime = 1.88f; // 0.02 off for correct animation
|
|
|
|
/// <summary>
|
|
/// Remaining time of printing animation
|
|
/// </summary>
|
|
[DataField]
|
|
public float PrintingTimeRemaining;
|
|
|
|
/// <summary>
|
|
/// How long the printing animation will play
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public float PrintingTime = 2.3f;
|
|
|
|
/// <summary>
|
|
/// The prototype ID to use for faxed or copied entities if we can't get one from
|
|
/// the paper entity for whatever reason.
|
|
/// </summary>
|
|
[DataField]
|
|
public EntProtoId PrintPaperId = "Paper";
|
|
|
|
/// <summary>
|
|
/// The prototype ID to use for faxed or copied entities if we can't get one from
|
|
/// the paper entity for whatever reason of the Office type.
|
|
/// </summary>
|
|
[DataField]
|
|
public EntProtoId PrintOfficePaperId = "PaperOffice";
|
|
}
|
|
|
|
[DataDefinition]
|
|
public sealed partial class FaxPrintout
|
|
{
|
|
[DataField(required: true)]
|
|
public string Name { get; private set; } = default!;
|
|
|
|
[DataField]
|
|
public string? Label { get; private set; }
|
|
|
|
[DataField(required: true)]
|
|
public string Content { get; private set; } = default!;
|
|
|
|
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>), required: true)]
|
|
public string PrototypeId { get; private set; } = default!;
|
|
|
|
[DataField("stampState")]
|
|
public string? StampState { get; private set; }
|
|
|
|
[DataField("stampedBy")]
|
|
public List<StampDisplayInfo> StampedBy { get; private set; } = new();
|
|
|
|
[DataField]
|
|
public bool Locked { get; private set; }
|
|
|
|
private FaxPrintout()
|
|
{
|
|
}
|
|
|
|
public FaxPrintout(string content, string name, string? label = null, string? prototypeId = null, string? stampState = null, List<StampDisplayInfo>? stampedBy = null, bool locked = false)
|
|
{
|
|
Content = content;
|
|
Name = name;
|
|
Label = label;
|
|
PrototypeId = prototypeId ?? "";
|
|
StampState = stampState;
|
|
StampedBy = stampedBy ?? new List<StampDisplayInfo>();
|
|
Locked = locked;
|
|
}
|
|
}
|