From ddf2d8815bbf335967d7f1fa40d76e899e754454 Mon Sep 17 00:00:00 2001 From: Fishfish458 <47410468+Fishfish458@users.noreply.github.com> Date: Fri, 8 Apr 2022 17:37:22 -0600 Subject: [PATCH] Minor paper ECS and stamps (#7394) Co-authored-by: fishfish458 --- .../Paper/UI/PaperBoundUserInterface.cs | 2 +- Content.Client/Paper/UI/PaperSystem.cs | 29 +++ .../Paper/UI/PaperVisualsComponent.cs | 6 + Content.Server/Cargo/CargoSystem.Telepad.cs | 6 +- .../Disease/DiseaseDiagnosisSystem.cs | 3 +- Content.Server/Entry/IgnoredComponents.cs | 3 +- Content.Server/Paper/PaperComponent.cs | 86 +------- Content.Server/Paper/PaperSystem.cs | 148 ++++++++++++- Content.Shared/Paper/SharedPaperComponent.cs | 25 +-- Content.Shared/Paper/StampComponent.cs | 19 ++ .../Locale/en-US/paper/paper-component.ftl | 6 +- .../Locale/en-US/paper/stamp-component.ftl | 15 ++ .../Fills/Backpacks/StarterGear/backpack.yml | 3 + .../Fills/Backpacks/StarterGear/duffelbag.yml | 3 + .../Fills/Backpacks/StarterGear/satchel.yml | 1 + .../Catalog/Fills/Lockers/heads.yml | 6 + .../Catalog/Fills/Lockers/security.yml | 1 + .../Catalog/Fills/Paper/manuals.yml | 2 +- .../Catalog/Fills/Paper/salvage_lore.yml | 10 +- .../Entities/Objects/Misc/paper.yml | 206 +++++++++++++++++- .../Objects/Misc/bureaucracy.rsi/meta.json | 3 + .../bureaucracy.rsi/paper_stamp-generic.png | Bin 0 -> 5399 bytes .../Misc/bureaucracy.rsi/paper_stamp-iaa.png | Bin 129 -> 148 bytes 23 files changed, 450 insertions(+), 133 deletions(-) create mode 100644 Content.Client/Paper/UI/PaperSystem.cs create mode 100644 Content.Client/Paper/UI/PaperVisualsComponent.cs create mode 100644 Content.Shared/Paper/StampComponent.cs create mode 100644 Resources/Locale/en-US/paper/stamp-component.ftl create mode 100644 Resources/Textures/Objects/Misc/bureaucracy.rsi/paper_stamp-generic.png diff --git a/Content.Client/Paper/UI/PaperBoundUserInterface.cs b/Content.Client/Paper/UI/PaperBoundUserInterface.cs index cc2557f798..ff3ab237c7 100644 --- a/Content.Client/Paper/UI/PaperBoundUserInterface.cs +++ b/Content.Client/Paper/UI/PaperBoundUserInterface.cs @@ -39,7 +39,7 @@ namespace Content.Client.Paper.UI { if (!string.IsNullOrEmpty(obj.Text)) { - SendMessage(new PaperInputText(obj.Text)); + SendMessage(new PaperInputTextMessage(obj.Text)); if (_window != null) { diff --git a/Content.Client/Paper/UI/PaperSystem.cs b/Content.Client/Paper/UI/PaperSystem.cs new file mode 100644 index 0000000000..e98656252c --- /dev/null +++ b/Content.Client/Paper/UI/PaperSystem.cs @@ -0,0 +1,29 @@ +using Robust.Client.GameObjects; + +using static Content.Shared.Paper.SharedPaperComponent; + +namespace Content.Client.Paper; + +public sealed class PaperSystem : VisualizerSystem +{ + protected override void OnAppearanceChange(EntityUid uid, PaperVisualsComponent component, ref AppearanceChangeEvent args) + { + if (!TryComp(uid, out SpriteComponent? sprite)) + return; + + if (args.Component.TryGetData(PaperVisuals.Status , out PaperStatus writingStatus)) + sprite.LayerSetVisible(PaperVisualLayers.Writing, writingStatus == PaperStatus.Written); + + if (args.Component.TryGetData(PaperVisuals.Stamp, out string stampState)) + { + sprite.LayerSetState(PaperVisualLayers.Stamp, stampState); + sprite.LayerSetVisible(PaperVisualLayers.Stamp, true); + } + } +} + +public enum PaperVisualLayers +{ + Stamp, + Writing +} diff --git a/Content.Client/Paper/UI/PaperVisualsComponent.cs b/Content.Client/Paper/UI/PaperVisualsComponent.cs new file mode 100644 index 0000000000..38c987e7a6 --- /dev/null +++ b/Content.Client/Paper/UI/PaperVisualsComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Client.Paper; + +[RegisterComponent] +public sealed class PaperVisualsComponent : Component +{ +} diff --git a/Content.Server/Cargo/CargoSystem.Telepad.cs b/Content.Server/Cargo/CargoSystem.Telepad.cs index b4abde682f..5ddee3f718 100644 --- a/Content.Server/Cargo/CargoSystem.Telepad.cs +++ b/Content.Server/Cargo/CargoSystem.Telepad.cs @@ -12,6 +12,7 @@ namespace Content.Server.Cargo; public sealed partial class CargoSystem { + [Dependency] private readonly PaperSystem _paperSystem = default!; private void InitializeTelepad() { SubscribeLocalEvent(OnTelepadPowerChange); @@ -114,12 +115,13 @@ public sealed partial class CargoSystem MetaData(printed).EntityName = val; - paper.SetContent(Loc.GetString( + _paperSystem.SetContent(printed, Loc.GetString( "cargo-console-paper-print-text", ("orderNumber", data.OrderNumber), ("requester", data.Requester), ("reason", data.Reason), - ("approver", data.Approver))); + ("approver", data.Approver)), + paper); // attempt to attach the label if (TryComp(product, out var label)) diff --git a/Content.Server/Disease/DiseaseDiagnosisSystem.cs b/Content.Server/Disease/DiseaseDiagnosisSystem.cs index ccbe228902..4686adb090 100644 --- a/Content.Server/Disease/DiseaseDiagnosisSystem.cs +++ b/Content.Server/Disease/DiseaseDiagnosisSystem.cs @@ -27,6 +27,7 @@ namespace Content.Server.Disease [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly InventorySystem _inventorySystem = default!; + [Dependency] private readonly PaperSystem _paperSystem = default!; public override void Initialize() { @@ -344,7 +345,7 @@ namespace Content.Server.Disease } MetaData(printed).EntityName = reportTitle; - paper.SetContent(contents.ToMarkup()); + _paperSystem.SetContent(printed, contents.ToMarkup(), paper); } /// diff --git a/Content.Server/Entry/IgnoredComponents.cs b/Content.Server/Entry/IgnoredComponents.cs index d067ba81aa..c178a373fb 100644 --- a/Content.Server/Entry/IgnoredComponents.cs +++ b/Content.Server/Entry/IgnoredComponents.cs @@ -19,7 +19,8 @@ namespace Content.Server.Entry "ItemCabinetVisuals", "DiseaseMachineVisuals", "HandheldGPS", - "PotencyVisuals" + "PotencyVisuals", + "PaperVisuals" }; } } diff --git a/Content.Server/Paper/PaperComponent.cs b/Content.Server/Paper/PaperComponent.cs index c7ae68ac14..c2ce06a0b4 100644 --- a/Content.Server/Paper/PaperComponent.cs +++ b/Content.Server/Paper/PaperComponent.cs @@ -1,20 +1,10 @@ -using System.Threading.Tasks; -using Content.Server.UserInterface; -using Content.Shared.Interaction; using Content.Shared.Paper; -using Content.Shared.Tag; -using Robust.Server.GameObjects; namespace Content.Server.Paper { [RegisterComponent] -#pragma warning disable 618 - [ComponentReference(typeof(SharedPaperComponent))] - public sealed class PaperComponent : SharedPaperComponent, IInteractUsing -#pragma warning restore 618 + public sealed class PaperComponent : SharedPaperComponent { - [Dependency] private readonly IEntityManager _entMan = default!; - public PaperAction Mode; [DataField("content")] public string Content { get; set; } = ""; @@ -22,72 +12,12 @@ namespace Content.Server.Paper [DataField("contentSize")] public int ContentSize { get; set; } = 500; - - [ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(PaperUiKey.Key); - - protected override void Initialize() - { - base.Initialize(); - - if (UserInterface != null) - { - UserInterface.OnReceiveMessage += OnUiReceiveMessage; - } - - Mode = PaperAction.Read; - UpdateUserInterface(); - } - - public void SetContent(string content) - { - - Content = content + '\n'; - UpdateUserInterface(); - - if (!_entMan.TryGetComponent(Owner, out AppearanceComponent? appearance)) - return; - - var status = string.IsNullOrWhiteSpace(content) - ? PaperStatus.Blank - : PaperStatus.Written; - - appearance.SetData(PaperVisuals.Status, status); - } - - public void UpdateUserInterface() - { - UserInterface?.SetState(new PaperBoundUserInterfaceState(Content, Mode)); - } - private void OnUiReceiveMessage(ServerBoundUserInterfaceMessage obj) - { - var msg = (PaperInputText) obj.Message; - if (string.IsNullOrEmpty(msg.Text)) - return; - - - if (msg.Text.Length + Content.Length <= ContentSize) - Content += msg.Text + '\n'; - - if (_entMan.TryGetComponent(Owner, out AppearanceComponent? appearance)) - { - appearance.SetData(PaperVisuals.Status, PaperStatus.Written); - } - - _entMan.GetComponent(Owner).EntityDescription = ""; - UpdateUserInterface(); - } - - async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) - { - if (!EntitySystem.Get().HasTag(eventArgs.Using, "Write")) - return false; - if (!_entMan.TryGetComponent(eventArgs.User, out ActorComponent? actor)) - return false; - - Mode = PaperAction.Write; - UpdateUserInterface(); - UserInterface?.Open(actor.PlayerSession); - return true; - } + [DataField("stampedBy")] + public List StampedBy { get; set; } = new(); + /// + /// Stamp to be displayed on the paper, state from beauracracy.rsi + /// + [DataField("stampState")] + public string? StampState { get; set; } } } diff --git a/Content.Server/Paper/PaperSystem.cs b/Content.Server/Paper/PaperSystem.cs index 5d4f1cd796..cfcd2ff392 100644 --- a/Content.Server/Paper/PaperSystem.cs +++ b/Content.Server/Paper/PaperSystem.cs @@ -1,36 +1,162 @@ using Content.Server.UserInterface; using Content.Shared.Examine; using Content.Shared.Paper; +using Content.Shared.Interaction; +using Content.Shared.Tag; +using Robust.Server.GameObjects; +using Content.Server.Popups; +using Robust.Shared.Player; + +using static Content.Shared.Paper.SharedPaperComponent; namespace Content.Server.Paper { public sealed class PaperSystem : EntitySystem { + [Dependency] private readonly TagSystem _tagSystem = default!; + [Dependency] private readonly PopupSystem _popupSystem = default!; + [Dependency] private readonly UserInterfaceSystem _uiSystem = default!; public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(AfterUIOpen); + + SubscribeLocalEvent(OnInit); + SubscribeLocalEvent(BeforeUIOpen); SubscribeLocalEvent(OnExamined); + SubscribeLocalEvent(OnInteractUsing); + SubscribeLocalEvent(OnInputTextMessage); } - private void AfterUIOpen(EntityUid uid, PaperComponent component, BeforeActivatableUIOpenEvent args) + private void OnInit(EntityUid uid, PaperComponent paperComp, ComponentInit args) { - component.Mode = SharedPaperComponent.PaperAction.Read; - component.UpdateUserInterface(); + paperComp.Mode = PaperAction.Read; + UpdateUserInterface(uid, paperComp); + + if (TryComp(uid, out var appearance)) + { + if (paperComp.Content != "") + appearance.SetData(PaperVisuals.Status, PaperStatus.Written); + + if (paperComp.StampState != null) + appearance.SetData(PaperVisuals.Stamp, paperComp.StampState); + } + } - private void OnExamined(EntityUid uid, PaperComponent component, ExaminedEvent args) + private void BeforeUIOpen(EntityUid uid, PaperComponent paperComp, BeforeActivatableUIOpenEvent args) + { + paperComp.Mode = PaperAction.Read; + UpdateUserInterface(uid, paperComp); + } + + private void OnExamined(EntityUid uid, PaperComponent paperComp, ExaminedEvent args) { if (!args.IsInDetailsRange) return; - if (component.Content == "") + + if (paperComp.Content != "") + args.Message.AddMarkup( + Loc.GetString( + "paper-component-examine-detail-has-words", ("paper", uid) + ) + ); + + if (paperComp.StampedBy.Count > 0) + { + args.Message.PushNewline(); + string commaSeparated = string.Join(", ", paperComp.StampedBy); + args.Message.AddMarkup( + Loc.GetString( + "paper-component-examine-detail-stamped-by", ("paper", uid), ("stamps", commaSeparated)) + ); + } + } + + private void OnInteractUsing(EntityUid uid, PaperComponent paperComp, InteractUsingEvent args) + { + if (_tagSystem.HasTag(args.Used, "Write")) + { + if (!TryComp(args.User, out var actor)) return; - args.PushMarkup( - Loc.GetString( - "paper-component-examine-detail-has-words" - ) - ); + paperComp.Mode = PaperAction.Write; + UpdateUserInterface(uid, paperComp); + _uiSystem.GetUiOrNull(uid, PaperUiKey.Key)?.Open(actor.PlayerSession); + return; + } + + // If a stamp, attempt to stamp paper + if (TryComp(args.Used, out var stampComp) && TryStamp(uid, stampComp.StampedName, stampComp.StampState, paperComp)) + { + // successfully stamped, play popup + var stampPaperOtherMessage = Loc.GetString("paper-component-action-stamp-paper-other", ("user", args.User),("target", args.Target),("stamp", args.Used)); + _popupSystem.PopupEntity(stampPaperOtherMessage, args.User, Filter.Pvs(args.User, entityManager: EntityManager).RemoveWhereAttachedEntity(puid => puid == args.User)); + var stampPaperSelfMessage = Loc.GetString("paper-component-action-stamp-paper-self", ("target", args.Target),("stamp", args.Used)); + _popupSystem.PopupEntity(stampPaperSelfMessage, args.User, Filter.Entities(args.User)); + } + } + + private void OnInputTextMessage(EntityUid uid, PaperComponent paperComp, PaperInputTextMessage args) + { + if (string.IsNullOrEmpty(args.Text)) + return; + + if (args.Text.Length + paperComp.Content.Length <= paperComp.ContentSize) + paperComp.Content += args.Text + '\n'; + + if (TryComp(uid, out var appearance)) + appearance.SetData(PaperVisuals.Status, PaperStatus.Written); + + if (TryComp(uid, out var meta)) + meta.EntityDescription = ""; + + UpdateUserInterface(uid, paperComp); + } + + /// + /// Accepts the name and state to be stamped onto the paper, returns true if successful. + /// + public bool TryStamp(EntityUid uid, string stampName, string stampState, PaperComponent? paperComp = null) + { + if (!Resolve(uid, ref paperComp)) + return false; + + if (!paperComp.StampedBy.Contains(Loc.GetString(stampName))) + { + paperComp.StampedBy.Add(Loc.GetString(stampName)); + if (paperComp.StampState == null && TryComp(uid, out var appearance)) + { + paperComp.StampState = stampState; + appearance.SetData(PaperVisuals.Stamp, paperComp.StampState); + } + } + return true; + } + + public void SetContent(EntityUid uid, string content, PaperComponent? paperComp = null) + { + if (!Resolve(uid, ref paperComp)) + return; + + paperComp.Content = content + '\n'; + UpdateUserInterface(uid, paperComp); + + if (!TryComp(uid, out var appearance)) + return; + + var status = string.IsNullOrWhiteSpace(content) + ? PaperStatus.Blank + : PaperStatus.Written; + + appearance.SetData(PaperVisuals.Status, status); + } + + public void UpdateUserInterface(EntityUid uid, PaperComponent? paperComp = null) + { + if (!Resolve(uid, ref paperComp)) + return; + + _uiSystem.GetUiOrNull(uid, PaperUiKey.Key)?.SetState(new PaperBoundUserInterfaceState(paperComp.Content, paperComp.Mode)); } } } diff --git a/Content.Shared/Paper/SharedPaperComponent.cs b/Content.Shared/Paper/SharedPaperComponent.cs index ff529e43b2..ecc4a455ef 100644 --- a/Content.Shared/Paper/SharedPaperComponent.cs +++ b/Content.Shared/Paper/SharedPaperComponent.cs @@ -1,11 +1,8 @@ -using System; -using Robust.Shared.GameObjects; using Robust.Shared.Serialization; namespace Content.Shared.Paper { - [Virtual] - public class SharedPaperComponent : Component + public abstract class SharedPaperComponent : Component { [Serializable, NetSerializable] public sealed class PaperBoundUserInterfaceState : BoundUserInterfaceState @@ -21,21 +18,11 @@ namespace Content.Shared.Paper } [Serializable, NetSerializable] - public sealed class PaperActionMessage : BoundUserInterfaceMessage - { - public readonly PaperAction Action; - public PaperActionMessage(PaperAction action) - { - Action = action; - } - } - - [Serializable, NetSerializable] - public sealed class PaperInputText : BoundUserInterfaceMessage + public sealed class PaperInputTextMessage : BoundUserInterfaceMessage { public readonly string Text; - public PaperInputText(string text) + public PaperInputTextMessage(string text) { Text = text; } @@ -52,14 +39,13 @@ namespace Content.Shared.Paper { Read, Write, - CrossOut, - Stamp } [Serializable, NetSerializable] public enum PaperVisuals : byte { - Status + Status, + Stamp } [Serializable, NetSerializable] @@ -68,6 +54,5 @@ namespace Content.Shared.Paper Blank, Written } - } } diff --git a/Content.Shared/Paper/StampComponent.cs b/Content.Shared/Paper/StampComponent.cs new file mode 100644 index 0000000000..6318a52e7a --- /dev/null +++ b/Content.Shared/Paper/StampComponent.cs @@ -0,0 +1,19 @@ +namespace Content.Shared.Paper +{ + [RegisterComponent] + public class StampComponent : Component + { + /// + /// The loc string name that will be stamped to the piece of paper on examine. + /// + [ViewVariables] + [DataField("stampedName")] + public string StampedName { get; set; } = "stamp-component-stamped-name-default"; + /// + /// Tne sprite state of the stamp to display on the paper from bureacracy.rsi. + /// + [ViewVariables] + [DataField("stampState")] + public string StampState { get; set; } = "paper_stamp-generic"; + } +} diff --git a/Resources/Locale/en-US/paper/paper-component.ftl b/Resources/Locale/en-US/paper/paper-component.ftl index eb21ae4ae8..61acdc22eb 100644 --- a/Resources/Locale/en-US/paper/paper-component.ftl +++ b/Resources/Locale/en-US/paper/paper-component.ftl @@ -2,5 +2,9 @@ ### UI # Shown when paper with words examined details -paper-component-examine-detail-has-words = The paper has something written on it. +paper-component-examine-detail-has-words = {CAPITALIZE(THE($paper))} has something written on it. +# Shown when paper with stamps examined +paper-component-examine-detail-stamped-by = {CAPITALIZE(THE($paper))} {CONJUGATE-HAVE($paper)} been stamped by: {$stamps}. +paper-component-action-stamp-paper-other = {CAPITALIZE(THE($user))} stamps {THE($target)} with {THE($stamp)}. +paper-component-action-stamp-paper-self = You stamp {THE($target)} with {THE($stamp)}. diff --git a/Resources/Locale/en-US/paper/stamp-component.ftl b/Resources/Locale/en-US/paper/stamp-component.ftl new file mode 100644 index 0000000000..cbf59e976d --- /dev/null +++ b/Resources/Locale/en-US/paper/stamp-component.ftl @@ -0,0 +1,15 @@ +stamp-component-stamped-name-default = A very important person +stamp-component-stamped-name-mime = Mime +stamp-component-stamped-name-captain = Captain +stamp-component-stamped-name-centcom = Centcom +stamp-component-stamped-name-chaplain = Chaplain +stamp-component-stamped-name-clown = Clown +stamp-component-stamped-name-cmo = Chief Medical Officer +stamp-component-stamped-name-denied = DENIED +stamp-component-stamped-name-approved = APPROVED +stamp-component-stamped-name-hop = Head of Personnel +stamp-component-stamped-name-hos = Head of Security +stamp-component-stamped-name-qm = Quartermaster +stamp-component-stamped-name-rd = Research Director +stamp-component-stamped-name-warden = Warden +stamp-component-stamped-name-trader = Trader diff --git a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml index c143f427f0..23b85e213c 100644 --- a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml +++ b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml @@ -27,6 +27,7 @@ - type: StorageFill contents: - id: BoxHug + - id: RubberStampClown - type: entity noSpawn: true @@ -93,6 +94,7 @@ - type: StorageFill contents: - id: BoxSurvival + - id: RubberStampMime - type: entity noSpawn: true @@ -112,6 +114,7 @@ contents: - id: BoxSurvival - id: Bible + - id: RubberStampChaplain - type: entity noSpawn: true diff --git a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/duffelbag.yml b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/duffelbag.yml index e31a26bf51..e04a041d29 100644 --- a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/duffelbag.yml +++ b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/duffelbag.yml @@ -15,6 +15,7 @@ - type: StorageFill contents: - id: BoxHug + - id: RubberStampClown - type: entity noSpawn: true @@ -72,6 +73,7 @@ - type: StorageFill contents: - id: BoxSurvival + - id: RubberStampMime - type: entity noSpawn: true @@ -91,6 +93,7 @@ contents: - id: BoxSurvival - id: Bible + - id: RubberStampChaplain - type: entity noSpawn: true diff --git a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml index 7a4cb93537..dec35845df 100644 --- a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml +++ b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml @@ -91,6 +91,7 @@ contents: - id: BoxSurvival - id: Bible + - id: RubberStampChaplain - type: entity noSpawn: true diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml index 440faa4737..4285fc42b8 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml @@ -21,6 +21,7 @@ - id: CigPackGreen prob: 0.50 - id: DoorRemoteCargo + - id: RubberStampQm - type: entity id: LockerCaptainFilled @@ -53,6 +54,7 @@ - id: ClothingUniformJumpskirtCapFormalDress - id: ClothingNeckBronzeheart - id: ClothingNeckGoldmedal + - id: RubberStampCaptain - type: entity id: LockerHeadOfPersonnelFilled @@ -79,6 +81,7 @@ # Fuck the HoP they don't deserve fucking cigars. - id: DoorRemoteService - id: ClothingNeckGoldmedal + - id: RubberStampHop - type: entity id: LockerChiefEngineerFilled @@ -124,6 +127,7 @@ - id: Hypospray - id: HandheldCrewMonitor - id: DoorRemoteMedical + - id: RubberStampCMO - type: entity id: LockerResearchDirectorFilled @@ -142,6 +146,7 @@ - id: PlushieSlime prob: 0.1 - id: DoorRemoteResearch + - id: RubberStampRd - type: entity id: LockerHeadOfSecurityFilled @@ -180,3 +185,4 @@ - id: DoorRemoteSecurity - id: ClothingUniformJumpskirtHosFormal - id: ClothingUniformJumpsuitHosFormal + - id: RubberStampHos diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/security.yml b/Resources/Prototypes/Catalog/Fills/Lockers/security.yml index e3eac29b1b..6ec796b5b0 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/security.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/security.yml @@ -17,6 +17,7 @@ - id: ClothingHandsGlovesCombat - id: ClothingShoesBootsJack - id: ClothingOuterCoatWarden + - id: RubberStampWarden - type: entity id: LockerSecurityFilled diff --git a/Resources/Prototypes/Catalog/Fills/Paper/manuals.yml b/Resources/Prototypes/Catalog/Fills/Paper/manuals.yml index 1fdb0a657e..b505b64357 100644 --- a/Resources/Prototypes/Catalog/Fills/Paper/manuals.yml +++ b/Resources/Prototypes/Catalog/Fills/Paper/manuals.yml @@ -1,7 +1,7 @@ - type: entity id: PaperWrittenAMEScribbles suffix: "AME scribbles" - parent: PaperWritten + parent: Paper components: - type: Paper content: | diff --git a/Resources/Prototypes/Catalog/Fills/Paper/salvage_lore.yml b/Resources/Prototypes/Catalog/Fills/Paper/salvage_lore.yml index 8f044922d0..39ac28775f 100644 --- a/Resources/Prototypes/Catalog/Fills/Paper/salvage_lore.yml +++ b/Resources/Prototypes/Catalog/Fills/Paper/salvage_lore.yml @@ -4,7 +4,7 @@ id: PaperWrittenSalvageLoreMedium1PlasmaTrap noSpawn: true # keep this from spamming spawn sheet suffix: "Salvage: Lore: Medium 1: Plasma Trap" - parent: PaperWritten + parent: Paper components: - type: Paper content: | @@ -36,7 +36,7 @@ id: PaperWrittenSalvageLoreGaming1 noSpawn: true # keep this from spamming spawn sheet suffix: "Salvage: Lore: Gaming 1" - parent: PaperWritten + parent: Paper components: - type: Paper content: | @@ -50,7 +50,7 @@ id: PaperWrittenSalvageLoreGaming2 noSpawn: true # keep this from spamming spawn sheet suffix: "Salvage: Lore: Gaming 2" - parent: PaperWritten + parent: Paper components: - type: Paper content: | @@ -72,7 +72,7 @@ id: PaperWrittenSalvageLoreGaming3 noSpawn: true # keep this from spamming spawn sheet suffix: "Salvage: Lore: Gaming 3" - parent: PaperWritten + parent: Paper components: - type: Paper content: | @@ -87,7 +87,7 @@ id: PaperWrittenSalvageLoreGaming4 noSpawn: true # keep this from spamming spawn sheet suffix: "Salvage: Lore: Gaming 4" - parent: PaperWritten + parent: Paper components: - type: Paper content: | diff --git a/Resources/Prototypes/Entities/Objects/Misc/paper.yml b/Resources/Prototypes/Entities/Objects/Misc/paper.yml index cdbd9c1338..29f75bdd05 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/paper.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/paper.yml @@ -9,6 +9,12 @@ netsync: false layers: - state: paper + - state: paper_words + map: ["enum.PaperVisualLayers.Writing"] + visible: false + - state: paper_stamp-generic + map: ["enum.PaperVisualLayers.Stamp"] + visible: false - type: Paper - type: ActivatableUI key: enum.PaperUiKey.Key @@ -16,20 +22,13 @@ interfaces: - key: enum.PaperUiKey.Key type: PaperBoundUserInterface - - type: Appearance - visuals: - - type: GenericEnumVisualizer - key: enum.PaperVisuals.Status - layer: 0 - states: - # This default isn't actually explicitly used right now. - enum.PaperStatus.Blank: paper - enum.PaperStatus.Written: paper_words - type: Item size: 1 - type: Tag tags: - Document + - type: Appearance + - type: PaperVisuals - type: entity parent: Paper @@ -50,7 +49,7 @@ type: PaperBoundUserInterface - type: entity - parent: PaperWritten + parent: Paper id: NukeCodePaper name: nuclear authentication codes components: @@ -141,8 +140,6 @@ visuals: - type: MappedItemVisualizer - - - type: entity id: BoxFolderRed parent: BoxFolderBase @@ -213,3 +210,188 @@ - state: folder-colormap color: "#3f3f3f" - state: folder-base + +- type: entity + name: mime's rubber stamp + parent: BaseItem + id: RubberStampMime + description: A rubber stamp for stamping important documents. + components: + - type: Stamp + stampedName: stamp-component-stamped-name-mime + stampState: "paper_stamp-mime" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-mime + netsync: false + - type: Item + size: 3 + +- type: entity + name: captain's rubber stamp + parent: RubberStampMime + id: RubberStampCaptain + components: + - type: Stamp + stampedName: stamp-component-stamped-name-captain + stampState: "paper_stamp-cap" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-cap + netsync: false + +- type: entity + name: CentCom rubber stamp + parent: RubberStampMime + id: RubberStampCentcom + components: + - type: Stamp + stampedName: stamp-component-stamped-name-centcom + stampState: "paper_stamp-cent" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-cent + netsync: false + +- type: entity + name: chaplain's rubber stamp + parent: RubberStampMime + id: RubberStampChaplain + components: + - type: Stamp + stampedName: stamp-component-stamped-name-chaplain + stampState: "paper_stamp-chaplain" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-chaplain + netsync: false + +- type: entity + name: clown's rubber stamp + parent: RubberStampMime + id: RubberStampClown + components: + - type: Stamp + stampedName: stamp-component-stamped-name-clown + stampState: "paper_stamp-clown" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-clown + netsync: false + +- type: entity + name: chief medical officer's rubber stamp + parent: RubberStampMime + id: RubberStampCMO + components: + - type: Stamp + stampedName: stamp-component-stamped-name-cmo + stampState: "paper_stamp-cmo" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-cmo + netsync: false + +- type: entity + name: DENIED rubber stamp + parent: RubberStampMime + id: RubberStampDenied + components: + - type: Stamp + stampedName: stamp-component-stamped-name-denied + stampState: "paper_stamp-deny" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-deny + netsync: false + +- type: entity + name: APPROVED rubber stamp + parent: RubberStampMime + id: RubberStampApproved + components: + - type: Stamp + stampedName: stamp-component-stamped-name-approved + stampState: "paper_stamp-iaa" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-iaa + netsync: false + +- type: entity + name: head of personnel's rubber stamp + parent: RubberStampMime + id: RubberStampHop + components: + - type: Stamp + stampedName: stamp-component-stamped-name-hop + stampState: "paper_stamp-hop" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-hop + netsync: false + +- type: entity + name: head of security's rubber stamp + parent: RubberStampMime + id: RubberStampHos + components: + - type: Stamp + stampedName: stamp-component-stamped-name-hos + stampState: "paper_stamp-hos" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-hos + netsync: false + +- type: entity + name: quartermaster's rubber stamp + parent: RubberStampMime + id: RubberStampQm + components: + - type: Stamp + stampedName: stamp-component-stamped-name-qm + stampState: "paper_stamp-qm" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-qm + netsync: false + +- type: entity + name: research director's rubber stamp + parent: RubberStampMime + id: RubberStampRd + components: + - type: Stamp + stampedName: stamp-component-stamped-name-rd + stampState: "paper_stamp-rd" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-rd + netsync: false + +- type: entity + name: warden's rubber stamp + parent: RubberStampMime + id: RubberStampWarden + components: + - type: Stamp + stampedName: stamp-component-stamped-name-warden + stampState: "paper_stamp-warden" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-warden + netsync: false + +- type: entity + name: trader's rubber stamp + parent: RubberStampMime + id: RubberStampTrader + components: + - type: Stamp + stampedName: stamp-component-stamped-name-trader + stampState: "paper_stamp-trader" + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + state: stamp-trader + netsync: false diff --git a/Resources/Textures/Objects/Misc/bureaucracy.rsi/meta.json b/Resources/Textures/Objects/Misc/bureaucracy.rsi/meta.json index ae882f5379..cca222e1fc 100644 --- a/Resources/Textures/Objects/Misc/bureaucracy.rsi/meta.json +++ b/Resources/Textures/Objects/Misc/bureaucracy.rsi/meta.json @@ -174,6 +174,9 @@ { "name": "paper_stamp-warden" }, + { + "name": "paper_stamp-generic" + }, { "name": "paper_talisman" }, diff --git a/Resources/Textures/Objects/Misc/bureaucracy.rsi/paper_stamp-generic.png b/Resources/Textures/Objects/Misc/bureaucracy.rsi/paper_stamp-generic.png new file mode 100644 index 0000000000000000000000000000000000000000..3ba018e8faad6b8174f1941f27e1cc89b964e080 GIT binary patch literal 5399 zcmeHKX;>3i7Y>SokxfCcR3rwFMJJi8B$0qf*tCI^MFB+^CX*1!W)dLcQd!(UkWWuE>4<`Wq#c3}6iRia7A)yb0(G?^Fg{T6cc${1z6NtnJPPIyo;1IP) zfWfHSo@a;0_02Ze*c0lR9XTnbR#CgH@pq#$gXdavL}cGL*EmWL&clAnLw`H}=!mY2Vt8QT6YZBnM z7ut}GUD9%=Xp^JR@FA<9HE?OtifQCIw=(nY#@9$fZjNt$Ov=bu&9j+Un!6xtU(&5m zBTL@#7YmOTfyRx(gGlE^8`(PKzS+^!ox2U^>KzkSybQEp6-w%To`^T@wuc-{Q+{1; z5pnj$l8DW%OB1_}6_({%{251YZhiF1v}S%vM_lnfqjh)7S|0Cl=bg-cZ7!0Ft2wH? zYP`FvyU@UFM@!tSA5LL@(hr=xmWO~FlZkVT^sqgR5VD|(| zzqoou)d7_e0#WTNY`#xSiOhCvt@vYoaBAdGH0kK9?75zt;-c@Vy?bH~2gKYwlYAiN z*7l%^;$l(YDREtG@!{RHKQ96{(F>1o_nx?QmsIHS<3mY3=5-_cb(39x+li&JcD-HK z96Y?NSmKJ`vV=LCt;_v>px^29oV-Z1)9wf%{AAn9^8so54y14l4b#lu<;TH8^6wHY z+ne9mp3r-mWf>N1jgQ`Bdix4yYv3%CmUPVIJU(*fbkM)yPo3yN;CIEB!f1SAg?K!fsah zdK)t%bB%R>l?F!#x7O2Ra9;jK?8?*S^E&ni+bUxSGwicpB|WHGcxKR?9L0GXx8jcZ z;kBXt(dh$DZ)y^$H%@ITf90BBdA79ld`hF=Zv)NwhbKeJDm$hZ$9P)e`XJU=isZIR=6fTpcT6) ziFN124Bn4*wW-S(Zx+@!n1? z^~0)-XV1(JJ=p(PgkRJ(72f#xxl?-TnnWS{*sIk0Wy@!}w6DU3he~IMc%F^CVLw09 zE+k>CJNm({*P8Vw(aCO^VyZ&I(WcqaK6NNfCK?@O(Wy z-tRc*KC^G_f7m`X^JmmW+*s)8WVCq7%1gW-=59`9ES#1WnO89_EEYW7H+c`$){&5r z6m#Liwz}fvwDMA;(j?p)osOTpKn2VF(cyji{5_1FXdI&hL{OEs~Rx-eO&5QHTZkDoZA(u z#(`RB@piKgWyi{7g3sWk*xQ}Xjh>q(%#(cNw`>)=MR(=n4n!8UcA)K~D#cToL)+w5;j z$kBS?I)|ZNh(*3d$T`rPRa8!`uf}c zP0u8NLbp#c-l9dqy*Hi^zdp}CoNVj;@`f39!h@l$=N$F=?vG=~NM$8!_qk%edb;B6 zL{DRyya2+z;?lh4wO?kc? zHeQpT#h1Y%K1+LxFlkXF0fi1wVUPh($$S`KKnMhoAdo?3I7cB-RN5y{zEY(MlER1v z3I!*KP#iLq2Ej1Z831X{6o3jMOn@0hp#U@ngF>SSXnY2R@d<>#LWHUk5`S8i28xeD zF(9%aihN@Z$(i45lXMNTXB~Knsg@!}3rdkV>WqlF7tuyaocNiPQ=l=Q1)a zJ|ZRRu}Y))QPl?`D@UG27J*o#HQ{ht;j$ojB#9D=L-^W6XxxYij)tT{1YO~yl6pTb z`iJRaQXm8*K@h+vLsS55lMgUxd^$j9fUwKpNRm@0vHCUd=La6Dynao zPjjY$&LjayfyS2mKek5+BGJ*_SR~T>_FRaXE$jVcx)A?sx;Fa<_T$?e zB1Qk;#iQ?PJC~WO(f7QGQH#7e7)y*fW=fv^W%Q*GGfD0fs>EO>n`$l{%$|MI(Lp_x zFV|D=vF`Y37L(!m!X4<)eqWAzP)N=5?d_9lK!X(jmDZ2K&v0ftsM7?wDy)omY5GjN zwMD00somFLF}UODcpLaw_w`AjK@GU|JMS>pYer$+ffq}TBy!gbsbA8(Hk$YT${v!% zmi$hu;2h&esgmrEGH& u2kGBjH%Z#Q=H|JHK0~ZYD~?b1GBh?=#<1002ovPDHLkV1nD_GyMPn delta 100 zcmV-q0Gt1m0f7OKBwa{JL_t(|obAxD4FDhrL{Z{O?Bq`FnEx6oat9&+ z03d))wb$Ji60Y4