Rollerbeds (#5681)
This commit is contained in:
@@ -57,11 +57,13 @@ namespace Content.Shared.Buckle.Components
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum StrapVisuals
|
||||
public enum StrapVisuals : byte
|
||||
{
|
||||
RotationAngle
|
||||
RotationAngle,
|
||||
BuckledState
|
||||
}
|
||||
|
||||
// TODO : Convert this to an Entity Message. Careful, it will Break ShuttleControllerComponent (only place where it's used)
|
||||
[Serializable, NetSerializable]
|
||||
#pragma warning disable 618
|
||||
public abstract class StrapChangeMessage : ComponentMessage
|
||||
|
||||
@@ -615,11 +615,14 @@ namespace Content.Shared.Hands.Components
|
||||
protected bool CanInsertEntityIntoHand(Hand hand, EntityUid entity)
|
||||
{
|
||||
var handContainer = hand.Container;
|
||||
if (handContainer == null)
|
||||
return false;
|
||||
if (handContainer == null) return false;
|
||||
|
||||
if (!handContainer.CanInsert(entity))
|
||||
return false;
|
||||
if (!handContainer.CanInsert(entity)) return false;
|
||||
|
||||
var @event = new AttemptItemPickupEvent();
|
||||
_entMan.EventBus.RaiseLocalEvent(entity, @event);
|
||||
|
||||
if (@event.Cancelled) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace Content.Shared.Item
|
||||
{
|
||||
/// <summary>
|
||||
/// Raised on a *mob* when it tries to pickup something
|
||||
/// </summary>
|
||||
public class PickupAttemptEvent : CancellableEntityEventArgs
|
||||
{
|
||||
public PickupAttemptEvent(EntityUid uid)
|
||||
@@ -11,4 +14,14 @@ namespace Content.Shared.Item
|
||||
|
||||
public EntityUid Uid { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised on the *item* when tried to be picked up
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Doesn't just handle "items" but calling it "PickedUpAttempt" is too close to "Pickup" for the sleep deprived brain.
|
||||
/// </remarks>
|
||||
public sealed class AttemptItemPickupEvent : CancellableEntityEventArgs
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ using Robust.Shared.GameStates;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
Reference in New Issue
Block a user