Fix 3000 errors
This commit is contained in:
@@ -7,13 +7,14 @@ using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server.Administration.Commands
|
||||
{
|
||||
[AdminCommand(AdminFlags.Admin)]
|
||||
public class AGhost : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entities = default!;
|
||||
|
||||
public string Command => "aghost";
|
||||
public string Description => "Makes you an admin ghost.";
|
||||
public string Help => "aghost";
|
||||
@@ -35,34 +36,35 @@ namespace Content.Server.Administration.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
if (mind.VisitingEntity != null && IoCManager.Resolve<IEntityManager>().HasComponent<GhostComponent>(mind.VisitingEntity))
|
||||
if (mind.VisitingEntity != default && _entities.HasComponent<GhostComponent>(mind.VisitingEntity))
|
||||
{
|
||||
player.ContentData()!.Mind?.UnVisit();
|
||||
return;
|
||||
}
|
||||
|
||||
var canReturn = mind.CurrentEntity != null;
|
||||
IEntity? tempQualifier = player.AttachedEntity;
|
||||
var ghost = IoCManager.Resolve<IEntityManager>().SpawnEntity((string?) "AdminObserver", (EntityCoordinates) ((tempQualifier != null ? IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(tempQualifier) : null).Coordinates
|
||||
?? EntitySystem.Get<GameTicker>().GetObserverSpawnPoint()));
|
||||
var canReturn = mind.CurrentEntity != default;
|
||||
var coordinates = player.AttachedEntity.HasValue
|
||||
? _entities.GetComponent<TransformComponent>(player.AttachedEntity.Value).Coordinates
|
||||
: EntitySystem.Get<GameTicker>().GetObserverSpawnPoint();
|
||||
var ghost = _entities.SpawnEntity("AdminObserver", coordinates);
|
||||
|
||||
if (canReturn)
|
||||
{
|
||||
// TODO: Remove duplication between all this and "GamePreset.OnGhostAttempt()"...
|
||||
if(!string.IsNullOrWhiteSpace(mind.CharacterName))
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(ghost).EntityName = mind.CharacterName;
|
||||
_entities.GetComponent<MetaDataComponent>(ghost).EntityName = mind.CharacterName;
|
||||
else if (!string.IsNullOrWhiteSpace(mind.Session?.Name))
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(ghost).EntityName = mind.Session.Name;
|
||||
_entities.GetComponent<MetaDataComponent>(ghost).EntityName = mind.Session.Name;
|
||||
|
||||
mind.Visit(ghost);
|
||||
}
|
||||
else
|
||||
{
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(ghost).EntityName = player.Name;
|
||||
_entities.GetComponent<MetaDataComponent>(ghost).EntityName = player.Name;
|
||||
mind.TransferTo(ghost);
|
||||
}
|
||||
|
||||
var comp = IoCManager.Resolve<IEntityManager>().GetComponent<GhostComponent>(ghost);
|
||||
var comp = _entities.GetComponent<GhostComponent>(ghost);
|
||||
EntitySystem.Get<SharedGhostSystem>().SetCanReturnToBody(comp, canReturn);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
if (entityManager.TryGetComponent<EntityStorageComponent>(storageUid, out var storage))
|
||||
{
|
||||
storage.Insert(entityManager.GetEntity(entityUid));
|
||||
storage.Insert(entityUid);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -13,14 +13,15 @@ namespace Content.Server.Administration.Commands
|
||||
[AdminCommand(AdminFlags.Admin)]
|
||||
class ControlMob : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entities = default!;
|
||||
|
||||
public string Command => "controlmob";
|
||||
public string Description => Loc.GetString("control-mob-command-description");
|
||||
public string Help => Loc.GetString("control-mob-command-help-text");
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var player = shell.Player as IPlayerSession;
|
||||
if (player == null)
|
||||
if (shell.Player is not IPlayerSession player)
|
||||
{
|
||||
shell.WriteLine("shell-server-cannot");
|
||||
return;
|
||||
@@ -32,25 +33,21 @@ namespace Content.Server.Administration.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
if (!int.TryParse(args[0], out var targetId))
|
||||
{
|
||||
shell.WriteLine(Loc.GetString("shell-argument-must-be-number"));
|
||||
return;
|
||||
}
|
||||
|
||||
var eUid = new EntityUid(targetId);
|
||||
var target = new EntityUid(targetId);
|
||||
|
||||
if (!eUid.IsValid() || !entityManager.EntityExists(eUid))
|
||||
if (!target.IsValid() || !_entities.EntityExists(target))
|
||||
{
|
||||
shell.WriteLine(Loc.GetString("shell-invalid-entity-id"));
|
||||
return;
|
||||
}
|
||||
|
||||
var target = entityManager.GetEntity(eUid);
|
||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(target, out MindComponent? mindComponent))
|
||||
if (!_entities.HasComponent<MindComponent>(target))
|
||||
{
|
||||
shell.WriteLine(Loc.GetString("shell-entity-is-not-mob"));
|
||||
return;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
foreach (var component in components)
|
||||
{
|
||||
var uid = (EntityUid) component.Owner;
|
||||
var uid = component.Owner;
|
||||
entityManager.RemoveComponent(uid, component);
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -37,12 +37,12 @@ namespace Content.Server.Administration.Commands
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
var entitiesWithComponents = components.Select(c => entityManager.GetAllComponents(c).Select(x => x.Owner));
|
||||
var entitiesWithAllComponents = entitiesWithComponents.Skip(1).Aggregate(new HashSet<IEntity>(entitiesWithComponents.First()), (h, e) => { h.IntersectWith(e); return h; });
|
||||
var entitiesWithAllComponents = entitiesWithComponents.Skip(1).Aggregate(new HashSet<EntityUid>(entitiesWithComponents.First()), (h, e) => { h.IntersectWith(e); return h; });
|
||||
|
||||
var count = 0;
|
||||
foreach (var entity in entitiesWithAllComponents)
|
||||
{
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) entity);
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity(entity);
|
||||
count += 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
using System.Linq;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using System.Linq;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Administration.Commands
|
||||
{
|
||||
@@ -29,7 +28,7 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) entity);
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity(entity);
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,13 +28,13 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
if (!entityManager.TryGetEntity(id, out var entity))
|
||||
if (!entityManager.EntityExists(id))
|
||||
{
|
||||
shell.WriteLine($"No entity found with id {id}.");
|
||||
return;
|
||||
}
|
||||
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) entity);
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity(id);
|
||||
shell.WriteLine($"Deleted entity with id {id}.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Content.Server.Administration.Commands
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var player = shell.Player as IPlayerSession;
|
||||
if (player?.AttachedEntity == null)
|
||||
if (player?.AttachedEntity is not {Valid: true} playerEntity)
|
||||
{
|
||||
shell.WriteLine("You must have an attached entity.");
|
||||
return;
|
||||
@@ -33,7 +33,7 @@ namespace Content.Server.Administration.Commands
|
||||
var lgh = int.Parse(args[4]);
|
||||
var fla = int.Parse(args[5]);
|
||||
|
||||
var mapTransform = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(player.AttachedEntity).GetMapTransform();
|
||||
var mapTransform = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(playerEntity).GetMapTransform();
|
||||
var coords = new EntityCoordinates(mapTransform.Owner, x, y);
|
||||
|
||||
EntitySystem.Get<ExplosionSystem>().SpawnExplosion(coords, dev, hvy, lgh, fla);
|
||||
|
||||
@@ -5,7 +5,6 @@ using Content.Shared.Administration;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Administration.Commands
|
||||
{
|
||||
@@ -48,17 +47,17 @@ namespace Content.Server.Administration.Commands
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
var entityIds = new HashSet<string>();
|
||||
|
||||
var entitiesWithComponents = components.Select(c => entityManager.GetAllComponents(c).Select(x => x.Owner));
|
||||
var entitiesWithAllComponents = entitiesWithComponents.Skip(1).Aggregate(new HashSet<IEntity>(entitiesWithComponents.First()), (h, e) => { h.IntersectWith(e); return h; });
|
||||
var entitiesWithComponents = components.Select(c => entityManager.GetAllComponents(c).Select(x => x.Owner)).ToArray();
|
||||
var entitiesWithAllComponents = entitiesWithComponents.Skip(1).Aggregate(new HashSet<EntityUid>(entitiesWithComponents.First()), (h, e) => { h.IntersectWith(e); return h; });
|
||||
|
||||
foreach (var entity in entitiesWithAllComponents)
|
||||
{
|
||||
if (IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity).EntityPrototype == null)
|
||||
if (entityManager.GetComponent<MetaDataComponent>(entity).EntityPrototype is not { } prototypeId)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
entityIds.Add(IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity).EntityPrototype.ID);
|
||||
entityIds.Add(prototypeId.ID);
|
||||
}
|
||||
|
||||
if (entityIds.Count == 0)
|
||||
|
||||
@@ -27,22 +27,21 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var player = shell.Player as IPlayerSession;
|
||||
if (args.Length < 1 && player != null) //Try to heal the users mob if applicable
|
||||
if (args.Length < 1 && shell.Player is IPlayerSession player) //Try to heal the users mob if applicable
|
||||
{
|
||||
shell.WriteLine(Loc.GetString("rejuvenate-command-self-heal-message"));
|
||||
if (player.AttachedEntity == null)
|
||||
if (player.AttachedEntity == default)
|
||||
{
|
||||
shell.WriteLine(Loc.GetString("rejuvenate-command-no-entity-attached-message"));
|
||||
return;
|
||||
}
|
||||
PerformRejuvenate(player.AttachedEntity);
|
||||
PerformRejuvenate(player.AttachedEntity.Value);
|
||||
}
|
||||
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
foreach (var arg in args)
|
||||
{
|
||||
if(!EntityUid.TryParse(arg, out var uid) || !entityManager.TryGetEntity(uid, out var entity))
|
||||
if (!EntityUid.TryParse(arg, out var entity) || !entityManager.EntityExists(entity))
|
||||
{
|
||||
shell.WriteLine(Loc.GetString("shell-could-not-find-entity",("entity", arg)));
|
||||
continue;
|
||||
@@ -51,9 +50,9 @@ namespace Content.Server.Administration.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public static void PerformRejuvenate(IEntity target)
|
||||
public static void PerformRejuvenate(EntityUid target)
|
||||
{
|
||||
var targetUid = (EntityUid) target;
|
||||
var targetUid = target;
|
||||
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||
entMan.GetComponentOrNull<MobStateComponent>(targetUid)?.UpdateState(0);
|
||||
entMan.GetComponentOrNull<HungerComponent>(targetUid)?.ResetFood();
|
||||
@@ -61,24 +60,24 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
EntitySystem.Get<StatusEffectsSystem>().TryRemoveAllStatusEffects(target);
|
||||
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(target, out FlammableComponent? flammable))
|
||||
if (entMan.TryGetComponent(target, out FlammableComponent? flammable))
|
||||
{
|
||||
EntitySystem.Get<FlammableSystem>().Extinguish(target, flammable);
|
||||
}
|
||||
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(target, out DamageableComponent? damageable))
|
||||
if (entMan.TryGetComponent(target, out DamageableComponent? damageable))
|
||||
{
|
||||
EntitySystem.Get<DamageableSystem>().SetAllDamage(damageable, 0);
|
||||
}
|
||||
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(target, out CreamPiedComponent? creamPied))
|
||||
if (entMan.TryGetComponent(target, out CreamPiedComponent? creamPied))
|
||||
{
|
||||
EntitySystem.Get<CreamPieSystem>().SetCreamPied(target, creamPied, false);
|
||||
}
|
||||
|
||||
if (IoCManager.Resolve<IEntityManager>().HasComponent<JitteringComponent>(target))
|
||||
if (entMan.HasComponent<JitteringComponent>(target))
|
||||
{
|
||||
IoCManager.Resolve<IEntityManager>().RemoveComponent<JitteringComponent>(target);
|
||||
entMan.RemoveComponent<JitteringComponent>(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
if (entityManager.TryGetComponent<EntityStorageComponent>(parent, out var storage))
|
||||
{
|
||||
storage.Remove(entityManager.GetEntity(entityUid));
|
||||
storage.Remove(entityUid);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -33,16 +32,17 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
foreach (var entity in entityManager.GetEntities())
|
||||
{
|
||||
if (checkPrototype && IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity).EntityPrototype != prototype || IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity).EntityPrototype == null)
|
||||
var metaData = entityManager.GetComponent<MetaDataComponent>(entity);
|
||||
if (checkPrototype && metaData.EntityPrototype != prototype || metaData.EntityPrototype == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var modified = false;
|
||||
|
||||
foreach (var component in IoCManager.Resolve<IEntityManager>().GetComponents(entity))
|
||||
foreach (var component in entityManager.GetComponents(entity))
|
||||
{
|
||||
if (IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity).EntityPrototype.Components.ContainsKey(component.Name))
|
||||
if (metaData.EntityPrototype.Components.ContainsKey(component.Name))
|
||||
continue;
|
||||
|
||||
entityManager.RemoveComponent(entity, component);
|
||||
|
||||
@@ -42,9 +42,7 @@ namespace Content.Server.Administration.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
var target = entityManager.GetEntity(eUid);
|
||||
|
||||
if (!IoCManager.Resolve<IEntityManager>().HasComponent<MindComponent>(target))
|
||||
if (!entityManager.HasComponent<MindComponent>(eUid))
|
||||
{
|
||||
shell.WriteLine(Loc.GetString("set-mind-command-target-has-no-mind-message"));
|
||||
return;
|
||||
@@ -69,11 +67,11 @@ namespace Content.Server.Administration.Commands
|
||||
{
|
||||
mind = new Mind.Mind(session.UserId)
|
||||
{
|
||||
CharacterName = IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(target).EntityName
|
||||
CharacterName = entityManager.GetComponent<MetaDataComponent>(eUid).EntityName
|
||||
};
|
||||
mind.ChangeOwningPlayer(session.UserId);
|
||||
}
|
||||
mind.TransferTo(target);
|
||||
mind.TransferTo(eUid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,17 +43,15 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
var eUid = new EntityUid(entityUid);
|
||||
var target = new EntityUid(entityUid);
|
||||
|
||||
if (!eUid.IsValid() || !entityManager.EntityExists(eUid))
|
||||
if (!target.IsValid() || !entityManager.EntityExists(target))
|
||||
{
|
||||
shell.WriteLine(Loc.GetString("shell-invalid-entity-id"));
|
||||
return;
|
||||
}
|
||||
|
||||
var target = entityManager.GetEntity(eUid);
|
||||
|
||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<InventoryComponent?>(target, out var inventoryComponent))
|
||||
if (!entityManager.TryGetComponent<InventoryComponent?>(target, out var inventoryComponent))
|
||||
{
|
||||
shell.WriteLine(Loc.GetString("shell-target-entity-does-not-have-message",("missing", "inventory")));
|
||||
return;
|
||||
@@ -82,7 +80,7 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
HumanoidCharacterProfile? profile = null;
|
||||
// Check if we are setting the outfit of a player to respect the preferences
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent<ActorComponent?>(target, out var actorComponent))
|
||||
if (entityManager.TryGetComponent<ActorComponent?>(target, out var actorComponent))
|
||||
{
|
||||
var userId = actorComponent.PlayerSession.UserId;
|
||||
var preferencesManager = IoCManager.Resolve<IServerPreferencesManager>();
|
||||
@@ -98,15 +96,15 @@ namespace Content.Server.Administration.Commands
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var equipmentEntity = entityManager.SpawnEntity(gearStr, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(target).Coordinates);
|
||||
var equipmentEntity = entityManager.SpawnEntity(gearStr, entityManager.GetComponent<TransformComponent>(target).Coordinates);
|
||||
if (slot == EquipmentSlotDefines.Slots.IDCARD &&
|
||||
IoCManager.Resolve<IEntityManager>().TryGetComponent<PDAComponent?>(equipmentEntity, out var pdaComponent) &&
|
||||
entityManager.TryGetComponent<PDAComponent?>(equipmentEntity, out var pdaComponent) &&
|
||||
pdaComponent.ContainedID != null)
|
||||
{
|
||||
pdaComponent.ContainedID.FullName = IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(target).EntityName;
|
||||
pdaComponent.ContainedID.FullName = entityManager.GetComponent<MetaDataComponent>(target).EntityName;
|
||||
}
|
||||
|
||||
inventoryComponent.Equip(slot, IoCManager.Resolve<IEntityManager>().GetComponent<ItemComponent>(equipmentEntity), false);
|
||||
inventoryComponent.Equip(slot, entityManager.GetComponent<ItemComponent>(equipmentEntity), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,19 +53,19 @@ namespace Content.Server.Administration.Commands
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player.Status != SessionStatus.InGame || player.AttachedEntity == null)
|
||||
if (player.Status != SessionStatus.InGame || player.AttachedEntity is not {Valid: true} playerEntity)
|
||||
{
|
||||
shell.WriteLine("You are not in-game!");
|
||||
return;
|
||||
}
|
||||
|
||||
var mapManager = IoCManager.Resolve<IMapManager>();
|
||||
var currentMap = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(player.AttachedEntity).MapID;
|
||||
var currentGrid = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(player.AttachedEntity).GridID;
|
||||
var currentMap = entMan.GetComponent<TransformComponent>(playerEntity).MapID;
|
||||
var currentGrid = entMan.GetComponent<TransformComponent>(playerEntity).GridID;
|
||||
|
||||
var found = entMan.EntityQuery<WarpPointComponent>(true)
|
||||
.Where(p => p.Location == location)
|
||||
.Select(p => IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(p.Owner).Coordinates)
|
||||
.Select(p => entMan.GetComponent<TransformComponent>(p.Owner).Coordinates)
|
||||
.OrderBy(p => p, Comparer<EntityCoordinates>.Create((a, b) =>
|
||||
{
|
||||
// Sort so that warp points on the same grid/map are first.
|
||||
@@ -113,8 +113,8 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
if (found.GetGridId(entMan) != GridId.Invalid)
|
||||
{
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(player.AttachedEntity).Coordinates = found;
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(player.AttachedEntity, out IPhysBody? physics))
|
||||
entMan.GetComponent<TransformComponent>(playerEntity).Coordinates = found;
|
||||
if (entMan.TryGetComponent(playerEntity, out IPhysBody? physics))
|
||||
{
|
||||
physics.LinearVelocity = Vector2.Zero;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user