Fix TEG acting as infinite energy source on destruction (#29972)
* TEG now checks for power supply before checking for IsFullyBuilt * Update Content.Server/Power/Generation/Teg/TegSystem.cs Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
This commit is contained in:
@@ -102,10 +102,6 @@ public sealed class TegSystem : EntitySystem
|
||||
|
||||
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)
|
||||
@@ -114,6 +110,10 @@ public sealed class TegSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
var tegGroup = GetNodeGroup(uid);
|
||||
if (tegGroup is not { IsFullyBuilt: true })
|
||||
return;
|
||||
|
||||
var circA = tegGroup.CirculatorA!.Owner;
|
||||
var circB = tegGroup.CirculatorB!.Owner;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user