fixes morgue (almost) (#4375)
* fixes morgue (almost) * yes Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
using Content.Server.Storage.Components;
|
using Content.Server.Storage.Components;
|
||||||
using Content.Shared.Body.Components;
|
using Content.Shared.Body.Components;
|
||||||
using Content.Shared.Directions;
|
using Content.Shared.Directions;
|
||||||
@@ -12,6 +13,7 @@ using Robust.Server.GameObjects;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
@@ -132,6 +134,20 @@ namespace Content.Server.Morgue.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override IEnumerable<IEntity> DetermineCollidingEntities()
|
||||||
|
{
|
||||||
|
if (_tray == null)
|
||||||
|
{
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
|
||||||
|
var entityLookup = IoCManager.Resolve<IEntityLookup>();
|
||||||
|
foreach (var entity in entityLookup.GetEntitiesIntersecting(_tray))
|
||||||
|
{
|
||||||
|
yield return entity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Called every 10 seconds
|
//Called every 10 seconds
|
||||||
public void Update()
|
public void Update()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ namespace Content.Server.Storage.Components
|
|||||||
EmptyContents();
|
EmptyContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IEnumerable<IEntity> DetermineCollidingEntities()
|
protected virtual IEnumerable<IEntity> DetermineCollidingEntities()
|
||||||
{
|
{
|
||||||
var entityLookup = IoCManager.Resolve<IEntityLookup>();
|
var entityLookup = IoCManager.Resolve<IEntityLookup>();
|
||||||
return entityLookup.GetEntitiesIntersecting(Owner);
|
return entityLookup.GetEntitiesIntersecting(Owner);
|
||||||
|
|||||||
@@ -54,6 +54,18 @@
|
|||||||
name: morgue tray
|
name: morgue tray
|
||||||
description: If you lay down to have a rest on this, you'll soon have a problem.
|
description: If you lay down to have a rest on this, you'll soon have a problem.
|
||||||
components:
|
components:
|
||||||
|
- type: Physics
|
||||||
|
bodyType: Static
|
||||||
|
fixtures:
|
||||||
|
- shape:
|
||||||
|
!type:PhysShapeAabb
|
||||||
|
bounds: "-0.5, -0.5, 0.5, 0.5"
|
||||||
|
mass: 25
|
||||||
|
mask:
|
||||||
|
- Impassable
|
||||||
|
- MobImpassable
|
||||||
|
- VaultImpassable
|
||||||
|
- SmallImpassable
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
netsync: false
|
netsync: false
|
||||||
sprite: Structures/Storage/morgue.rsi
|
sprite: Structures/Storage/morgue.rsi
|
||||||
|
|||||||
Reference in New Issue
Block a user