diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 1ba430301e4f4..b2f2fc441a900 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -54,10 +54,9 @@ maxhealth = material.integrity if(reinf_material) - maxhealth += 0.25 * reinf_material.integrity + maxhealth += 0.5 * reinf_material.integrity if(is_fulltile()) - maxhealth *= 4 layer = FULL_WINDOW_LAYER health = maxhealth @@ -106,17 +105,20 @@ if(sound_effect) playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1) if(health < maxhealth / 4 && initialhealth >= maxhealth / 4) - visible_message("\The [src] looks like it's about to shatter!") + visible_message(SPAN_DANGER("\The [src] looks like it's about to shatter!")) + playsound(loc, "glasscrack", 100, 1) else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2) - visible_message("\The [src] looks seriously damaged!" ) + visible_message(SPAN_WARNING("\The [src] looks seriously damaged!")) + playsound(loc, "glasscrack", 100, 1) else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4) - visible_message("Cracks begin to appear in \the [src]!" ) + visible_message(SPAN_WARNING("Cracks begin to appear in \the [src]!")) + playsound(loc, "glasscrack", 100, 1) return /obj/structure/window/proc/shatter(var/display_message = 1) playsound(src, "shatter", 70, 1) if(display_message) - visible_message("\The [src] shatters!") + visible_message("\The [src] shatters!") var/debris_count = is_fulltile() ? 4 : 1 for(var/i = 0 to debris_count) diff --git a/code/game/sound.dm b/code/game/sound.dm index 6066235411af9..8af519f2dcbca 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -52,6 +52,7 @@ GLOBAL_LIST_INIT(keystroke_sound,list('sound/machines/keyboard/keystroke1.ogg',' GLOBAL_LIST_INIT(switch_sound,list('sound/machines/switch1.ogg','sound/machines/switch2.ogg','sound/machines/switch3.ogg','sound/machines/switch4.ogg')) GLOBAL_LIST_INIT(button_sound,list('sound/machines/button1.ogg','sound/machines/button2.ogg','sound/machines/button3.ogg','sound/machines/button4.ogg')) GLOBAL_LIST_INIT(chop_sound,list('sound/weapons/chop1.ogg','sound/weapons/chop2.ogg','sound/weapons/chop3.ogg')) +GLOBAL_LIST_INIT(glasscrack_sound,list('sound/effects/glass_crack1.ogg','sound/effects/glass_crack2.ogg','sound/effects/glass_crack3.ogg','sound/effects/glass_crack4.ogg')) /proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff, var/is_global, var/frequency, var/is_ambiance = 0) @@ -185,4 +186,5 @@ var/const/FALLOFF_SOUNDS = 0.5 if ("switch") soundin = pick(GLOB.switch_sound) if ("button") soundin = pick(GLOB.button_sound) if ("chop") soundin = pick(GLOB.chop_sound) + if ("glasscrack") soundin = pick(GLOB.glasscrack_sound) return soundin diff --git a/sound/effects/glass_crack1.ogg b/sound/effects/glass_crack1.ogg new file mode 100644 index 0000000000000..0221b238d7f28 Binary files /dev/null and b/sound/effects/glass_crack1.ogg differ diff --git a/sound/effects/glass_crack2.ogg b/sound/effects/glass_crack2.ogg new file mode 100644 index 0000000000000..e5e3702458842 Binary files /dev/null and b/sound/effects/glass_crack2.ogg differ diff --git a/sound/effects/glass_crack3.ogg b/sound/effects/glass_crack3.ogg new file mode 100644 index 0000000000000..631c584462eff Binary files /dev/null and b/sound/effects/glass_crack3.ogg differ diff --git a/sound/effects/glass_crack4.ogg b/sound/effects/glass_crack4.ogg new file mode 100644 index 0000000000000..5d6302e88b2bb Binary files /dev/null and b/sound/effects/glass_crack4.ogg differ