Revert "Remove most usages of obsolete TransformComponent methods (#1… (#19714)
This commit is contained in:
@@ -10,7 +10,6 @@ public sealed class RehydratableSystem : EntitySystem
|
||||
[Dependency] private readonly SharedPopupSystem _popups = default!;
|
||||
[Dependency] private readonly SolutionContainerSystem _solutions = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -37,7 +36,7 @@ public sealed class RehydratableSystem : EntitySystem
|
||||
|
||||
var target = Spawn(randomMob, Transform(uid).Coordinates);
|
||||
|
||||
_transform.AttachToGridOrMap(target);
|
||||
Transform(target).AttachToGridOrMap();
|
||||
var ev = new GotRehydratedEvent(target);
|
||||
RaiseLocalEvent(uid, ref ev);
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
|
||||
[Dependency] private readonly ThrowingSystem _throwing = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
|
||||
private const float ReactTime = 0.125f;
|
||||
|
||||
@@ -70,7 +69,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
|
||||
_throwing.TryThrow(vapor.Owner, dir, speed, user: user, pushbackRatio: ThrowingSystem.PushbackDefault * 10f);
|
||||
|
||||
var distance = (target.Position - _transform.GetWorldPosition(vaporXform)).Length();
|
||||
var distance = (target.Position - vaporXform.WorldPosition).Length();
|
||||
var time = (distance / physics.LinearVelocity.Length());
|
||||
despawn.Lifetime = MathF.Min(aliveTime, time);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user