Closed Plykiya closed 1 month ago
I was able to replicate the issue like this:
I digged some more and found that inside TegSystem
:
the code that updates power is inside GeneratorUpdate
private void GeneratorUpdate(EntityUid uid, TegGeneratorComponent component, ref AtmosDeviceUpdateEvent args)
{
var tegGroup = GetNodeGroup(uid);
if (tegGroup is not { IsFullyBuilt: true })
return;
var supplier = Comp<PowerSupplierComponent>(uid);
var powerReceiver = Comp<ApcPowerReceiverComponent>(uid);
if (!powerReceiver.Powered)
{
supplier.MaxSupply = 0;
return;
}
a bugged half built TEG will hit the first return (as it should on most cases) but then because of it never reaches the second check to update power
replacing the order of the checks seems to fix things on my end
Description
It stays at the value it was generating before being destroyed.
Reproduction
Screenshots
Additional context