Make printing from ore procecssors slightly more bearable (#31074)

* Make printing from ore procecssors slightly more bearable

* Update sheet.yml
This commit is contained in:
Nemanja
2024-08-17 01:12:55 -04:00
committed by GitHub
parent 7562b8fd47
commit ada6455b17
6 changed files with 118 additions and 42 deletions

View File

@@ -197,11 +197,11 @@ namespace Content.Server.Lathe
var recipe = component.Queue.First();
component.Queue.RemoveAt(0);
var time = _reagentSpeed.ApplySpeed(uid, recipe.CompleteTime);
var time = _reagentSpeed.ApplySpeed(uid, recipe.CompleteTime) * component.TimeMultiplier;
var lathe = EnsureComp<LatheProducingComponent>(uid);
lathe.StartTime = _timing.CurTime;
lathe.ProductionLength = time * component.TimeMultiplier;
lathe.ProductionLength = time;
component.CurrentRecipe = recipe;
var ev = new LatheStartPrintingEvent(recipe);
@@ -210,6 +210,11 @@ namespace Content.Server.Lathe
_audio.PlayPvs(component.ProducingSound, uid);
UpdateRunningAppearance(uid, true);
UpdateUserInterfaceState(uid, component);
if (time == TimeSpan.Zero)
{
FinishProducing(uid, component, lathe);
}
return true;
}