Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
GeneratorSystem: no eject on empty (new-frontiers-14#2291)
Browse files Browse the repository at this point in the history
  • Loading branch information
whatston3 authored Oct 20, 2024
1 parent b9293e7 commit 497231e
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 497231e

Please sign in to comment.