replace all uses of TryGetContainingContainer with non-obsolete overload (#30583)
* replace all uses of TryGetContainerContainer with non-obsolete overload * rerun
This commit is contained in:
@@ -30,7 +30,7 @@ public sealed class HideMechanismsCommand : LocalizedCommands
|
||||
sprite.ContainerOccluded = false;
|
||||
|
||||
var tempParent = uid;
|
||||
while (containerSys.TryGetContainingContainer(tempParent, out var container))
|
||||
while (containerSys.TryGetContainingContainer((tempParent, null, null), out var container))
|
||||
{
|
||||
if (!container.ShowContents)
|
||||
{
|
||||
|
||||
@@ -206,7 +206,7 @@ namespace Content.Client.Instruments.UI
|
||||
|
||||
var container = _entManager.System<SharedContainerSystem>();
|
||||
// If we're a handheld instrument, we might be in a container. Get it just in case.
|
||||
container.TryGetContainingContainer(Entity, out var conMan);
|
||||
container.TryGetContainingContainer((Entity, null, null), out var conMan);
|
||||
|
||||
// If the instrument is handheld and we're not holding it, we return.
|
||||
if (instrument.Handheld && (conMan == null || conMan.Owner != localEntity))
|
||||
|
||||
@@ -43,7 +43,7 @@ public sealed class ItemSystem : SharedItemSystem
|
||||
public override void VisualsChanged(EntityUid uid)
|
||||
{
|
||||
// if the item is in a container, it might be equipped to hands or inventory slots --> update visuals.
|
||||
if (Container.TryGetContainingContainer(uid, out var container))
|
||||
if (Container.TryGetContainingContainer((uid, null, null), out var container))
|
||||
RaiseLocalEvent(container.Owner, new VisualsChangedEvent(GetNetEntity(uid), container.ID));
|
||||
}
|
||||
|
||||
|
||||
@@ -64,15 +64,15 @@ public sealed class JetpackSystem : SharedJetpackSystem
|
||||
|
||||
private void CreateParticles(EntityUid uid)
|
||||
{
|
||||
var uidXform = Transform(uid);
|
||||
// Don't show particles unless the user is moving.
|
||||
if (Container.TryGetContainingContainer(uid, out var container) &&
|
||||
if (Container.TryGetContainingContainer((uid, uidXform, null), out var container) &&
|
||||
TryComp<PhysicsComponent>(container.Owner, out var body) &&
|
||||
body.LinearVelocity.LengthSquared() < 1f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var uidXform = Transform(uid);
|
||||
var coordinates = uidXform.Coordinates;
|
||||
var gridUid = _transform.GetGrid(coordinates);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user