Files
tbd-station-14/Content.Shared/Item/ItemToggle/Components/ItemToggleSizeComponent.cs
metalgearsloth e1a21728e7 Storage fixes (#36533)
* Storage fixes

- Add size event.
- Fix reclaim not running always.

* Block the toggles

* Standardise and popup explaining

* Disable item toggles in bags

* Fix verb popping up even if we can't activate

* Conflicts

* Validate

* Stop drags if source closes

* Really fixes

* Real fix

* Revert this
2025-04-18 12:11:31 +10:00

39 lines
1.2 KiB
C#

using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Item.ItemToggle.Components;
/// <summary>
/// Handles the changes to the item size when toggled.
/// </summary>
/// <remarks>
/// You can change the size when activated or not. By default the sizes are copied from the item.
/// </remarks>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ItemToggleSizeComponent : Component
{
/// <summary>
/// Item's size when activated
/// </summary>
[DataField, AutoNetworkedField]
public ProtoId<ItemSizePrototype>? ActivatedSize = null;
/// <summary>
/// Item's shape when activated
/// </summary>
[DataField, AutoNetworkedField]
public List<Box2i>? ActivatedShape = null;
/// <summary>
/// Item's size when deactivated. If none is mentioned, it uses the item's default size instead.
/// </summary>
[DataField, AutoNetworkedField]
public ProtoId<ItemSizePrototype>? DeactivatedSize = null;
/// <summary>
/// Item's shape when deactivated. If none is mentioned, it uses the item's default shape instead.
/// </summary>
[DataField, AutoNetworkedField]
public List<Box2i>? DeactivatedShape = null;
}