* AutoCompState + ItemToggle fixes Fix a lot of the comp states that are never actually networked and also cleaned up ItemToggle events a bunch. ItemToggle will still need some future work for lights and sounds. * Also catch these
27 lines
951 B
C#
27 lines
951 B
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>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
|
public ProtoId<ItemSizePrototype>? ActivatedSize = null;
|
|
|
|
/// <summary>
|
|
/// Item's size when deactivated. If none is mentioned, it uses the item's default size instead.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
|
|
public ProtoId<ItemSizePrototype>? DeactivatedSize = null;
|
|
}
|