HandheldLights no longer drain their batteries in 20 seconds. (#2942)

* Initial

* Update Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Swept
2021-01-07 10:35:39 +00:00
committed by GitHub
parent 8e926db8e7
commit 6eeaa58988

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System.Threading.Tasks;
using Content.Server.GameObjects.Components.Atmos;
using Content.Server.GameObjects.Components.GUI;
@@ -38,7 +38,7 @@ namespace Content.Server.GameObjects.Components.Interactable
[RegisterComponent]
internal sealed class HandheldLightComponent : SharedHandheldLightComponent, IUse, IExamine, IInteractUsing
{
[ViewVariables(VVAccess.ReadWrite)] public float Wattage { get; set; } = 10f;
[ViewVariables(VVAccess.ReadWrite)] public float Wattage { get; set; }
[ViewVariables] private PowerCellSlotComponent _cellSlot = default!;
private PowerCellComponent? Cell => _cellSlot.Cell;
@@ -64,7 +64,7 @@ namespace Content.Server.GameObjects.Components.Interactable
public override void ExposeData(ObjectSerializer serializer)
{
base.ExposeData(serializer);
serializer.DataField(this, x => x.Wattage, "wattage", 10f);
serializer.DataField(this, x => x.Wattage, "wattage", 3f);
serializer.DataField(ref TurnOnSound, "turnOnSound", "/Audio/Items/flashlight_toggle.ogg");
serializer.DataField(ref TurnOnFailSound, "turnOnFailSound", "/Audio/Machines/button.ogg");
serializer.DataField(ref TurnOffSound, "turnOffSound", "/Audio/Items/flashlight_toggle.ogg");