public List<float>? DelayOptions = null;
/// <summary>
- /// If not null, this timer will periodically play this sound wile active.
+ /// If not null, this timer will periodically play this sound while active.
/// </summary>
[DataField("beepSound")]
public SoundSpecifier? BeepSound;
/// </summary>
[DataField("canToggleStartOnStick")]
public bool AllowToggleStartOnStick;
+
+ /// <summary>
+ /// Whether you can examine the item to see its timer or not.
+ /// </summary>
+ [DataField("examinable")]
+ public bool Examinable = true;
}
}
{
public sealed class PaperSystem : EntitySystem
{
- [Dependency] private readonly TagSystem _tagSystem = default!;
- [Dependency] private readonly PopupSystem _popupSystem = default!;
- [Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
+ [Dependency] private readonly SharedInteractionSystem _interaction = default!;
+ [Dependency] private readonly PopupSystem _popupSystem = default!;
+ [Dependency] private readonly TagSystem _tagSystem = default!;
+ [Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
public override void Initialize()
{
SubscribeLocalEvent<PaperComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<PaperComponent, InteractUsingEvent>(OnInteractUsing);
SubscribeLocalEvent<PaperComponent, PaperInputTextMessage>(OnInputTextMessage);
+
+ SubscribeLocalEvent<ActivateOnPaperOpenedComponent, PaperWriteEvent>(OnPaperWrite);
}
private void OnInit(EntityUid uid, PaperComponent paperComp, ComponentInit args)
{
if (_tagSystem.HasTag(args.Used, "Write"))
{
+ var writeEvent = new PaperWriteEvent(uid, args.User);
+ RaiseLocalEvent(args.Used, ref writeEvent);
if (!TryComp<ActorComponent>(args.User, out var actor))
return;
UpdateUserInterface(uid, paperComp);
}
+ private void OnPaperWrite(EntityUid uid, ActivateOnPaperOpenedComponent comp, ref PaperWriteEvent args)
+ {
+ _interaction.UseInHandInteraction(args.User, uid);
+ }
+
/// <summary>
/// Accepts the name and state to be stamped onto the paper, returns true if successful.
/// </summary>
_uiSystem.GetUiOrNull(uid, PaperUiKey.Key)?.SetState(new PaperBoundUserInterfaceState(paperComp.Content, paperComp.StampedBy, paperComp.Mode));
}
}
+
+ /// <summary>
+ /// Event fired when using a pen on paper, opening the UI.
+ /// </summary>
+ [ByRefEvent]
+ public record struct PaperWriteEvent(EntityUid User, EntityUid Paper);
}
categories:
- UplinkExplosives
+- type: listing
+ id: UplinkExplodingPen
+ name: uplink-exploding-pen-name
+ description: uplink-exploding-pen-desc
+ productEntity: PenExploding
+ cost:
+ Telecrystal: 5
+ categories:
+ - UplinkExplosives
+
# Ammo
- type: listing
blacklist:
components:
- SurplusBundle
-
+
- type: listing
id: uplinkRevolverCapGunFake
name: uplink-revolver-cap-gun-fake-name
Telecrystal: 8
categories:
- UplinkMisc
-
+
- type: listing
id: UplinkStimkit
name: uplink-stimkit-name
Telecrystal: 12
categories:
- UplinkMisc
-
+
- type: listing
id: UplinkStimpackExperimental
name: uplink-experimental-stimpack-name