Inline UID
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Content.Server.Construction.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
gridId = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(player.AttachedEntity.Uid).GridID;
|
||||
gridId = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(player.AttachedEntity).GridID;
|
||||
break;
|
||||
case 1:
|
||||
if (!int.TryParse(args[0], out var id))
|
||||
@@ -67,7 +67,7 @@ namespace Content.Server.Construction.Commands
|
||||
}
|
||||
|
||||
var changed = 0;
|
||||
foreach (var childUid in IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(gridEntity.Uid).ChildEntityUids)
|
||||
foreach (var childUid in IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(gridEntity).ChildEntityUids)
|
||||
{
|
||||
if (!entityManager.TryGetEntity(childUid, out var childEntity))
|
||||
{
|
||||
@@ -83,9 +83,9 @@ namespace Content.Server.Construction.Commands
|
||||
valid |= occluder.Enabled;
|
||||
}
|
||||
// low walls & grilles
|
||||
valid |= IoCManager.Resolve<IEntityManager>().HasComponent<SharedCanBuildWindowOnTopComponent>(childEntity.Uid);
|
||||
valid |= IoCManager.Resolve<IEntityManager>().HasComponent<SharedCanBuildWindowOnTopComponent>(childEntity);
|
||||
// cables
|
||||
valid |= IoCManager.Resolve<IEntityManager>().HasComponent<CableComponent>(childEntity.Uid);
|
||||
valid |= IoCManager.Resolve<IEntityManager>().HasComponent<CableComponent>(childEntity);
|
||||
// anything else that might need this forced
|
||||
valid |= childEntity.HasTag("ForceFixRotations");
|
||||
// override
|
||||
@@ -96,9 +96,9 @@ namespace Content.Server.Construction.Commands
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(childEntity.Uid).LocalRotation != Angle.Zero)
|
||||
if (IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(childEntity).LocalRotation != Angle.Zero)
|
||||
{
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(childEntity.Uid).LocalRotation = Angle.Zero;
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(childEntity).LocalRotation = Angle.Zero;
|
||||
changed++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user