using Content.Shared.Chemistry.Reagent; using Content.Shared.FixedPoint; using Content.Shared.Tools.Systems; using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared.Tools.Components; /// /// Handles fuel consumption for the tool and allows it to explode welding fuel tanks. /// /// /// TODO: De-hardcode welder bombing. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true), AutoGenerateComponentPause] [Access(typeof(SharedToolSystem))] public sealed partial class WelderComponent : Component { /// /// Is the welder currently enabled? /// [DataField, AutoNetworkedField] public bool Enabled; /// /// Timestamp for the next update loop update. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoNetworkedField, AutoPausedField] public TimeSpan NextUpdate; /// /// Delay between updates. /// [DataField] public TimeSpan WelderUpdateTimer = TimeSpan.FromSeconds(1); /// /// Name of the fuel solution. /// [DataField] public string FuelSolutionName = "Welder"; /// /// Reagent that will be used as fuel for welding. /// [DataField] public ProtoId FuelReagent = "WeldingFuel"; /// /// Fuel consumption per second while the welder is active. /// In u/s /// [DataField, AutoNetworkedField] public FixedPoint2 FuelConsumption = FixedPoint2.New(1.0f); /// /// A fuel amount to be consumed when the welder goes from being unlit to being lit. /// [DataField, AutoNetworkedField] public FixedPoint2 FuelLitCost = FixedPoint2.New(0.5f); /// /// Sound played when refilling the welder. /// [DataField] public SoundSpecifier WelderRefill = new SoundPathSpecifier("/Audio/Effects/refill.ogg"); /// /// Whether the item is safe to refill while lit without exploding the tank. /// [DataField] public bool TankSafe; }