mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* tool added * comments and fixes * final fix * chore: automatically update REUSE headers * final fix * chore: automatically update REUSE headers * fix localization * fix * chore: automatically update REUSE headers * fixed the comment location * test fix * fix * chore: automatically update REUSE headers * not syndicate anymore * Update Content.Server/Repairable/RepairableSystem.cs sure Co-authored-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> * nesting fixed --------- Co-authored-by: Vanessa Louwagie <vanessalouwagie@outlook.com> Co-authored-by: monolith8319 <195513600+monolith8319@users.noreply.github.com> Co-authored-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com>
83 lines
2.4 KiB
C#
83 lines
2.4 KiB
C#
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;
|
|
|
|
/// <summary>
|
|
/// Handles fuel consumption for the tool and allows it to explode welding fuel tanks.
|
|
/// </summary>
|
|
/// <summary>
|
|
/// TODO: De-hardcode welder bombing.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true), AutoGenerateComponentPause]
|
|
[Access(typeof(SharedToolSystem))]
|
|
public sealed partial class WelderComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Is the welder currently enabled?
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool Enabled;
|
|
|
|
/// <summary>
|
|
/// Timestamp for the next update loop update.
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
|
[AutoNetworkedField, AutoPausedField]
|
|
public TimeSpan NextUpdate;
|
|
|
|
/// <summary>
|
|
/// Delay between updates.
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan WelderUpdateTimer = TimeSpan.FromSeconds(1);
|
|
|
|
/// <summary>
|
|
/// Name of the fuel solution.
|
|
/// </summary>
|
|
[DataField]
|
|
public string FuelSolutionName = "Welder";
|
|
|
|
/// <summary>
|
|
/// Reagent that will be used as fuel for welding.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<ReagentPrototype> FuelReagent = "WeldingFuel";
|
|
|
|
/// <summary>
|
|
/// Fuel consumption per second while the welder is active.
|
|
/// In u/s
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public FixedPoint2 FuelConsumption = FixedPoint2.New(1.0f);
|
|
|
|
/// <summary>
|
|
/// A fuel amount to be consumed when the welder goes from being unlit to being lit.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public FixedPoint2 FuelLitCost = FixedPoint2.New(0.5f);
|
|
|
|
/// <summary>
|
|
/// Sound played when refilling the welder.
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier WelderRefill = new SoundPathSpecifier("/Audio/Effects/refill.ogg");
|
|
|
|
/// <summary>
|
|
/// Whether the item is safe to refill while lit without exploding the tank.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool TankSafe;
|
|
|
|
/// <summary>
|
|
/// Monolith - This variable gets rid of the status display.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool OnlyDisplayFuel = false;
|
|
}
|