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:
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Atmos;
|
using Content.Server.GameObjects.Components.Atmos;
|
||||||
using Content.Server.GameObjects.Components.GUI;
|
using Content.Server.GameObjects.Components.GUI;
|
||||||
@@ -38,7 +38,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
internal sealed class HandheldLightComponent : SharedHandheldLightComponent, IUse, IExamine, IInteractUsing
|
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!;
|
[ViewVariables] private PowerCellSlotComponent _cellSlot = default!;
|
||||||
private PowerCellComponent? Cell => _cellSlot.Cell;
|
private PowerCellComponent? Cell => _cellSlot.Cell;
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
public override void ExposeData(ObjectSerializer serializer)
|
public override void ExposeData(ObjectSerializer serializer)
|
||||||
{
|
{
|
||||||
base.ExposeData(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 TurnOnSound, "turnOnSound", "/Audio/Items/flashlight_toggle.ogg");
|
||||||
serializer.DataField(ref TurnOnFailSound, "turnOnFailSound", "/Audio/Machines/button.ogg");
|
serializer.DataField(ref TurnOnFailSound, "turnOnFailSound", "/Audio/Machines/button.ogg");
|
||||||
serializer.DataField(ref TurnOffSound, "turnOffSound", "/Audio/Items/flashlight_toggle.ogg");
|
serializer.DataField(ref TurnOffSound, "turnOffSound", "/Audio/Items/flashlight_toggle.ogg");
|
||||||
|
|||||||
Reference in New Issue
Block a user