Files
wwdpublic/Content.Shared/Actions/ConfirmableActionComponent.cs
Eris d6f3265e83 MODsuits (Port From Goob #1242) (#1640)
# Description

Ports MODsuits from Goobstation PR
https://github.com/Goob-Station/Goob-Station/pull/1242. The PR author
has confirmed that he is okay with me doing this.

---

# TODO

- [X] Port in sprites
- [x] Port in YMLs
- [X] Port code
- [x] Port code PATCHES
- [x] Update EE with required fixes

---

<details><summary><h1>Media</h1></summary>
<p>

## Modsuit crafting

https://github.com/user-attachments/assets/8ff03d3a-0fc1-4818-b710-bfc43f0e2a68

## Modsuit sealing

https://github.com/user-attachments/assets/6671459a-7767-499b-8678-062fc1db7134

</p>
</details>

---

# Changelog

🆑
- add: Modsuits have been ported from Goobstation!

---------

Signed-off-by: Eris <erisfiregamer1@gmail.com>
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
Co-authored-by: VMSolidus <evilexecutive@gmail.com>

(cherry picked from commit cb06c41fc07275e1f15af916babb44368c0c26c2)
2025-01-29 20:09:26 +03:00

57 lines
1.9 KiB
C#

using Content.Shared.Popups;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Actions;
/// <summary>
/// An action that must be confirmed before using it.
/// Using it for the first time primes it, after a delay you can then confirm it.
/// Used for dangerous actions that cannot be undone (unlike screaming).
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(ConfirmableActionSystem))]
[AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class ConfirmableActionComponent : Component
{
/// <summary>
/// Warning popup shown when priming the action.
/// </summary>
// Goobstation - Modsuits - Removed required string
[DataField]
public LocId? Popup = null;
/// <summary>
/// Type of warning popup - Goobstaiton - Modsuits
/// </summary>
[DataField("popupType")]
public PopupType PopupFontType = PopupType.LargeCaution;
/// <summary>
/// If not null, this is when the action can be confirmed at.
/// This is the time of priming plus the delay.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoNetworkedField, AutoPausedField]
public TimeSpan? NextConfirm;
/// <summary>
/// If not null, this is when the action will unprime at.
/// This is <c>NextConfirm> plus <c>PrimeTime</c>
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoNetworkedField, AutoPausedField]
public TimeSpan? NextUnprime;
/// <summary>
/// Forced delay between priming and confirming to prevent accidents.
/// </summary>
[DataField]
public TimeSpan ConfirmDelay = TimeSpan.FromSeconds(1);
/// <summary>
/// Once you prime the action it will unprime after this length of time.
/// </summary>
[DataField]
public TimeSpan PrimeTime = TimeSpan.FromSeconds(5);
}