From 5cbd7aeb7bf044a2852ff14e349284ffbcaa32d3 Mon Sep 17 00:00:00 2001 From: Casper3667 <8396443+Casper3667@users.noreply.github.com> Date: Thu, 6 Aug 2026 11:33:02 +0200 Subject: [PATCH] Fixes the bubble shield integrated circuit (#23001) The power draw of the bubble shield integrated circuit wasn't being updated when the shields were removed, so I fixed that. --- .../integrated_electronics/subtypes/manipulation.dm | 9 +++++++-- html/changelogs/BubbleShieldFix.yml | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/BubbleShieldFix.yml diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index 8af931122ca..173f5972807 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -610,6 +610,7 @@ LAZYREMOVE(deployed_shields, shield) qdel(shield) set_pin_data(IC_OUTPUT, 1, LAZYLEN(deployed_shields)) + update_power_draw() /obj/item/integrated_circuit/manipulation/bubble_shield/do_work() if(!assembly) @@ -652,13 +653,17 @@ set_pin_data(IC_OUTPUT, 1, LAZYLEN(deployed_shields)) activate_pin(2) + update_power_draw() + + ..() + +/obj/item/integrated_circuit/manipulation/bubble_shield/proc/update_power_draw() + var/strength = between(10, get_pin_data(IC_INPUT, 3), 50) if(deployed_shields) power_draw_idle = power_draw_per_use * (strength / 10) * LAZYLEN(deployed_shields) else power_draw_idle = 0 - ..() - /obj/item/integrated_circuit/manipulation/bubble_shield/power_fail() for(var/obj/structure/machinery/shield/shield in deployed_shields) kill_shield(shield) diff --git a/html/changelogs/BubbleShieldFix.yml b/html/changelogs/BubbleShieldFix.yml new file mode 100644 index 00000000000..e7a2fabbbab --- /dev/null +++ b/html/changelogs/BubbleShieldFix.yml @@ -0,0 +1,6 @@ +author: TheGreyWolf + +delete-after: True + +changes: + - bugfix: "The power draw on the bubble shield circuit now updates correctly again."