Minor paper ECS and stamps (#7394)
Co-authored-by: fishfish458 <fishfish458>
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Content.Client.Paper.UI
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(obj.Text))
|
if (!string.IsNullOrEmpty(obj.Text))
|
||||||
{
|
{
|
||||||
SendMessage(new PaperInputText(obj.Text));
|
SendMessage(new PaperInputTextMessage(obj.Text));
|
||||||
|
|
||||||
if (_window != null)
|
if (_window != null)
|
||||||
{
|
{
|
||||||
|
|||||||
29
Content.Client/Paper/UI/PaperSystem.cs
Normal file
29
Content.Client/Paper/UI/PaperSystem.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using Robust.Client.GameObjects;
|
||||||
|
|
||||||
|
using static Content.Shared.Paper.SharedPaperComponent;
|
||||||
|
|
||||||
|
namespace Content.Client.Paper;
|
||||||
|
|
||||||
|
public sealed class PaperSystem : VisualizerSystem<PaperVisualsComponent>
|
||||||
|
{
|
||||||
|
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
|
||||||
|
}
|
||||||
6
Content.Client/Paper/UI/PaperVisualsComponent.cs
Normal file
6
Content.Client/Paper/UI/PaperVisualsComponent.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Content.Client.Paper;
|
||||||
|
|
||||||
|
[RegisterComponent]
|
||||||
|
public sealed class PaperVisualsComponent : Component
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ namespace Content.Server.Cargo;
|
|||||||
|
|
||||||
public sealed partial class CargoSystem
|
public sealed partial class CargoSystem
|
||||||
{
|
{
|
||||||
|
[Dependency] private readonly PaperSystem _paperSystem = default!;
|
||||||
private void InitializeTelepad()
|
private void InitializeTelepad()
|
||||||
{
|
{
|
||||||
SubscribeLocalEvent<CargoTelepadComponent, PowerChangedEvent>(OnTelepadPowerChange);
|
SubscribeLocalEvent<CargoTelepadComponent, PowerChangedEvent>(OnTelepadPowerChange);
|
||||||
@@ -114,12 +115,13 @@ public sealed partial class CargoSystem
|
|||||||
|
|
||||||
MetaData(printed).EntityName = val;
|
MetaData(printed).EntityName = val;
|
||||||
|
|
||||||
paper.SetContent(Loc.GetString(
|
_paperSystem.SetContent(printed, Loc.GetString(
|
||||||
"cargo-console-paper-print-text",
|
"cargo-console-paper-print-text",
|
||||||
("orderNumber", data.OrderNumber),
|
("orderNumber", data.OrderNumber),
|
||||||
("requester", data.Requester),
|
("requester", data.Requester),
|
||||||
("reason", data.Reason),
|
("reason", data.Reason),
|
||||||
("approver", data.Approver)));
|
("approver", data.Approver)),
|
||||||
|
paper);
|
||||||
|
|
||||||
// attempt to attach the label
|
// attempt to attach the label
|
||||||
if (TryComp<PaperLabelComponent>(product, out var label))
|
if (TryComp<PaperLabelComponent>(product, out var label))
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ namespace Content.Server.Disease
|
|||||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||||
[Dependency] private readonly IRobustRandom _random = default!;
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
[Dependency] private readonly InventorySystem _inventorySystem = default!;
|
[Dependency] private readonly InventorySystem _inventorySystem = default!;
|
||||||
|
[Dependency] private readonly PaperSystem _paperSystem = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -344,7 +345,7 @@ namespace Content.Server.Disease
|
|||||||
}
|
}
|
||||||
MetaData(printed).EntityName = reportTitle;
|
MetaData(printed).EntityName = reportTitle;
|
||||||
|
|
||||||
paper.SetContent(contents.ToMarkup());
|
_paperSystem.SetContent(printed, contents.ToMarkup(), paper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ namespace Content.Server.Entry
|
|||||||
"ItemCabinetVisuals",
|
"ItemCabinetVisuals",
|
||||||
"DiseaseMachineVisuals",
|
"DiseaseMachineVisuals",
|
||||||
"HandheldGPS",
|
"HandheldGPS",
|
||||||
"PotencyVisuals"
|
"PotencyVisuals",
|
||||||
|
"PaperVisuals"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
using System.Threading.Tasks;
|
|
||||||
using Content.Server.UserInterface;
|
|
||||||
using Content.Shared.Interaction;
|
|
||||||
using Content.Shared.Paper;
|
using Content.Shared.Paper;
|
||||||
using Content.Shared.Tag;
|
|
||||||
using Robust.Server.GameObjects;
|
|
||||||
|
|
||||||
namespace Content.Server.Paper
|
namespace Content.Server.Paper
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
#pragma warning disable 618
|
public sealed class PaperComponent : SharedPaperComponent
|
||||||
[ComponentReference(typeof(SharedPaperComponent))]
|
|
||||||
public sealed class PaperComponent : SharedPaperComponent, IInteractUsing
|
|
||||||
#pragma warning restore 618
|
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
|
||||||
|
|
||||||
public PaperAction Mode;
|
public PaperAction Mode;
|
||||||
[DataField("content")]
|
[DataField("content")]
|
||||||
public string Content { get; set; } = "";
|
public string Content { get; set; } = "";
|
||||||
@@ -22,72 +12,12 @@ namespace Content.Server.Paper
|
|||||||
[DataField("contentSize")]
|
[DataField("contentSize")]
|
||||||
public int ContentSize { get; set; } = 500;
|
public int ContentSize { get; set; } = 500;
|
||||||
|
|
||||||
|
[DataField("stampedBy")]
|
||||||
[ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(PaperUiKey.Key);
|
public List<string> StampedBy { get; set; } = new();
|
||||||
|
/// <summary>
|
||||||
protected override void Initialize()
|
/// Stamp to be displayed on the paper, state from beauracracy.rsi
|
||||||
{
|
/// </summary>
|
||||||
base.Initialize();
|
[DataField("stampState")]
|
||||||
|
public string? StampState { get; set; }
|
||||||
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<MetaDataComponent>(Owner).EntityDescription = "";
|
|
||||||
UpdateUserInterface();
|
|
||||||
}
|
|
||||||
|
|
||||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
|
||||||
{
|
|
||||||
if (!EntitySystem.Get<TagSystem>().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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +1,162 @@
|
|||||||
using Content.Server.UserInterface;
|
using Content.Server.UserInterface;
|
||||||
using Content.Shared.Examine;
|
using Content.Shared.Examine;
|
||||||
using Content.Shared.Paper;
|
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
|
namespace Content.Server.Paper
|
||||||
{
|
{
|
||||||
public sealed class PaperSystem : EntitySystem
|
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()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
SubscribeLocalEvent<PaperComponent, BeforeActivatableUIOpenEvent>(AfterUIOpen);
|
|
||||||
|
SubscribeLocalEvent<PaperComponent, ComponentInit>(OnInit);
|
||||||
|
SubscribeLocalEvent<PaperComponent, BeforeActivatableUIOpenEvent>(BeforeUIOpen);
|
||||||
SubscribeLocalEvent<PaperComponent, ExaminedEvent>(OnExamined);
|
SubscribeLocalEvent<PaperComponent, ExaminedEvent>(OnExamined);
|
||||||
|
SubscribeLocalEvent<PaperComponent, InteractUsingEvent>(OnInteractUsing);
|
||||||
|
SubscribeLocalEvent<PaperComponent, PaperInputTextMessage>(OnInputTextMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AfterUIOpen(EntityUid uid, PaperComponent component, BeforeActivatableUIOpenEvent args)
|
private void OnInit(EntityUid uid, PaperComponent paperComp, ComponentInit args)
|
||||||
{
|
{
|
||||||
component.Mode = SharedPaperComponent.PaperAction.Read;
|
paperComp.Mode = PaperAction.Read;
|
||||||
component.UpdateUserInterface();
|
UpdateUserInterface(uid, paperComp);
|
||||||
|
|
||||||
|
if (TryComp<AppearanceComponent>(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)
|
if (!args.IsInDetailsRange)
|
||||||
return;
|
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<ActorComponent>(args.User, out var actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
args.PushMarkup(
|
paperComp.Mode = PaperAction.Write;
|
||||||
Loc.GetString(
|
UpdateUserInterface(uid, paperComp);
|
||||||
"paper-component-examine-detail-has-words"
|
_uiSystem.GetUiOrNull(uid, PaperUiKey.Key)?.Open(actor.PlayerSession);
|
||||||
)
|
return;
|
||||||
);
|
}
|
||||||
|
|
||||||
|
// If a stamp, attempt to stamp paper
|
||||||
|
if (TryComp<StampComponent>(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<AppearanceComponent>(uid, out var appearance))
|
||||||
|
appearance.SetData(PaperVisuals.Status, PaperStatus.Written);
|
||||||
|
|
||||||
|
if (TryComp<MetaDataComponent>(uid, out var meta))
|
||||||
|
meta.EntityDescription = "";
|
||||||
|
|
||||||
|
UpdateUserInterface(uid, paperComp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Accepts the name and state to be stamped onto the paper, returns true if successful.
|
||||||
|
/// </summary>
|
||||||
|
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<AppearanceComponent>(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<AppearanceComponent>(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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
using System;
|
|
||||||
using Robust.Shared.GameObjects;
|
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
|
|
||||||
namespace Content.Shared.Paper
|
namespace Content.Shared.Paper
|
||||||
{
|
{
|
||||||
[Virtual]
|
public abstract class SharedPaperComponent : Component
|
||||||
public class SharedPaperComponent : Component
|
|
||||||
{
|
{
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
public sealed class PaperBoundUserInterfaceState : BoundUserInterfaceState
|
public sealed class PaperBoundUserInterfaceState : BoundUserInterfaceState
|
||||||
@@ -21,21 +18,11 @@ namespace Content.Shared.Paper
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
public sealed class PaperActionMessage : BoundUserInterfaceMessage
|
public sealed class PaperInputTextMessage : BoundUserInterfaceMessage
|
||||||
{
|
|
||||||
public readonly PaperAction Action;
|
|
||||||
public PaperActionMessage(PaperAction action)
|
|
||||||
{
|
|
||||||
Action = action;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
|
||||||
public sealed class PaperInputText : BoundUserInterfaceMessage
|
|
||||||
{
|
{
|
||||||
public readonly string Text;
|
public readonly string Text;
|
||||||
|
|
||||||
public PaperInputText(string text)
|
public PaperInputTextMessage(string text)
|
||||||
{
|
{
|
||||||
Text = text;
|
Text = text;
|
||||||
}
|
}
|
||||||
@@ -52,14 +39,13 @@ namespace Content.Shared.Paper
|
|||||||
{
|
{
|
||||||
Read,
|
Read,
|
||||||
Write,
|
Write,
|
||||||
CrossOut,
|
|
||||||
Stamp
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
public enum PaperVisuals : byte
|
public enum PaperVisuals : byte
|
||||||
{
|
{
|
||||||
Status
|
Status,
|
||||||
|
Stamp
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
@@ -68,6 +54,5 @@ namespace Content.Shared.Paper
|
|||||||
Blank,
|
Blank,
|
||||||
Written
|
Written
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
19
Content.Shared/Paper/StampComponent.cs
Normal file
19
Content.Shared/Paper/StampComponent.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
namespace Content.Shared.Paper
|
||||||
|
{
|
||||||
|
[RegisterComponent]
|
||||||
|
public class StampComponent : Component
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The loc string name that will be stamped to the piece of paper on examine.
|
||||||
|
/// </summary>
|
||||||
|
[ViewVariables]
|
||||||
|
[DataField("stampedName")]
|
||||||
|
public string StampedName { get; set; } = "stamp-component-stamped-name-default";
|
||||||
|
/// <summary>
|
||||||
|
/// Tne sprite state of the stamp to display on the paper from bureacracy.rsi.
|
||||||
|
/// </summary>
|
||||||
|
[ViewVariables]
|
||||||
|
[DataField("stampState")]
|
||||||
|
public string StampState { get; set; } = "paper_stamp-generic";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,5 +2,9 @@
|
|||||||
### UI
|
### UI
|
||||||
|
|
||||||
# Shown when paper with words examined details
|
# 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)}.
|
||||||
|
|||||||
15
Resources/Locale/en-US/paper/stamp-component.ftl
Normal file
15
Resources/Locale/en-US/paper/stamp-component.ftl
Normal file
@@ -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
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
- type: StorageFill
|
- type: StorageFill
|
||||||
contents:
|
contents:
|
||||||
- id: BoxHug
|
- id: BoxHug
|
||||||
|
- id: RubberStampClown
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
@@ -93,6 +94,7 @@
|
|||||||
- type: StorageFill
|
- type: StorageFill
|
||||||
contents:
|
contents:
|
||||||
- id: BoxSurvival
|
- id: BoxSurvival
|
||||||
|
- id: RubberStampMime
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
@@ -112,6 +114,7 @@
|
|||||||
contents:
|
contents:
|
||||||
- id: BoxSurvival
|
- id: BoxSurvival
|
||||||
- id: Bible
|
- id: Bible
|
||||||
|
- id: RubberStampChaplain
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
- type: StorageFill
|
- type: StorageFill
|
||||||
contents:
|
contents:
|
||||||
- id: BoxHug
|
- id: BoxHug
|
||||||
|
- id: RubberStampClown
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
@@ -72,6 +73,7 @@
|
|||||||
- type: StorageFill
|
- type: StorageFill
|
||||||
contents:
|
contents:
|
||||||
- id: BoxSurvival
|
- id: BoxSurvival
|
||||||
|
- id: RubberStampMime
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
@@ -91,6 +93,7 @@
|
|||||||
contents:
|
contents:
|
||||||
- id: BoxSurvival
|
- id: BoxSurvival
|
||||||
- id: Bible
|
- id: Bible
|
||||||
|
- id: RubberStampChaplain
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
|
|||||||
@@ -91,6 +91,7 @@
|
|||||||
contents:
|
contents:
|
||||||
- id: BoxSurvival
|
- id: BoxSurvival
|
||||||
- id: Bible
|
- id: Bible
|
||||||
|
- id: RubberStampChaplain
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
- id: CigPackGreen
|
- id: CigPackGreen
|
||||||
prob: 0.50
|
prob: 0.50
|
||||||
- id: DoorRemoteCargo
|
- id: DoorRemoteCargo
|
||||||
|
- id: RubberStampQm
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: LockerCaptainFilled
|
id: LockerCaptainFilled
|
||||||
@@ -53,6 +54,7 @@
|
|||||||
- id: ClothingUniformJumpskirtCapFormalDress
|
- id: ClothingUniformJumpskirtCapFormalDress
|
||||||
- id: ClothingNeckBronzeheart
|
- id: ClothingNeckBronzeheart
|
||||||
- id: ClothingNeckGoldmedal
|
- id: ClothingNeckGoldmedal
|
||||||
|
- id: RubberStampCaptain
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: LockerHeadOfPersonnelFilled
|
id: LockerHeadOfPersonnelFilled
|
||||||
@@ -79,6 +81,7 @@
|
|||||||
# Fuck the HoP they don't deserve fucking cigars.
|
# Fuck the HoP they don't deserve fucking cigars.
|
||||||
- id: DoorRemoteService
|
- id: DoorRemoteService
|
||||||
- id: ClothingNeckGoldmedal
|
- id: ClothingNeckGoldmedal
|
||||||
|
- id: RubberStampHop
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: LockerChiefEngineerFilled
|
id: LockerChiefEngineerFilled
|
||||||
@@ -124,6 +127,7 @@
|
|||||||
- id: Hypospray
|
- id: Hypospray
|
||||||
- id: HandheldCrewMonitor
|
- id: HandheldCrewMonitor
|
||||||
- id: DoorRemoteMedical
|
- id: DoorRemoteMedical
|
||||||
|
- id: RubberStampCMO
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: LockerResearchDirectorFilled
|
id: LockerResearchDirectorFilled
|
||||||
@@ -142,6 +146,7 @@
|
|||||||
- id: PlushieSlime
|
- id: PlushieSlime
|
||||||
prob: 0.1
|
prob: 0.1
|
||||||
- id: DoorRemoteResearch
|
- id: DoorRemoteResearch
|
||||||
|
- id: RubberStampRd
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: LockerHeadOfSecurityFilled
|
id: LockerHeadOfSecurityFilled
|
||||||
@@ -180,3 +185,4 @@
|
|||||||
- id: DoorRemoteSecurity
|
- id: DoorRemoteSecurity
|
||||||
- id: ClothingUniformJumpskirtHosFormal
|
- id: ClothingUniformJumpskirtHosFormal
|
||||||
- id: ClothingUniformJumpsuitHosFormal
|
- id: ClothingUniformJumpsuitHosFormal
|
||||||
|
- id: RubberStampHos
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
- id: ClothingHandsGlovesCombat
|
- id: ClothingHandsGlovesCombat
|
||||||
- id: ClothingShoesBootsJack
|
- id: ClothingShoesBootsJack
|
||||||
- id: ClothingOuterCoatWarden
|
- id: ClothingOuterCoatWarden
|
||||||
|
- id: RubberStampWarden
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: LockerSecurityFilled
|
id: LockerSecurityFilled
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
id: PaperWrittenAMEScribbles
|
id: PaperWrittenAMEScribbles
|
||||||
suffix: "AME scribbles"
|
suffix: "AME scribbles"
|
||||||
parent: PaperWritten
|
parent: Paper
|
||||||
components:
|
components:
|
||||||
- type: Paper
|
- type: Paper
|
||||||
content: |
|
content: |
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
id: PaperWrittenSalvageLoreMedium1PlasmaTrap
|
id: PaperWrittenSalvageLoreMedium1PlasmaTrap
|
||||||
noSpawn: true # keep this from spamming spawn sheet
|
noSpawn: true # keep this from spamming spawn sheet
|
||||||
suffix: "Salvage: Lore: Medium 1: Plasma Trap"
|
suffix: "Salvage: Lore: Medium 1: Plasma Trap"
|
||||||
parent: PaperWritten
|
parent: Paper
|
||||||
components:
|
components:
|
||||||
- type: Paper
|
- type: Paper
|
||||||
content: |
|
content: |
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
id: PaperWrittenSalvageLoreGaming1
|
id: PaperWrittenSalvageLoreGaming1
|
||||||
noSpawn: true # keep this from spamming spawn sheet
|
noSpawn: true # keep this from spamming spawn sheet
|
||||||
suffix: "Salvage: Lore: Gaming 1"
|
suffix: "Salvage: Lore: Gaming 1"
|
||||||
parent: PaperWritten
|
parent: Paper
|
||||||
components:
|
components:
|
||||||
- type: Paper
|
- type: Paper
|
||||||
content: |
|
content: |
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
id: PaperWrittenSalvageLoreGaming2
|
id: PaperWrittenSalvageLoreGaming2
|
||||||
noSpawn: true # keep this from spamming spawn sheet
|
noSpawn: true # keep this from spamming spawn sheet
|
||||||
suffix: "Salvage: Lore: Gaming 2"
|
suffix: "Salvage: Lore: Gaming 2"
|
||||||
parent: PaperWritten
|
parent: Paper
|
||||||
components:
|
components:
|
||||||
- type: Paper
|
- type: Paper
|
||||||
content: |
|
content: |
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
id: PaperWrittenSalvageLoreGaming3
|
id: PaperWrittenSalvageLoreGaming3
|
||||||
noSpawn: true # keep this from spamming spawn sheet
|
noSpawn: true # keep this from spamming spawn sheet
|
||||||
suffix: "Salvage: Lore: Gaming 3"
|
suffix: "Salvage: Lore: Gaming 3"
|
||||||
parent: PaperWritten
|
parent: Paper
|
||||||
components:
|
components:
|
||||||
- type: Paper
|
- type: Paper
|
||||||
content: |
|
content: |
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
id: PaperWrittenSalvageLoreGaming4
|
id: PaperWrittenSalvageLoreGaming4
|
||||||
noSpawn: true # keep this from spamming spawn sheet
|
noSpawn: true # keep this from spamming spawn sheet
|
||||||
suffix: "Salvage: Lore: Gaming 4"
|
suffix: "Salvage: Lore: Gaming 4"
|
||||||
parent: PaperWritten
|
parent: Paper
|
||||||
components:
|
components:
|
||||||
- type: Paper
|
- type: Paper
|
||||||
content: |
|
content: |
|
||||||
|
|||||||
@@ -9,6 +9,12 @@
|
|||||||
netsync: false
|
netsync: false
|
||||||
layers:
|
layers:
|
||||||
- state: paper
|
- state: paper
|
||||||
|
- state: paper_words
|
||||||
|
map: ["enum.PaperVisualLayers.Writing"]
|
||||||
|
visible: false
|
||||||
|
- state: paper_stamp-generic
|
||||||
|
map: ["enum.PaperVisualLayers.Stamp"]
|
||||||
|
visible: false
|
||||||
- type: Paper
|
- type: Paper
|
||||||
- type: ActivatableUI
|
- type: ActivatableUI
|
||||||
key: enum.PaperUiKey.Key
|
key: enum.PaperUiKey.Key
|
||||||
@@ -16,20 +22,13 @@
|
|||||||
interfaces:
|
interfaces:
|
||||||
- key: enum.PaperUiKey.Key
|
- key: enum.PaperUiKey.Key
|
||||||
type: PaperBoundUserInterface
|
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
|
- type: Item
|
||||||
size: 1
|
size: 1
|
||||||
- type: Tag
|
- type: Tag
|
||||||
tags:
|
tags:
|
||||||
- Document
|
- Document
|
||||||
|
- type: Appearance
|
||||||
|
- type: PaperVisuals
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: Paper
|
parent: Paper
|
||||||
@@ -50,7 +49,7 @@
|
|||||||
type: PaperBoundUserInterface
|
type: PaperBoundUserInterface
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: PaperWritten
|
parent: Paper
|
||||||
id: NukeCodePaper
|
id: NukeCodePaper
|
||||||
name: nuclear authentication codes
|
name: nuclear authentication codes
|
||||||
components:
|
components:
|
||||||
@@ -141,8 +140,6 @@
|
|||||||
visuals:
|
visuals:
|
||||||
- type: MappedItemVisualizer
|
- type: MappedItemVisualizer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: BoxFolderRed
|
id: BoxFolderRed
|
||||||
parent: BoxFolderBase
|
parent: BoxFolderBase
|
||||||
@@ -213,3 +210,188 @@
|
|||||||
- state: folder-colormap
|
- state: folder-colormap
|
||||||
color: "#3f3f3f"
|
color: "#3f3f3f"
|
||||||
- state: folder-base
|
- 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
|
||||||
|
|||||||
@@ -174,6 +174,9 @@
|
|||||||
{
|
{
|
||||||
"name": "paper_stamp-warden"
|
"name": "paper_stamp-warden"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "paper_stamp-generic"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "paper_talisman"
|
"name": "paper_talisman"
|
||||||
},
|
},
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 148 B |
Reference in New Issue
Block a user