From c4c8457a82e532c9e9fc6bbe644af744bbc10ca2 Mon Sep 17 00:00:00 2001 From: Atermonera Date: Wed, 3 Jul 2019 19:10:07 -0800 Subject: [PATCH] Merge pull request #6266 from Mechoid/StopSecurityFromBlowingTheirTops_Flashfix2 Flashes actually work as said on the tin. --- code/game/objects/items/devices/flash.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 1fd41ec768e..acc89b39dc3 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -122,9 +122,9 @@ if(use_external_power) battery = get_external_power_supply() - if(times_used <= max_flashes && battery && battery.checked_use(charge_cost)) + if(times_used <= max_flashes && battery && battery.charge >= charge_cost) last_used = world.time - if(prob( max(0, times_used - safe_flashes) * 2 + (times_used >= 1) ) && can_break) //if you use it 10 times in a minute it has a 30% chance to break. + if(prob( max(0, times_used - safe_flashes) * 2 + (times_used >= safe_flashes)) && can_break) //if you use it 10 times in a minute it has a 30% chance to break. broken = TRUE if(user) to_chat(user, "The bulb has burnt out!")