Skip to content

Commit

Permalink
GeneratorSystem: no eject on empty
Browse files Browse the repository at this point in the history
  • Loading branch information
whatston3 committed Oct 20, 2024
1 parent c1de325 commit fca14a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Content.Server/Power/Generator/GeneratorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ private void SolidEmpty(EntityUid uid, SolidFuelGeneratorAdapterComponent compon
else
{
int materialAmount = _materialStorage.GetMaterialAmount(uid, component.FuelMaterial);
if (materialAmount <= 0) // No fuel? Job done.
return;
_materialStorage.TryChangeMaterialAmount(uid, component.FuelMaterial, -materialAmount);

var ejectedUid = Spawn(component.EjectedFuelProtoId, Transform(uid).Coordinates);
Expand Down

0 comments on commit fca14a9

Please sign in to comment.