2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Chemistry.Reagent;
|
2021-12-12 12:12:48 +13:00
|
|
|
using Content.Shared.Damage;
|
2021-11-03 16:48:03 -07:00
|
|
|
using Content.Shared.FixedPoint;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2021-10-07 13:01:27 +02:00
|
|
|
using Content.Shared.Tools.Components;
|
2020-05-11 15:26:07 +02:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-10-07 13:01:27 +02:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2020-05-11 15:26:07 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Tools.Components
|
2020-05-11 15:26:07 +02:00
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class WelderComponent : SharedWelderComponent
|
2020-05-11 15:26:07 +02:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-10-07 13:01:27 +02:00
|
|
|
/// Solution on the entity that contains the fuel.
|
2020-05-11 15:26:07 +02:00
|
|
|
/// </summary>
|
2021-10-07 13:01:27 +02:00
|
|
|
[DataField("fuelSolution")]
|
|
|
|
|
public string FuelSolution { get; } = "Welder";
|
2020-05-11 15:26:07 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
2021-10-07 13:01:27 +02:00
|
|
|
/// Reagent that will be used as fuel for welding.
|
2020-05-11 15:26:07 +02:00
|
|
|
/// </summary>
|
2021-10-07 13:01:27 +02:00
|
|
|
[DataField("fuelReagent", customTypeSerializer:typeof(PrototypeIdSerializer<ReagentPrototype>))]
|
|
|
|
|
public string FuelReagent { get; } = "WeldingFuel";
|
2020-05-11 15:26:07 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
2021-10-07 13:01:27 +02:00
|
|
|
/// Fuel consumption per second, while the welder is active.
|
2020-05-11 15:26:07 +02:00
|
|
|
/// </summary>
|
2021-10-07 13:01:27 +02:00
|
|
|
[DataField("fuelConsumption")]
|
2021-11-03 16:48:03 -07:00
|
|
|
public FixedPoint2 FuelConsumption { get; } = FixedPoint2.New(0.05f);
|
2020-05-11 15:26:07 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
2021-10-07 13:01:27 +02:00
|
|
|
/// A fuel amount to be consumed when the welder goes from being unlit to being lit.
|
2020-05-11 15:26:07 +02:00
|
|
|
/// </summary>
|
2021-10-07 13:01:27 +02:00
|
|
|
[DataField("welderOnConsume")]
|
2021-11-03 16:48:03 -07:00
|
|
|
public FixedPoint2 FuelLitCost { get; } = FixedPoint2.New(0.5f);
|
2020-08-14 18:03:52 +02:00
|
|
|
|
2021-10-07 13:01:27 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Sound played when the welder is turned off.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("welderOffSounds")]
|
|
|
|
|
public SoundSpecifier WelderOffSounds { get; } = new SoundCollectionSpecifier("WelderOff");
|
2021-02-03 14:05:31 +01:00
|
|
|
|
2021-10-07 13:01:27 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Sound played when the tool is turned on.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("welderOnSounds")]
|
|
|
|
|
public SoundSpecifier WelderOnSounds { get; } = new SoundCollectionSpecifier("WelderOn");
|
2021-07-10 17:35:33 +02:00
|
|
|
|
2021-10-07 13:01:27 +02:00
|
|
|
[DataField("welderRefill")]
|
|
|
|
|
public SoundSpecifier WelderRefill { get; } = new SoundPathSpecifier("/Audio/Effects/refill.ogg");
|
2021-12-12 12:12:48 +13:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// When the welder is lit, this damage is added to the base melee weapon damage.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// If this is a standard welder, this damage bonus should probably subtract the entity's standard melee weapon damage
|
2022-02-16 00:23:23 -07:00
|
|
|
/// and replace it all with heat damage.
|
2021-12-12 12:12:48 +13:00
|
|
|
/// </remarks>
|
|
|
|
|
[DataField("litMeleeDamageBonus")]
|
|
|
|
|
public DamageSpecifier LitMeleeDamageBonus = new();
|
2021-12-21 17:20:32 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether the item is safe to refill while lit without exploding the tank.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("tankSafe")]
|
|
|
|
|
public bool TankSafe = false; //I have no idea what I'm doing
|
|
|
|
|
|
2020-05-11 15:26:07 +02:00
|
|
|
}
|
|
|
|
|
}
|