Retractable items system + Arm Blade action (#38150)

This commit is contained in:
ScarKy0
2025-06-14 20:29:06 +02:00
committed by GitHub
parent 635ea4b2b4
commit 208b245dcb
13 changed files with 243 additions and 6 deletions

View File

@@ -0,0 +1,41 @@
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.RetractableItemAction;
/// <summary>
/// Used for storing an unremovable item within an action and summoning it into your hand on use.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(RetractableItemActionSystem))]
public sealed partial class RetractableItemActionComponent : Component
{
/// <summary>
/// The item that will appear be spawned by the action.
/// </summary>
[DataField(required: true)]
public EntProtoId SpawnedPrototype;
/// <summary>
/// Sound collection to play when the item is summoned.
/// </summary>
[DataField]
public SoundCollectionSpecifier? SummonSounds;
/// <summary>
/// Sound collection to play when the summoned item is retracted back into the action.
/// </summary>
[DataField]
public SoundCollectionSpecifier? RetractSounds;
/// <summary>
/// The item managed by the action. Will be summoned and hidden as the action is used.
/// </summary>
[DataField, AutoNetworkedField]
public EntityUid? ActionItemUid;
/// <summary>
/// The container ID used to store the item.
/// </summary>
public const string ContainerId = "item-action-item-container";
}