make lube speed up lathes (#25515)
* add LatheGetSpeedEvent * add LatheLube system * make typical lathes accept lube * spill * :trollface: * rework to generic ReagentSpeedSystem * hyperlathe ops --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
34
Content.Shared/ReagentSpeed/ReagentSpeedComponent.cs
Normal file
34
Content.Shared/ReagentSpeed/ReagentSpeedComponent.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.ReagentSpeed;
|
||||
|
||||
/// <summary>
|
||||
/// Makes a device work faster by consuming reagents on each use.
|
||||
/// Other systems must use <see cref="ReagentSpeedSystem.ApplySpeed"/> for this to do anything.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(ReagentSpeedSystem))]
|
||||
public sealed partial class ReagentSpeedComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Solution that will be checked.
|
||||
/// Anything that isn't in <c>Modifiers</c> is left alone.
|
||||
/// </summary>
|
||||
[DataField(required: true)]
|
||||
public string Solution = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// How much reagent from the solution to use up for each use.
|
||||
/// This is per-modifier-reagent and not shared between them.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public FixedPoint2 Cost = 5;
|
||||
|
||||
/// <summary>
|
||||
/// Reagents and how much they modify speed at full purity.
|
||||
/// Small number means faster large number means slower.
|
||||
/// </summary>
|
||||
[DataField(required: true)]
|
||||
public Dictionary<ProtoId<ReagentPrototype>, float> Modifiers = new();
|
||||
}
|
||||
Reference in New Issue
Block a user