World Storage (#112)
* Added generic crate assets. Added open flag to StorageComponent. * StorageComponent door toggling works. * Door now updates based on if someone is subscribed to the Storage. * Added License to crate.rsi Fixed Icon of crate. * Added basic Locker. * Added Fire Extinguisher. * Added ability to close the storage UI by the server. Notify the server that the UI is closed, so that the player is unsubscribed from the storage. Unsubscribe the player from a storage if the player entity moves out of range. * Add check to make sure entity is on the same map as the storage. * Update Engine module. * Update Engine.
This commit is contained in:
@@ -9,6 +9,29 @@ namespace Content.Shared.GameObjects.Components.Storage
|
||||
{
|
||||
public sealed override string Name => "Storage";
|
||||
public override uint? NetID => ContentNetIDs.INVENTORY;
|
||||
public override Type StateType => typeof(StorageComponentState);
|
||||
|
||||
protected bool _open;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
serializer.DataField(ref _open, "open", false);
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class StorageComponentState : ComponentState
|
||||
{
|
||||
public bool Open { get; }
|
||||
|
||||
public StorageComponentState(bool open)
|
||||
: base(ContentNetIDs.INVENTORY)
|
||||
{
|
||||
Open = open;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user