Revert "Purge uses of TransformComponent.Anchored.set. Also adds parentheses." (#35332)
This commit is contained in:
@@ -189,7 +189,7 @@ public sealed partial class BlockingSystem : EntitySystem
|
||||
}
|
||||
|
||||
//Don't allow someone to block if they're somehow not anchored.
|
||||
_transformSystem.AnchorEntity((user, xform));
|
||||
_transformSystem.AnchorEntity(user, xform);
|
||||
if (!xform.Anchored)
|
||||
{
|
||||
CantBlockError(user);
|
||||
@@ -259,7 +259,7 @@ public sealed partial class BlockingSystem : EntitySystem
|
||||
&& TryComp<PhysicsComponent>(user, out var physicsComponent))
|
||||
{
|
||||
if (xform.Anchored)
|
||||
_transformSystem.Unanchor((user, xform));
|
||||
_transformSystem.Unanchor(user, xform);
|
||||
|
||||
_actionsSystem.SetToggled(component.BlockingToggleActionEntity, false);
|
||||
_fixtureSystem.DestroyFixture(user, BlockingComponent.BlockFixtureID, body: physicsComponent);
|
||||
|
||||
@@ -114,7 +114,7 @@ public sealed partial class AnchorableSystem : EntitySystem
|
||||
var xform = Transform(uid);
|
||||
|
||||
RaiseLocalEvent(uid, new BeforeUnanchoredEvent(args.User, used));
|
||||
_transformSystem.Unanchor((uid, xform));
|
||||
_transformSystem.Unanchor(uid, xform);
|
||||
RaiseLocalEvent(uid, new UserUnanchoredEvent(args.User, used));
|
||||
|
||||
_popup.PopupClient(Loc.GetString("anchorable-unanchored"), uid, args.User);
|
||||
@@ -165,7 +165,7 @@ public sealed partial class AnchorableSystem : EntitySystem
|
||||
RaiseLocalEvent(uid, new BeforeAnchoredEvent(args.User, used));
|
||||
|
||||
if (!xform.Anchored)
|
||||
_transformSystem.AnchorEntity((uid, xform));
|
||||
_transformSystem.AnchorEntity(uid, xform);
|
||||
|
||||
RaiseLocalEvent(uid, new UserAnchoredEvent(args.User, used));
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Content.Shared.Construction
|
||||
{
|
||||
public abstract class SharedConstructionSystem : EntitySystem
|
||||
{
|
||||
[Dependency] protected readonly IMapManager MapManager = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] protected readonly IPrototypeManager PrototypeManager = default!;
|
||||
[Dependency] protected readonly SharedTransformSystem TransformSystem = default!;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Content.Shared.Construction
|
||||
if (!canBuildInImpassable)
|
||||
return null;
|
||||
|
||||
if (!MapManager.TryFindGridAt(coords, out _, out var grid))
|
||||
if (!_mapManager.TryFindGridAt(coords, out _, out var grid))
|
||||
return null;
|
||||
|
||||
var ignored = grid.GetAnchoredEntities(coords).ToHashSet();
|
||||
|
||||
@@ -546,7 +546,7 @@ public abstract class SharedMagicSystem : EntitySystem
|
||||
var xform = Transform(ev.Target);
|
||||
var fixture = fixtures.Fixtures.First();
|
||||
|
||||
_transform.Unanchor((ev.Target, xform));
|
||||
_transform.Unanchor(ev.Target);
|
||||
_physics.SetCanCollide(ev.Target, true, true, false, fixtures, physics);
|
||||
_physics.SetCollisionMask(ev.Target, fixture.Key, fixture.Value, (int)CollisionGroup.FlyingMobMask, fixtures, physics);
|
||||
_physics.SetCollisionLayer(ev.Target, fixture.Key, fixture.Value, (int)CollisionGroup.FlyingMobLayer, fixtures, physics);
|
||||
|
||||
@@ -146,7 +146,7 @@ public abstract class SharedChameleonProjectorSystem : EntitySystem
|
||||
|
||||
var xform = Transform(uid);
|
||||
if (xform.Anchored)
|
||||
_xform.Unanchor((uid, xform));
|
||||
_xform.Unanchor(uid, xform);
|
||||
else
|
||||
_xform.AnchorEntity((uid, xform));
|
||||
|
||||
@@ -241,7 +241,7 @@ public abstract class SharedChameleonProjectorSystem : EntitySystem
|
||||
|
||||
var xform = Transform(ent);
|
||||
xform.NoLocalRotation = false;
|
||||
_xform.Unanchor((ent, xform));
|
||||
_xform.Unanchor(ent, xform);
|
||||
|
||||
Del(ent.Comp.Disguise);
|
||||
RemComp<ChameleonDisguisedComponent>(ent);
|
||||
|
||||
@@ -43,13 +43,13 @@ public sealed class DeployableBarrierSystem : EntitySystem
|
||||
|
||||
if (isDeployed && transform.GridUid != null)
|
||||
{
|
||||
_transform.AnchorEntity((uid, transform));
|
||||
_transform.AnchorEntity(uid, transform);
|
||||
if (fixture != null)
|
||||
_physics.SetHard(uid, fixture, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_transform.Unanchor((uid, transform));
|
||||
_transform.Unanchor(uid, transform);
|
||||
if (fixture != null)
|
||||
_physics.SetHard(uid, fixture, false);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public sealed class MeleeThrowOnHitSystem : EntitySystem
|
||||
|
||||
if (comp.UnanchorOnHit && HasComp<AnchorableComponent>(hit))
|
||||
{
|
||||
_transform.Unanchor((hit, Transform(hit)));
|
||||
_transform.Unanchor(hit, Transform(hit));
|
||||
}
|
||||
|
||||
RemComp<MeleeThrownComponent>(hit);
|
||||
|
||||
@@ -207,7 +207,7 @@ public abstract partial class SharedTetherGunSystem : EntitySystem
|
||||
_appearance.SetData(gunUid, ToggleableLightVisuals.Enabled, true, appearance);
|
||||
|
||||
// Target updates
|
||||
TransformSystem.Unanchor((target, targetXform));
|
||||
TransformSystem.Unanchor(target, targetXform);
|
||||
component.Tethered = target;
|
||||
var tethered = EnsureComp<TetheredComponent>(target);
|
||||
_physics.SetBodyStatus(target, targetPhysics, BodyStatus.InAir, false);
|
||||
|
||||
Reference in New Issue
Block a user