From: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
Date: Wed, 21 Jan 2026 04:05:44 +0000 (-0800)
Subject: Power Consumers Rebalance: Simple Dynamic Power Loading (#41961)
X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=1b1cb64d24e244b804a8c908256f1f06c7ff4056;p=space-station-14.git
Power Consumers Rebalance: Simple Dynamic Power Loading (#41961)
* initial commit
* misc additions and fixes
* final tests and additions
* cleanup 1
* fix tests and add a test
* fix tests AGAIN
* abject horror and misery
* cleanup
* cleanup 2
* address some issues
---
diff --git a/Content.Client/Power/EntitySystems/PowerStateSystem.cs b/Content.Client/Power/EntitySystems/PowerStateSystem.cs
new file mode 100644
index 0000000000..b17f1746c2
--- /dev/null
+++ b/Content.Client/Power/EntitySystems/PowerStateSystem.cs
@@ -0,0 +1,6 @@
+using Content.Shared.Power.EntitySystems;
+
+namespace Content.Client.Power.EntitySystems;
+
+///
+public sealed class PowerStateSystem : SharedPowerStateSystem;
diff --git a/Content.IntegrationTests/Tests/Power/PowerStatePrototypeTest.cs b/Content.IntegrationTests/Tests/Power/PowerStatePrototypeTest.cs
new file mode 100644
index 0000000000..288e976e9b
--- /dev/null
+++ b/Content.IntegrationTests/Tests/Power/PowerStatePrototypeTest.cs
@@ -0,0 +1,59 @@
+using System.Linq;
+using Content.Server.Power.Components;
+using Content.Shared.Power.Components;
+using Content.Shared.Power.EntitySystems;
+using Robust.Shared.GameObjects;
+using Robust.Shared.Prototypes;
+
+namespace Content.IntegrationTests.Tests.Power;
+
+[TestFixture, TestOf(typeof(SharedPowerStateSystem))]
+public sealed class PowerStatePrototypeTest
+{
+ ///
+ /// Asserts that the 's load is the same
+ /// as the idle or working power draw from ,
+ /// depending on the current power state.
+ ///
+ [Test]
+ public async Task AssertApcPowerMatchesPowerState()
+ {
+ await using var pair = await PoolManager.GetServerClient();
+ var server = pair.Server;
+
+ var protoMan = server.ResolveDependency();
+ var entMan = server.ResolveDependency();
+
+ await server.WaitAssertion(() =>
+ {
+ Assert.Multiple(delegate
+ {
+ foreach (var prototype in protoMan.EnumeratePrototypes()
+ .Where(p => !p.Abstract)
+ .Where(p => !pair.IsTestPrototype(p)))
+ {
+ if (!prototype.TryGetComponent(out var powerStateComp, entMan.ComponentFactory))
+ continue;
+
+ // LESSON LEARNED:
+ // ENSURE THAT THE COMPONENT YOU ARE TRYING TO GET IS THE SERVER-SIDE VARIANT
+ if (!prototype.TryGetComponent(out var powerReceiverComp, entMan.ComponentFactory))
+ {
+ Assert.Fail(
+ $"Entity prototype '{prototype.ID}' has a PowerStateComponent but is missing the required ApcPowerReceiverComponent.");
+ }
+
+ var expectedLoad = powerStateComp.IsWorking
+ ? powerStateComp.WorkingPowerDraw
+ : powerStateComp.IdlePowerDraw;
+
+ Assert.That(powerReceiverComp.Load,
+ Is.EqualTo(expectedLoad),
+ $"Entity prototype '{prototype.ID}' has mismatched power draw between PowerStateComponent and SharedApcPowerReceiverComponent.");
+ }
+ });
+ });
+
+ await pair.CleanReturnAsync();
+ }
+}
diff --git a/Content.IntegrationTests/Tests/Power/PowerStateTest.cs b/Content.IntegrationTests/Tests/Power/PowerStateTest.cs
index dec398212d..edec6f3d21 100644
--- a/Content.IntegrationTests/Tests/Power/PowerStateTest.cs
+++ b/Content.IntegrationTests/Tests/Power/PowerStateTest.cs
@@ -56,7 +56,7 @@ public sealed class PowerStateTest
Assert.That(receiver.Load, Is.EqualTo(powerState.IdlePowerDraw).Within(0.01f));
});
- var system = entManager.System();
+ var system = entManager.System();
system.SetWorkingState((ent, powerState), true);
Assert.Multiple(() =>
@@ -93,7 +93,7 @@ public sealed class PowerStateTest
var receiver = entManager.GetComponent(ent);
var powerState = entManager.GetComponent(ent);
- var system = entManager.System();
+ var system = entManager.System();
Entity newEnt = (ent, powerState);
Assert.Multiple(() =>
@@ -146,7 +146,7 @@ public sealed class PowerStateTest
var receiver = entManager.GetComponent(ent);
var powerState = entManager.GetComponent(ent);
- var system = entManager.System();
+ var system = entManager.System();
Entity valueTuple = (ent, powerState);
Assert.Multiple(() =>
diff --git a/Content.Server/Holopad/HolopadSystem.cs b/Content.Server/Holopad/HolopadSystem.cs
index c634d14f2f..c2aaf827da 100644
--- a/Content.Server/Holopad/HolopadSystem.cs
+++ b/Content.Server/Holopad/HolopadSystem.cs
@@ -23,6 +23,7 @@ using Robust.Shared.Containers;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using System.Linq;
+using Content.Shared.Power.EntitySystems;
namespace Content.Server.Holopad;
@@ -40,6 +41,7 @@ public sealed class HolopadSystem : SharedHolopadSystem
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly PvsOverrideSystem _pvs = default!;
+ [Dependency] private readonly SharedPowerStateSystem _powerState = default!;
private float _updateTimer = 1.0f;
private const float UpdateTime = 1.0f;
@@ -548,10 +550,14 @@ public sealed class HolopadSystem : SharedHolopadSystem
{
_telephoneSystem.SetSpeakerForTelephone((entity, entityTelephone), (hologramUid, hologramSpeech));
}
+
+ _powerState.SetWorkingState(entity.Owner, true);
}
private void DeleteHologram(Entity hologram, Entity attachedHolopad)
{
+ _powerState.SetWorkingState(attachedHolopad.Owner, false);
+
attachedHolopad.Comp.Hologram = null;
QueueDel(hologram);
diff --git a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs
index 6f3d393209..d1df5177d1 100644
--- a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs
+++ b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs
@@ -37,6 +37,7 @@ using Content.Shared.Stacks;
using Content.Server.Construction.Components;
using Content.Shared.Chat;
using Content.Shared.Damage.Components;
+using Content.Shared.Power.EntitySystems;
using Content.Shared.Temperature.Components;
namespace Content.Server.Kitchen.EntitySystems
@@ -64,6 +65,7 @@ namespace Content.Server.Kitchen.EntitySystems
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly SharedSuicideSystem _suicide = default!;
+ [Dependency] private readonly SharedPowerStateSystem _powerState = default!;
private static readonly EntProtoId MalfunctionSpark = "Spark";
@@ -112,6 +114,7 @@ namespace Content.Server.Kitchen.EntitySystems
microwaveComponent.PlayingStream =
_audio.PlayPvs(microwaveComponent.LoopingSound, ent, AudioParams.Default.WithLoop(true).WithMaxDistance(5))?.Entity;
+ _powerState.SetWorkingState(ent.Owner, true);
}
private void OnCookStop(Entity ent, ref ComponentShutdown args)
@@ -121,6 +124,7 @@ namespace Content.Server.Kitchen.EntitySystems
SetAppearance(ent.Owner, MicrowaveVisualState.Idle, microwaveComponent);
microwaveComponent.PlayingStream = _audio.Stop(microwaveComponent.PlayingStream);
+ _powerState.SetWorkingState(ent.Owner, false);
}
private void OnActiveMicrowaveInsert(Entity ent, ref EntInsertedIntoContainerMessage args)
diff --git a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs
index a709f4b8d9..bf9e4e1434 100644
--- a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs
+++ b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs
@@ -22,6 +22,7 @@ using Content.Server.Jittering;
using Content.Shared.Jittering;
using Content.Shared.Kitchen.EntitySystems;
using Content.Shared.Power;
+using Content.Shared.Power.EntitySystems;
namespace Content.Server.Kitchen.EntitySystems
{
@@ -40,6 +41,7 @@ namespace Content.Server.Kitchen.EntitySystems
[Dependency] private readonly SharedDestructibleSystem _destructible = default!;
[Dependency] private readonly RandomHelperSystem _randomHelper = default!;
[Dependency] private readonly JitteringSystem _jitter = default!;
+ [Dependency] private readonly SharedPowerStateSystem _powerState = default!;
public override void Initialize()
{
@@ -136,11 +138,15 @@ namespace Content.Server.Kitchen.EntitySystems
private void OnActiveGrinderStart(Entity ent, ref ComponentStartup args)
{
_jitter.AddJitter(ent, -10, 100);
+
+ // Not all grinders need power.
+ _powerState.TrySetWorkingState(ent.Owner, true);
}
private void OnActiveGrinderRemove(Entity ent, ref ComponentRemove args)
{
RemComp(ent);
+ _powerState.TrySetWorkingState(ent.Owner, false);
}
private void OnEntRemoveAttempt(Entity entity, ref ContainerIsRemovingAttemptEvent args)
diff --git a/Content.Server/Lathe/LatheProducingSystem.cs b/Content.Server/Lathe/LatheProducingSystem.cs
new file mode 100644
index 0000000000..ce81ed66e0
--- /dev/null
+++ b/Content.Server/Lathe/LatheProducingSystem.cs
@@ -0,0 +1,34 @@
+using Content.Server.Lathe.Components;
+using Content.Shared.Power.EntitySystems;
+
+namespace Content.Server.Lathe;
+
+///
+/// System for handling lathes that are actively producing items.
+/// The component is used more so as a marker for EntityQueryEnumerator,
+/// however it's also used to set the power state of the lathe when producing.
+///
+public sealed class LatheProducingSystem : EntitySystem
+{
+ [Dependency] private readonly SharedPowerStateSystem _powerState = default!;
+
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ SubscribeLocalEvent(OnComponentStartup);
+ SubscribeLocalEvent(OnComponentShutdown);
+ }
+
+ private void OnComponentShutdown(Entity ent, ref ComponentShutdown args)
+ {
+ // use the Try variant of this here
+ // or else you get trolled by AllComponentsOneToOneDeleteTest
+ _powerState.TrySetWorkingState(ent.Owner, false);
+ }
+
+ private void OnComponentStartup(Entity ent, ref ComponentStartup args)
+ {
+ _powerState.TrySetWorkingState(ent.Owner, true);
+ }
+}
diff --git a/Content.Server/Power/EntitySystems/PowerStateSystem.cs b/Content.Server/Power/EntitySystems/PowerStateSystem.cs
new file mode 100644
index 0000000000..92c103bf8a
--- /dev/null
+++ b/Content.Server/Power/EntitySystems/PowerStateSystem.cs
@@ -0,0 +1,21 @@
+using Content.Server.Power.Components;
+using Content.Shared.Power.Components;
+using Content.Shared.Power.EntitySystems;
+
+namespace Content.Server.Power.EntitySystems;
+
+public sealed class PowerStateSystem : SharedPowerStateSystem
+{
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ SubscribeLocalEvent(OnComponentStartup);
+ }
+
+ private void OnComponentStartup(Entity ent, ref ComponentStartup args)
+ {
+ EnsureComp(ent);
+ SetWorkingState(ent.Owner, ent.Comp.IsWorking);
+ }
+}
diff --git a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs
index c8e8e89ce5..3128623fc3 100644
--- a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs
+++ b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs
@@ -2,6 +2,7 @@ using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Interaction;
using Content.Shared.Popups;
+using Content.Shared.Power.EntitySystems;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
using Robust.Shared.Network;
@@ -21,6 +22,7 @@ public abstract class SharedSolutionContainerMixerSystem : EntitySystem
[Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solution = default!;
+ [Dependency] private readonly SharedPowerStateSystem _powerState = default!;
///
public override void Initialize()
@@ -74,6 +76,7 @@ public abstract class SharedSolutionContainerMixerSystem : EntitySystem
comp.MixingSoundEntity = _audio.PlayPvs(comp.MixingSound, entity, comp.MixingSound?.Params.WithLoop(true));
comp.MixTimeEnd = _timing.CurTime + comp.MixDuration;
_appearance.SetData(entity, SolutionContainerMixerVisuals.Mixing, true);
+ _powerState.SetWorkingState(entity.Owner, true);
Dirty(uid, comp);
}
@@ -86,6 +89,7 @@ public abstract class SharedSolutionContainerMixerSystem : EntitySystem
_appearance.SetData(entity, SolutionContainerMixerVisuals.Mixing, false);
comp.Mixing = false;
comp.MixingSoundEntity = null;
+ _powerState.SetWorkingState(entity.Owner, false);
Dirty(uid, comp);
}
diff --git a/Content.Shared/Power/EntitySystems/PowerStateSystem.cs b/Content.Shared/Power/EntitySystems/PowerStateSystem.cs
index dd47708d2d..aba41e2432 100644
--- a/Content.Shared/Power/EntitySystems/PowerStateSystem.cs
+++ b/Content.Shared/Power/EntitySystems/PowerStateSystem.cs
@@ -7,7 +7,7 @@ namespace Content.Shared.Power.EntitySystems;
/// Generic system that handles entities with .
/// Used for simple machines that only need to switch between "idle" and "working" power states.
///
-public sealed class PowerStateSystem : EntitySystem
+public abstract class SharedPowerStateSystem : EntitySystem
{
[Dependency] private readonly SharedPowerReceiverSystem _powerReceiverSystem = default!;
@@ -17,16 +17,9 @@ public sealed class PowerStateSystem : EntitySystem
{
base.Initialize();
- SubscribeLocalEvent(OnComponentStartup);
-
_powerStateQuery = GetEntityQuery();
}
- private void OnComponentStartup(Entity ent, ref ComponentStartup args)
- {
- SetWorkingState(ent.Owner, ent.Comp.IsWorking);
- }
-
///
/// Sets the working state of the entity, adjusting its power draw accordingly.
///
@@ -41,4 +34,22 @@ public sealed class PowerStateSystem : EntitySystem
_powerReceiverSystem.SetLoad(ent.Owner, working ? ent.Comp.WorkingPowerDraw : ent.Comp.IdlePowerDraw);
ent.Comp.IsWorking = working;
}
+
+ ///
+ /// Tries to set the working state of the entity, adjusting its power draw accordingly.
+ /// Use this for if you're not sure if the entity has a .
+ ///
+ /// The entity to set the working state for.
+ /// Whether the entity should be in the working state.
+ [PublicAPI]
+ public void TrySetWorkingState(Entity ent, bool working)
+ {
+ // Sometimes systems calling this API handle generic objects that can or can't consume power,
+ // so to reduce boilerplate we don't log an error. Any entity that *should* have an ApcPowerRecieverComponent
+ // will log an error in tests if someone tries to add an entity that doesn't have one.
+ if (!_powerStateQuery.Resolve(ent, ref ent.Comp, false))
+ return;
+
+ SetWorkingState(ent, working);
+ }
}
diff --git a/Content.Shared/Power/EntitySystems/UIPowerStateSystem.cs b/Content.Shared/Power/EntitySystems/UIPowerStateSystem.cs
index bf2d08adbf..6bd5af591e 100644
--- a/Content.Shared/Power/EntitySystems/UIPowerStateSystem.cs
+++ b/Content.Shared/Power/EntitySystems/UIPowerStateSystem.cs
@@ -10,7 +10,7 @@ namespace Content.Shared.Power.EntitySystems;
public sealed class UIPowerStateSystem : EntitySystem
{
[Dependency] private readonly SharedUserInterfaceSystem _ui = default!;
- [Dependency] private readonly PowerStateSystem _powerState = default!;
+ [Dependency] private readonly SharedPowerStateSystem _powerState = default!;
public override void Initialize()
{
diff --git a/Resources/Maps/Misc/terminal.yml b/Resources/Maps/Misc/terminal.yml
index bb0491e9ce..1a736bac26 100644
--- a/Resources/Maps/Misc/terminal.yml
+++ b/Resources/Maps/Misc/terminal.yml
@@ -1583,6 +1583,7 @@ entities:
- type: Godmode
missingComponents:
- ApcPowerReceiver
+ - PowerState
- Anchorable
- Construction
- Destructible
@@ -1595,6 +1596,7 @@ entities:
- type: Godmode
missingComponents:
- ApcPowerReceiver
+ - PowerState
- Anchorable
- Construction
- Destructible
@@ -7904,6 +7906,7 @@ entities:
- type: Godmode
missingComponents:
- ApcPowerReceiver
+ - PowerState
- Anchorable
- Construction
- Destructible
@@ -7916,6 +7919,7 @@ entities:
- type: Godmode
missingComponents:
- ApcPowerReceiver
+ - PowerState
- Anchorable
- Construction
- Destructible
diff --git a/Resources/Prototypes/Entities/Structures/Machines/Computers/arcades.yml b/Resources/Prototypes/Entities/Structures/Machines/Computers/arcades.yml
index 8c7872c23f..8e852273ef 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/Computers/arcades.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/Computers/arcades.yml
@@ -5,8 +5,6 @@
name: arcade
parent: BaseComputer
components:
- - type: ApcPowerReceiver
- powerLoad: 350
- type: ExtensionCableReceiver
- type: PointLight
radius: 1.8
diff --git a/Resources/Prototypes/Entities/Structures/Machines/Computers/base_structurecomputers.yml b/Resources/Prototypes/Entities/Structures/Machines/Computers/base_structurecomputers.yml
index bbd6ea8302..e4c8293fcb 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/Computers/base_structurecomputers.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/Computers/base_structurecomputers.yml
@@ -17,7 +17,11 @@
- board
- type: Computer
- type: ApcPowerReceiver
- powerLoad: 200
+ powerLoad: 50
+ - type: PowerState
+ idlePowerDraw: 50
+ workingPowerDraw: 500
+ - type: UIPowerState
- type: ExtensionCableReceiver
- type: ActivatableUIRequiresPower
- type: Sprite
diff --git a/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml b/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml
index 396452fdb1..96e30a5aa7 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml
@@ -500,7 +500,10 @@
enum.WiresUiKey.Key:
type: WiresBoundUserInterface
- type: ApcPowerReceiver
- powerLoad: 1000
+ powerLoad: 50
+ - type: PowerState
+ idlePowerDraw: 50
+ workingPowerDraw: 1000
- type: Computer
board: ResearchComputerCircuitboard
- type: AccessReader
@@ -551,7 +554,10 @@
enum.WiresUiKey.Key:
type: WiresBoundUserInterface
- type: ApcPowerReceiver
- powerLoad: 1000
+ powerLoad: 50
+ - type: PowerState
+ idlePowerDraw: 50
+ workingPowerDraw: 1000
- type: Computer
board: AnalysisComputerCircuitboard
- type: PointLight
@@ -631,8 +637,6 @@
name: body scanner computer
description: A body scanner.
components:
- - type: ApcPowerReceiver
- powerLoad: 500
- type: Computer
board: BodyScannerComputerCircuitboard
- type: PointLight
@@ -1172,8 +1176,6 @@
state: generic_keys
- map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
state: generic_panel_open
- - type: ApcPowerReceiver
- powerLoad: 3100 #We want this to fail first so I transferred most of the scanner and pod's power here. (3500 in total)
- type: Computer
board: CloningConsoleComputerCircuitboard
- type: PointLight
@@ -1543,7 +1545,11 @@
enum.WiresUiKey.Key:
type: WiresBoundUserInterface
- type: ApcPowerReceiver
- powerLoad: 1000
+ powerLoad: 5
+ - type: PowerState
+ idlePowerDraw: 5
+ workingPowerDraw: 1000
+ - type: UIPowerState
- type: DeviceNetwork
deviceNetId: Wireless
receiveFrequencyId: RoboticsConsole
@@ -1588,7 +1594,10 @@
channels:
- Xenoborg
- type: ApcPowerReceiver
- powerLoad: 1000
+ powerLoad: 50
+ - type: PowerState
+ idlePowerDraw: 50
+ workingPowerDraw: 1000
- type: DeviceNetwork
deviceNetId: Wireless
receiveFrequencyId: Mothership
@@ -1615,7 +1624,10 @@
- map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
state: generic_panel_open
- type: ApcPowerReceiver
- powerLoad: 1000
+ powerLoad: 50
+ - type: PowerState
+ idlePowerDraw: 50
+ workingPowerDraw: 1000
- type: Computer
board: StationAiUploadCircuitboard
- type: AccessReader
@@ -1691,7 +1703,10 @@
True: { visible: false }
False: { visible: true }
- type: ApcPowerReceiver
- powerLoad: 1000
+ powerLoad: 50
+ - type: PowerState
+ idlePowerDraw: 50
+ workingPowerDraw: 1000
- type: Computer
board: StationAiFixerCircuitboard
- type: AccessReader
diff --git a/Resources/Prototypes/Entities/Structures/Machines/Medical/chemistry_machines.yml b/Resources/Prototypes/Entities/Structures/Machines/Medical/chemistry_machines.yml
index 65a84c86aa..c88c248232 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/Medical/chemistry_machines.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/Medical/chemistry_machines.yml
@@ -76,6 +76,11 @@
False: { visible: False }
- type: Machine
board: ElectrolysisUnitMachineCircuitboard
+ - type: ApcPowerReceiver
+ powerLoad: 0
+ - type: PowerState
+ idlePowerDraw: 0
+ workingPowerDraw: 1000 # for a lab-grade machine
# TODO centrifuge should spill the vial if the lid is off
- type: entity
@@ -124,3 +129,8 @@
- CentrifugeCompatible
- type: Machine
board: CentrifugeMachineCircuitboard
+ - type: ApcPowerReceiver
+ powerLoad: 0
+ - type: PowerState
+ idlePowerDraw: 0
+ workingPowerDraw: 500
diff --git a/Resources/Prototypes/Entities/Structures/Machines/holopad.yml b/Resources/Prototypes/Entities/Structures/Machines/holopad.yml
index 8c68710d76..5c9c5c21b6 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/holopad.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/holopad.yml
@@ -15,7 +15,10 @@
mask:
- Impassable
- type: ApcPowerReceiver
- powerLoad: 300
+ powerLoad: 5
+ - type: PowerState
+ idlePowerDraw: 5
+ workingPowerDraw: 300
- type: StationAiVision
range: 1
needsAnchoring: true
diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml
index 412126af5f..e59e2d86e7 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml
@@ -49,6 +49,11 @@
price: 800
- type: ResearchClient
- type: TechnologyDatabase
+ - type: ApcPowerReceiver
+ powerLoad: 150
+ - type: PowerState
+ idlePowerDraw: 150
+ workingPowerDraw: 1000
# a lathe that can be sped up with space lube / slowed down with glue
- type: entity
diff --git a/Resources/Prototypes/Entities/Structures/Machines/microwave.yml b/Resources/Prototypes/Entities/Structures/Machines/microwave.yml
index b7c5b194ef..edc367a934 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/microwave.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/microwave.yml
@@ -98,7 +98,10 @@
canCreateVacuum: false
deleteAfterExplosion: false
- type: ApcPowerReceiver
- powerLoad: 400
+ powerLoad: 5
+ - type: PowerState
+ idlePowerDraw: 5
+ workingPowerDraw: 1000
- type: Machine
board: MicrowaveMachineCircuitboard
- type: ContainerContainer
diff --git a/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml b/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml
index d423a47ae9..cd3d8dab83 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml
@@ -39,7 +39,10 @@
- map: [ "grinder" ]
state: "grinder_empty"
- type: ApcPowerReceiver
- powerLoad: 300
+ powerLoad: 0
+ - type: PowerState
+ idlePowerDraw: 0
+ workingPowerDraw: 750 # medium power blender
- type: ItemSlots
slots:
beakerSlot:
diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml
index 39643fb850..889cbb3003 100644
--- a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml
+++ b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml
@@ -49,7 +49,11 @@
containers:
board: !type:Container
- type: ApcPowerReceiver
- powerLoad: 200
+ powerLoad: 50
+ - type: PowerState
+ idlePowerDraw: 50
+ workingPowerDraw: 200
+ - type: UIPowerState
- type: Construction
graph: StationMap
node: station_map