Fix 3000 errors
This commit is contained in:
@@ -1,21 +1,9 @@
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Hands.Components;
|
||||
using Content.Server.Items;
|
||||
using Content.Server.Paper;
|
||||
using Content.Server.Storage.Components;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Morgue;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Standing;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.Morgue.Components
|
||||
{
|
||||
@@ -27,9 +15,9 @@ namespace Content.Server.Morgue.Components
|
||||
{
|
||||
public override string Name => "BodyBagEntityStorage";
|
||||
|
||||
protected override bool AddToContents(IEntity entity)
|
||||
protected override bool AddToContents(EntityUid entity)
|
||||
{
|
||||
if (IoCManager.Resolve<IEntityManager>().HasComponent<SharedBodyComponent>(entity) && !EntitySystem.Get<StandingStateSystem>().IsDown((EntityUid) entity)) return false;
|
||||
if (IoCManager.Resolve<IEntityManager>().HasComponent<SharedBodyComponent>(entity) && !EntitySystem.Get<StandingStateSystem>().IsDown(entity)) return false;
|
||||
return base.AddToContents(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ using Content.Shared.Popups;
|
||||
using Content.Shared.Sound;
|
||||
using Content.Shared.Standing;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -69,7 +68,7 @@ namespace Content.Server.Morgue.Components
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanOpen(IEntity user, bool silent = false)
|
||||
public override bool CanOpen(EntityUid user, bool silent = false)
|
||||
{
|
||||
if (Cooking)
|
||||
{
|
||||
@@ -117,7 +116,7 @@ namespace Content.Server.Morgue.Components
|
||||
{
|
||||
var item = Contents.ContainedEntities[i];
|
||||
Contents.Remove(item);
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) item);
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity(item);
|
||||
}
|
||||
|
||||
var ash = IoCManager.Resolve<IEntityManager>().SpawnEntity("Ash", IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).Coordinates);
|
||||
@@ -131,12 +130,16 @@ namespace Content.Server.Morgue.Components
|
||||
}, _cremateCancelToken.Token);
|
||||
}
|
||||
|
||||
SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
|
||||
SuicideKind ISuicideAct.Suicide(EntityUid victim, IChatManager chat)
|
||||
{
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(victim, out ActorComponent? actor) && actor.PlayerSession.ContentData()?.Mind is {} mind)
|
||||
{
|
||||
EntitySystem.Get<GameTicker>().OnGhostAttempt(mind, false);
|
||||
mind.OwnedEntity?.PopupMessage(Loc.GetString("crematorium-entity-storage-component-suicide-message"));
|
||||
|
||||
if (mind.OwnedEntity.Valid)
|
||||
{
|
||||
mind.OwnedEntity.PopupMessage(Loc.GetString("crematorium-entity-storage-component-suicide-message"));
|
||||
}
|
||||
}
|
||||
|
||||
victim.PopupMessageOtherClients(Loc.GetString("crematorium-entity-storage-component-suicide-message-others", ("victim", victim)));
|
||||
@@ -144,11 +147,11 @@ namespace Content.Server.Morgue.Components
|
||||
if (CanInsert(victim))
|
||||
{
|
||||
Insert(victim);
|
||||
EntitySystem.Get<StandingStateSystem>().Down((EntityUid) victim, false);
|
||||
EntitySystem.Get<StandingStateSystem>().Down(victim, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) victim);
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity(victim);
|
||||
}
|
||||
|
||||
Cremate();
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Content.Server.Morgue.Components
|
||||
private string? _trayPrototypeId;
|
||||
|
||||
[ViewVariables]
|
||||
private IEntity? _tray;
|
||||
private EntityUid _tray;
|
||||
|
||||
[ViewVariables]
|
||||
public ContainerSlot? TrayContainer { get; private set; }
|
||||
@@ -69,14 +69,14 @@ namespace Content.Server.Morgue.Components
|
||||
return base.ContentsDumpPosition();
|
||||
}
|
||||
|
||||
protected override bool AddToContents(IEntity entity)
|
||||
protected override bool AddToContents(EntityUid entity)
|
||||
{
|
||||
if (IoCManager.Resolve<IEntityManager>().HasComponent<SharedBodyComponent>(entity) && !EntitySystem.Get<StandingStateSystem>().IsDown((EntityUid) entity))
|
||||
if (IoCManager.Resolve<IEntityManager>().HasComponent<SharedBodyComponent>(entity) && !EntitySystem.Get<StandingStateSystem>().IsDown(entity))
|
||||
return false;
|
||||
return base.AddToContents(entity);
|
||||
}
|
||||
|
||||
public override bool CanOpen(IEntity user, bool silent = false)
|
||||
public override bool CanOpen(EntityUid user, bool silent = false)
|
||||
{
|
||||
if (!Owner.InRangeUnobstructed(
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).Coordinates.Offset(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).LocalRotation.GetCardinalDir()),
|
||||
@@ -145,7 +145,7 @@ namespace Content.Server.Morgue.Components
|
||||
}
|
||||
}
|
||||
|
||||
protected override IEnumerable<IEntity> DetermineCollidingEntities()
|
||||
protected override IEnumerable<EntityUid> DetermineCollidingEntities()
|
||||
{
|
||||
if (_tray == null)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Content.Server.Morgue.Components
|
||||
public override string Name => "MorgueTray";
|
||||
|
||||
[ViewVariables]
|
||||
public IEntity? Morgue { get; set; }
|
||||
public EntityUid Morgue { get; set; }
|
||||
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user