Merge pull request #20580 from ChangelingRain/lightenlightdrainamount

Clockcult powerdraining is more likely to cause lights to burn out
This commit is contained in:
oranges
2016-09-24 19:49:38 +12:00
committed by GitHub
2 changed files with 11 additions and 5 deletions
@@ -38,6 +38,8 @@
playsound(src, 'sound/effects/light_flicker.ogg', 50, 1)
flicker(2)
. += 50
else if(prob(50))
burn_out()
/mob/living/silicon/robot/power_drain(clockcult_user)
if((!clockcult_user || !is_servant_of_ratvar(src)) && cell && cell.charge)
+9 -5
View File
@@ -232,11 +232,8 @@
if(status == LIGHT_OK && trigger)
explode()
else if( prob( min(60, switchcount*switchcount*0.01) ) )
if(status == LIGHT_OK && trigger)
status = LIGHT_BURNED
icon_state = "[base_state]-burned"
on = 0
SetLuminosity(0)
if(trigger)
burn_out()
else
use_power = 2
SetLuminosity(brightness)
@@ -254,6 +251,13 @@
removeStaticPower(static_power_used, STATIC_LIGHT)
/obj/machinery/light/proc/burn_out()
if(status == LIGHT_OK)
status = LIGHT_BURNED
icon_state = "[base_state]-burned"
on = 0
SetLuminosity(0)
// attempt to set the light's on/off status
// will not switch on if broken/burned/empty
/obj/machinery/light/proc/seton(s)