Actual lockers (#195)
Adds storing entities into lockers the way we all know and love. Relies on an implementation of ITileDefinition in https://github.com/space-wizards/space-station-14/pull/193 (just like origin/master) #191
This commit is contained in:
committed by
Pieter-Jan Briers
parent
1fe24eeb12
commit
903961771b
@@ -2,6 +2,7 @@
|
||||
using Content.Server.GameObjects.Components.Projectiles;
|
||||
using Content.Shared.GameObjects;
|
||||
using Content.Shared.Physics;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects.Components;
|
||||
|
||||
@@ -25,9 +26,10 @@ namespace Content.Server.GameObjects.Components
|
||||
// after impacting the first object.
|
||||
// For realism this should actually be changed when the velocity of the object is less than a threshold.
|
||||
// This would allow ricochets off walls, and weird gravity effects from slowing the object.
|
||||
if (collidedwith.Count > 0 && Owner.TryGetComponent(out ICollidableComponent body))
|
||||
if (collidedwith.Count > 0 && Owner.TryGetComponent(out CollidableComponent body))
|
||||
{
|
||||
body.CollisionMask &= (int) ~CollisionGroup.Mob;
|
||||
body.CollisionMask &= (int)~CollisionGroup.Mob;
|
||||
body.IsScrapingFloor = true;
|
||||
|
||||
// KYS, your job is finished.
|
||||
Owner.RemoveComponent<ThrownItemComponent>();
|
||||
|
||||
Reference in New Issue
Block a user