ninja 2 electric boogaloo (#15534)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
38
Content.Shared/Ninja/Components/BatteryDrainerComponent.cs
Normal file
38
Content.Shared/Ninja/Components/BatteryDrainerComponent.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Content.Shared.Ninja.Systems;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Shared.Ninja.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Component for draining power from APCs/substations/SMESes, when ProviderUid is set to a battery cell.
|
||||
/// Does not rely on relay, simply being on the user and having BatteryUid set is enough.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(SharedBatteryDrainerSystem))]
|
||||
public sealed partial class BatteryDrainerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The powercell entity to drain power into.
|
||||
/// Determines whether draining is possible.
|
||||
/// </summary>
|
||||
[DataField("batteryUid"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public EntityUid? BatteryUid;
|
||||
|
||||
/// <summary>
|
||||
/// Conversion rate between joules in a device and joules added to battery.
|
||||
/// Should be very low since powercells store nothing compared to even an APC.
|
||||
/// </summary>
|
||||
[DataField("drainEfficiency"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float DrainEfficiency = 0.001f;
|
||||
|
||||
/// <summary>
|
||||
/// Time that the do after takes to drain charge from a battery, in seconds
|
||||
/// </summary>
|
||||
[DataField("drainTime"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float DrainTime = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Sound played after the doafter ends.
|
||||
/// </summary>
|
||||
[DataField("sparkSound")]
|
||||
public SoundSpecifier SparkSound = new SoundCollectionSpecifier("sparks");
|
||||
}
|
||||
Reference in New Issue
Block a user