Files
wwdpublic/Content.Server/_EE/Storage/Components/SpawnItemsAtLocationOnUseComponent.cs
Will-Oliver-Br a2217f0189 Fix Chair Mapping (#2422)
Fixes chairs disappearing when saving the map and adds the ability to
enable/disable locks on office chairs.

---

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

https://github.com/user-attachments/assets/277d6ee8-cc51-47df-8b81-0b361234227d

</p>
</details>

---

🆑
-  tweak: Now you can enable and disable the locks on office chairs.
2025-07-12 01:42:00 +10:00

38 lines
1.1 KiB
C#

using Content.Shared.Storage;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
namespace Content.Server._EE.Storage.Components;
/// <summary>
/// Spawns items at the entity's location when used, with rotation alignment and a text menu.
/// I recommend not using it on normal items that fit in the hand; use SpawnItemsOnUse if that's the case.
/// </summary>
[RegisterComponent]
public sealed partial class SpawnItemsAtLocationOnUseComponent : Component
{
/// <summary>
/// The list of entities to spawn, with amounts and orGroups.
/// </summary>
[DataField("items", required: true)]
public List<EntitySpawnEntry> Items = new();
/// <summary>
/// A sound to play when the items are spawned.
/// </summary>
[DataField("sound")]
public SoundSpecifier? Sound;
/// <summary>
/// How many times the entity can be used before deleting itself.
/// </summary>
[DataField("uses")]
public int Uses = 1;
/// <summary>
/// Localization ID for the verb text shown in the UI.
/// </summary>
[DataField]
public LocId SpawnItemsVerbText = "spawn-items-verb";
}