welder stuff (#17476)

This commit is contained in:
deltanedas
2023-06-28 01:46:48 +00:00
committed by GitHub
parent 689aa5344e
commit f9c97e4324
16 changed files with 127 additions and 166 deletions

View File

@@ -16,9 +16,6 @@ namespace Content.Server.Construction.Components
[DataField("refineTime")]
public float RefineTime = 2f;
[DataField("refineFuel")]
public float RefineFuel = 0f;
[DataField("qualityNeeded", customTypeSerializer:typeof(PrototypeIdSerializer<ToolQualityPrototype>))]
public string QualityNeeded = "Welding";
}

View File

@@ -347,7 +347,6 @@ namespace Content.Server.Construction
if (validation)
{
// Then we only really need to check whether the tool entity has that quality or not.
// TODO fuel consumption?
return _toolSystem.HasQuality(interactUsing.Used, toolInsertStep.Tool)
? HandleResult.Validated
: HandleResult.False;
@@ -364,8 +363,7 @@ namespace Content.Server.Construction
TimeSpan.FromSeconds(toolInsertStep.DoAfter),
new [] { toolInsertStep.Tool },
new ConstructionInteractDoAfterEvent(interactUsing),
out var doAfter,
fuel: toolInsertStep.Fuel);
out var doAfter);
return result && doAfter != null ? HandleResult.DoAfter : HandleResult.False;
}

View File

@@ -25,7 +25,7 @@ namespace Content.Server.Construction
if (args.Handled)
return;
args.Handled = _toolSystem.UseTool(args.Used, args.User, uid, component.RefineTime, component.QualityNeeded, new WelderRefineDoAfterEvent(), component.RefineFuel);
args.Handled = _toolSystem.UseTool(args.Used, args.User, uid, component.RefineTime, component.QualityNeeded, new WelderRefineDoAfterEvent());
}
private void OnDoAfter(EntityUid uid, WelderRefinableComponent component, WelderRefineDoAfterEvent args)