add fuel costs back to finishing welding (#27030)

* add fuel costs back to welding

* ack

* meh

* eek!
This commit is contained in:
Nemanja
2024-04-19 19:20:30 -04:00
committed by GitHub
parent 299da35c87
commit a47c5561a9
26 changed files with 403 additions and 466 deletions

View File

@@ -1,11 +1,8 @@
using Content.Server.Construction.Components;
using Content.Server.Stack;
using Content.Shared.Construction;
using Content.Shared.DoAfter;
using Content.Shared.Interaction;
using Content.Shared.Stacks;
using Content.Shared.Tools;
using Robust.Shared.Serialization;
using SharedToolSystem = Content.Shared.Tools.Systems.SharedToolSystem;
namespace Content.Server.Construction
@@ -26,7 +23,7 @@ namespace Content.Server.Construction
if (args.Handled)
return;
args.Handled = _toolSystem.UseTool(args.Used, args.User, uid, component.RefineTime, component.QualityNeeded, new WelderRefineDoAfterEvent());
args.Handled = _toolSystem.UseTool(args.Used, args.User, uid, component.RefineTime, component.QualityNeeded, new WelderRefineDoAfterEvent(), fuel: component.RefineFuel);
}
private void OnDoAfter(EntityUid uid, WelderRefinableComponent component, WelderRefineDoAfterEvent args)
@@ -41,7 +38,7 @@ namespace Content.Server.Construction
// spawn each result after refine
foreach (var result in component.RefineResult!)
{
var droppedEnt = EntityManager.SpawnEntity(result, resultPosition);
var droppedEnt = Spawn(result, resultPosition);
// TODO: If something has a stack... Just use a prototype with a single thing in the stack.
// This is not a good way to do it.