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:
slarticodefast
2024-08-04 07:38:53 +02:00
committed by GitHub
parent 206495fd6d
commit bb2981400c
24 changed files with 40 additions and 40 deletions

View File

@@ -64,11 +64,11 @@ public sealed partial class PowerCellSystem : SharedPowerCellSystem
}
var frac = args.Charge / args.MaxCharge;
var level = (byte) ContentHelpers.RoundToNearestLevels(frac, 1, PowerCellComponent.PowerCellVisualsLevels);
var level = (byte)ContentHelpers.RoundToNearestLevels(frac, 1, PowerCellComponent.PowerCellVisualsLevels);
_sharedAppearanceSystem.SetData(uid, PowerCellVisuals.ChargeLevel, level);
// If this power cell is inside a cell-slot, inform that entity that the power has changed (for updating visuals n such).
if (_containerSystem.TryGetContainingContainer(uid, out var container)
if (_containerSystem.TryGetContainingContainer((uid, null, null), out var container)
&& TryComp(container.Owner, out PowerCellSlotComponent? slot)
&& _itemSlotsSystem.TryGetSlot(container.Owner, slot.CellSlotId, out var itemSlot))
{