diff --git a/code/game/machinery/colony_floodlights.dm b/code/game/machinery/colony_floodlights.dm index 13478381e38e..0267c7e95487 100644 --- a/code/game/machinery/colony_floodlights.dm +++ b/code/game/machinery/colony_floodlights.dm @@ -281,6 +281,27 @@ else if(!is_lit) . += SPAN_INFO("It doesn't seem powered.") +/obj/structure/machinery/colony_floodlight/ex_act(severity) + switch(severity) + if(0 to EXPLOSION_THRESHOLD_LOW) + if(prob(25)) + set_damaged() + return + if(EXPLOSION_THRESHOLD_LOW to EXPLOSION_THRESHOLD_MEDIUM) + if(prob(50)) + set_damaged() + return + if(EXPLOSION_THRESHOLD_MEDIUM to INFINITY) + set_damaged() + return + +/obj/structure/machinery/colony_floodlight/proc/set_damaged() + playsound(src, "glassbreak", 70, 1) + damaged = TRUE + if(is_lit) + set_light(0) + update_icon() + /obj/structure/machinery/colony_floodlight/proc/toggle_light() is_lit = !is_lit if(!damaged) diff --git a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm index 2ab5f6ae703d..45f5ccb5dec1 100644 --- a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm +++ b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm @@ -864,11 +864,7 @@ M.visible_message("[M] slashes away at [src]!","We slash and claw at the bright light!", max_distance = 5, message_flags = CHAT_TYPE_XENO_COMBAT) health = max(health - rand(M.melee_damage_lower, M.melee_damage_upper), 0) if(!health) - playsound(src, "glassbreak", 70, 1) - damaged = TRUE - if(is_lit) - set_light(0) - update_icon() + set_damaged() else playsound(loc, 'sound/effects/Glasshit.ogg', 25, 1) return XENO_ATTACK_ACTION