You can smash the bulbs in floodlights (#31690)

* You can smash the bulbs in floodlights

* Floodlight breaking but properly
This commit is contained in:
KorPhaeron
2017-10-15 12:55:19 -05:00
committed by duncathan salt
parent 4f4a1f2b3d
commit 989f0275e7
2 changed files with 19 additions and 0 deletions

View File

@@ -43,6 +43,8 @@
icon_state = "floodlight"
anchored = TRUE
density = TRUE
max_integrity = 100
integrity_failure = 80
idle_power_usage = 100
active_power_usage = 1000
var/list/light_setting_list = list(0, 5, 10, 15)
@@ -104,3 +106,14 @@
/obj/machinery/power/floodlight/attack_ai(mob/user)
attack_hand(user)
..()
/obj/machinery/power/floodlight/obj_break(damage_flag)
if(!(flags_1 & NODECONSTRUCT_1))
playsound(loc, 'sound/effects/glassbr3.ogg', 100, 1)
var/obj/structure/floodlight_frame/F = new(loc)
F.state = FLOODLIGHT_NEEDS_LIGHTS
new /obj/item/light/tube/broken(loc)
qdel(src)
/obj/machinery/power/floodlight/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
playsound(src, 'sound/effects/glasshit.ogg', 75, 1)

View File

@@ -590,6 +590,9 @@
item_state = "c_tube"
brightness = 8
/obj/item/light/tube/broken
status = LIGHT_BROKEN
/obj/item/light/bulb
name = "light bulb"
desc = "A replacement light bulb."
@@ -600,6 +603,9 @@
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
brightness = 4
/obj/item/light/bulb/broken
status = LIGHT_BROKEN
/obj/item/light/throw_impact(atom/hit_atom)
if(!..()) //not caught by a mob
shatter()