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:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user