Trashbag stuff (#18096)
This commit is contained in:
@@ -6,6 +6,7 @@ namespace Content.Server.Disposal.Unit.Components;
|
||||
|
||||
// GasMixture life.
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedDisposalUnitComponent))]
|
||||
public sealed class DisposalUnitComponent : SharedDisposalUnitComponent
|
||||
{
|
||||
[DataField("air")]
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace Content.Server.Hands.Systems
|
||||
args.Handled = true; // no shove/stun.
|
||||
}
|
||||
|
||||
public override void PickupAnimation(EntityUid item, EntityCoordinates initialPosition, Vector2 finalPosition,
|
||||
public override void PickupAnimation(EntityUid item, EntityCoordinates initialPosition, Vector2 finalPosition, Angle initialAngle,
|
||||
EntityUid? exclude)
|
||||
{
|
||||
if (finalPosition.EqualsApprox(initialPosition.Position, tolerance: 0.1f))
|
||||
@@ -105,7 +105,7 @@ namespace Content.Server.Hands.Systems
|
||||
if (exclude != null)
|
||||
filter = filter.RemoveWhereAttachedEntity(entity => entity == exclude);
|
||||
|
||||
RaiseNetworkEvent(new PickupAnimationEvent(item, initialPosition, finalPosition), filter);
|
||||
RaiseNetworkEvent(new PickupAnimationEvent(item, initialPosition, finalPosition, initialAngle), filter);
|
||||
}
|
||||
|
||||
protected override void HandleEntityRemoved(EntityUid uid, HandsComponent hands, EntRemovedFromContainerMessage args)
|
||||
|
||||
@@ -275,7 +275,8 @@ namespace Content.Server.Storage.EntitySystems
|
||||
{
|
||||
RaiseNetworkEvent(new AnimateInsertingEntitiesEvent(uid,
|
||||
new List<EntityUid> { target },
|
||||
new List<EntityCoordinates> { position }));
|
||||
new List<EntityCoordinates> { position },
|
||||
new List<Angle> { transformOwner.LocalRotation }));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -288,6 +289,7 @@ namespace Content.Server.Storage.EntitySystems
|
||||
|
||||
var successfullyInserted = new List<EntityUid>();
|
||||
var successfullyInsertedPositions = new List<EntityCoordinates>();
|
||||
var successfullyInsertedAngles = new List<Angle>();
|
||||
var itemQuery = GetEntityQuery<ItemComponent>();
|
||||
var xformQuery = GetEntityQuery<TransformComponent>();
|
||||
xformQuery.TryGetComponent(uid, out var xform);
|
||||
@@ -313,10 +315,13 @@ namespace Content.Server.Storage.EntitySystems
|
||||
_transform
|
||||
);
|
||||
|
||||
var angle = targetXform.LocalRotation;
|
||||
|
||||
if (PlayerInsertEntityInWorld(uid, args.Args.User, entity, component))
|
||||
{
|
||||
successfullyInserted.Add(entity);
|
||||
successfullyInsertedPositions.Add(position);
|
||||
successfullyInsertedAngles.Add(angle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,7 +329,7 @@ namespace Content.Server.Storage.EntitySystems
|
||||
if (successfullyInserted.Count > 0)
|
||||
{
|
||||
_audio.PlayPvs(component.StorageInsertSound, uid);
|
||||
RaiseNetworkEvent(new AnimateInsertingEntitiesEvent(uid, successfullyInserted, successfullyInsertedPositions));
|
||||
RaiseNetworkEvent(new AnimateInsertingEntitiesEvent(uid, successfullyInserted, successfullyInsertedPositions, successfullyInsertedAngles));
|
||||
}
|
||||
|
||||
args.Handled = true;
|
||||
|
||||
Reference in New Issue
Block a user