Fix 3000 errors
This commit is contained in:
@@ -76,7 +76,7 @@ namespace Content.Server.GameTicking.Commands
|
||||
shell.ExecuteCommand($"addmap {mapId} false");
|
||||
shell.ExecuteCommand($"loadbp {mapId} \"{CommandParsing.Escape(mapName)}\" true");
|
||||
|
||||
IEntity? tempQualifier = player.AttachedEntity;
|
||||
EntityUid tempQualifier = player.AttachedEntity;
|
||||
if ((tempQualifier != null ? IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(tempQualifier).EntityPrototype : null)?.ID != "AdminObserver")
|
||||
shell.ExecuteCommand("aghost");
|
||||
|
||||
|
||||
@@ -3,11 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Server.Database;
|
||||
using Content.Server.GameTicking.Events;
|
||||
using Content.Server.Players;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Ghost;
|
||||
using Content.Server.Roles;
|
||||
using Content.Server.Station;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Players;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Coordinates;
|
||||
using Content.Shared.GameTicking;
|
||||
@@ -371,7 +369,7 @@ namespace Content.Server.GameTicking
|
||||
{
|
||||
// TODO: Maybe something less naive here?
|
||||
// FIXME: Actually, definitely.
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) entity);
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity(entity);
|
||||
}
|
||||
|
||||
_mapManager.Restart();
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Content.Server.GameTicking.Presets
|
||||
/// <summary>
|
||||
/// Called when a player is spawned in (this includes, but is not limited to, before Start)
|
||||
/// </summary>
|
||||
public virtual void OnSpawnPlayerCompleted(IPlayerSession session, IEntity mob, bool lateJoin) { }
|
||||
public virtual void OnSpawnPlayerCompleted(IPlayerSession session, EntityUid mob, bool lateJoin) { }
|
||||
|
||||
/// <summary>
|
||||
/// Called when a player attempts to ghost.
|
||||
@@ -39,10 +39,10 @@ namespace Content.Server.GameTicking.Presets
|
||||
{
|
||||
var playerEntity = mind.OwnedEntity;
|
||||
|
||||
if (playerEntity != null && IoCManager.Resolve<IEntityManager>().HasComponent<GhostComponent>(playerEntity))
|
||||
if (playerEntity != default && IoCManager.Resolve<IEntityManager>().HasComponent<GhostComponent>(playerEntity))
|
||||
return false;
|
||||
|
||||
if (mind.VisitingEntity != null)
|
||||
if (mind.VisitingEntity != default)
|
||||
{
|
||||
mind.UnVisit();
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Content.Server.GameTicking.Presets
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnSpawnPlayerCompleted(IPlayerSession session, IEntity mob, bool lateJoin)
|
||||
public override void OnSpawnPlayerCompleted(IPlayerSession session, EntityUid mob, bool lateJoin)
|
||||
{
|
||||
var startingBalance = _cfg.GetCVar(CCVars.TraitorDeathMatchStartingBalance);
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Content.Server.GameTicking.Presets
|
||||
foreach (var slot in victimSlots)
|
||||
{
|
||||
if (inventory.TryGetSlotItem(slot, out ItemComponent? vItem))
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) vItem.Owner);
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity(vItem.Owner);
|
||||
}
|
||||
|
||||
// Replace their items:
|
||||
|
||||
Reference in New Issue
Block a user