diff --git a/code/datums/looping_sounds/item_sounds.dm b/code/datums/looping_sounds/item_sounds.dm index 96c2ec7533c3..b8f8ec9663d7 100644 --- a/code/datums/looping_sounds/item_sounds.dm +++ b/code/datums/looping_sounds/item_sounds.dm @@ -1,4 +1,4 @@ -#define RAD_GEIGER_LOW 100 // Geiger counter sound thresholds +#define RAD_GEIGER_LOW 100 // Geiger counter sound thresholds #define RAD_GEIGER_MEDIUM 500 #define RAD_GEIGER_HIGH 1000 @@ -41,7 +41,6 @@ mid_length = 3.5 volume = 25 - /datum/looping_sound/reverse_bear_trap_beep mid_sounds = list('sound/machines/beep.ogg') mid_length = 60 diff --git a/code/datums/looping_sounds/machinery_sounds.dm b/code/datums/looping_sounds/machinery_sounds.dm index 743550be16db..a90d41142034 100644 --- a/code/datums/looping_sounds/machinery_sounds.dm +++ b/code/datums/looping_sounds/machinery_sounds.dm @@ -6,8 +6,6 @@ end_sound = 'sound/machines/shower/shower_end.ogg' volume = 20 -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /datum/looping_sound/supermatter mid_sounds = list('sound/machines/sm/loops/calm.ogg' = 1) mid_length = 60 @@ -17,8 +15,6 @@ falloff_distance = 5 vary = TRUE -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /datum/looping_sound/destabilized_crystal mid_sounds = list('sound/machines/sm/loops/delamming.ogg' = 1) mid_length = 60 @@ -26,8 +22,6 @@ extra_range = 15 vary = TRUE -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /datum/looping_sound/generator start_sound = 'sound/machines/generator/generator_start.ogg' start_length = 4 @@ -36,9 +30,6 @@ end_sound = 'sound/machines/generator/generator_end.ogg' volume = 40 -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - /datum/looping_sound/deep_fryer start_sound = 'sound/machines/fryer/deep_fryer_immerse.ogg' //my immersions start_length = 10 @@ -47,15 +38,11 @@ end_sound = 'sound/machines/fryer/deep_fryer_emerge.ogg' volume = 15 -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /datum/looping_sound/grill mid_length = 2 mid_sounds = list('sound/machines/fryer/deep_fryer_1.ogg' = 1, 'sound/machines/fryer/deep_fryer_2.ogg' = 1) volume = 30 -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /datum/looping_sound/microwave start_sound = 'sound/machines/microwave/microwave-start.ogg' start_length = 10 @@ -64,11 +51,8 @@ end_sound = 'sound/machines/microwave/microwave-end.ogg' volume = 90 -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /datum/looping_sound/jackpot mid_length = 11 mid_sounds = list('sound/machines/roulettejackpot.ogg') volume = 85 vary = TRUE - diff --git a/code/datums/looping_sounds/medical_sounds.dm b/code/datums/looping_sounds/medical_sounds.dm new file mode 100644 index 000000000000..fcf33681a8e3 --- /dev/null +++ b/code/datums/looping_sounds/medical_sounds.dm @@ -0,0 +1,21 @@ +/datum/looping_sound/ekg + mid_sounds = list('sound/machines/medical/ekgbeep.ogg') + mid_length = 8 + volume = 35 + +/datum/looping_sound/ekg_fast + mid_sounds = list('sound/machines/medical/ekgbeep.ogg') + mid_length = 5 + volume = 35 + +/datum/looping_sound/ekg_slow + mid_sounds = list('sound/machines/medical/ekgbeep.ogg') + mid_length = 15 + volume = 35 + +/datum/looping_sound/flatline + start_length = 7 + start_sound = 'sound/machines/medical/flatline_start.ogg' + mid_sounds = list('sound/machines/medical/flatline_mid.ogg') + mid_length = 10 + volume = 35 diff --git a/code/game/machinery/medical/_medical.dm b/code/game/machinery/medical/_medical.dm index 6197d423a684..4098d08bf615 100644 --- a/code/game/machinery/medical/_medical.dm +++ b/code/game/machinery/medical/_medical.dm @@ -17,6 +17,10 @@ . = ..() START_PROCESSING(SSmachines, src) +/obj/machinery/medical/Destroy() + STOP_PROCESSING(SSmachines, src) + return ..() + /obj/machinery/medical/wrench_act(mob/living/user, obj/item/I) . = ..() anchored = !anchored @@ -28,7 +32,7 @@ return if(attached) - usr.visible_message("[usr] deattaches [src] from [target].", "You deattach [src] from [target].") + usr.visible_message("[usr] detaches [src] from [target].", "You detach [src] from [target].") clear_status() attached = null return @@ -39,7 +43,7 @@ if(Adjacent(target) && usr.Adjacent(target)) usr.visible_message(span_warning("[usr] attaches [src] to [target]."), span_notice("You attach [src] to [target].")) - attached_beam = src.Beam(target, icon_state = "blood", maxdistance = 1) + attached_beam = src.Beam(target, icon_state = "1-full", maxdistance = 3) add_fingerprint(usr) attached = target update_overlays() @@ -56,7 +60,7 @@ clear_status() return - if(!(get_dist(src, attached) <= 1 && isturf(attached.loc))) //you will most likely have multiple machines hooked up to you. Running away from them is a bad idea. + if(!(get_dist(src, attached) <= 2 && isturf(attached.loc))) //you will most likely have multiple machines hooked up to you. Running away from them is a bad idea. to_chat(attached, "The [name] lines are ripped out of you!") attached.apply_damage(20, BRUTE, BODY_ZONE_CHEST) attached.apply_damage(15, BRUTE, pick(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM)) @@ -76,5 +80,6 @@ */ /obj/machinery/medical/proc/clear_status() update_overlays() + qdel(attached_beam) use_power = IDLE_POWER_USE return diff --git a/code/game/machinery/medical/life_support.dm b/code/game/machinery/medical/life_support.dm index b8d367581c14..4d9256847438 100644 --- a/code/game/machinery/medical/life_support.dm +++ b/code/game/machinery/medical/life_support.dm @@ -1,5 +1,5 @@ /obj/machinery/medical/life_support - name = "Basic Life Support Unit" + name = "life support unit" desc = "A bulky table with a lot of blinking lights installed and a small monitor that checks the users health." icon = 'icons/obj/machines/medical/life_support.dmi' icon_state = "basic" @@ -10,6 +10,28 @@ var/health_treshold = -200 ///Determines if this is active or not. var/active = TRUE + ///Sound that plays at stable health levels + var/datum/looping_sound/ekg/soundloop_ekg + ///Sound that plays at dangerous health levels + var/datum/looping_sound/ekg_fast/soundloop_ekg_fast + ///Sound that plays at lethal health levels + var/datum/looping_sound/ekg_slow/soundloop_ekg_slow + ///Sound that plays when the user is dead + var/datum/looping_sound/flatline/soundloop_flatline + +/obj/machinery/medical/life_support/Initialize() + . = ..() + soundloop_ekg = new(list(src), FALSE) + soundloop_ekg_slow = new(list(src), FALSE) + soundloop_ekg_fast = new(list(src), FALSE) + soundloop_flatline = new(list(src), FALSE) + +/obj/machinery/medical/life_support/Destroy() + QDEL_NULL(soundloop_ekg) + QDEL_NULL(soundloop_ekg_fast) + QDEL_NULL(soundloop_ekg_slow) + QDEL_NULL(soundloop_flatline) + return ..() /obj/machinery/medical/life_support/update_overlays() . = ..() @@ -26,13 +48,13 @@ switch(attached.health) if(-INFINITY to HEALTH_THRESHOLD_DEAD) - monitor_overlay= mutable_appearance(icon,"death") + monitor_overlay = mutable_appearance(icon,"death") if(HEALTH_THRESHOLD_DEAD+1 to HEALTH_THRESHOLD_FULLCRIT) - monitor_overlay= mutable_appearance(icon,"hardcrit") + monitor_overlay = mutable_appearance(icon,"hardcrit") if(HEALTH_THRESHOLD_FULLCRIT+1 to HEALTH_THRESHOLD_CRIT) - monitor_overlay= mutable_appearance(icon,"softcrit") + monitor_overlay = mutable_appearance(icon,"softcrit") if(1 to INFINITY) - monitor_overlay= mutable_appearance(icon,"alive") + monitor_overlay = mutable_appearance(icon,"alive") . += monitor_overlay /obj/machinery/medical/life_support/wrench_act(mob/living/user, obj/item/I) @@ -47,6 +69,7 @@ /obj/machinery/medical/life_support/process() . = ..() + update_sound() if(!active || !attached) return @@ -60,9 +83,29 @@ attached.update_stat() return +/obj/machinery/medical/life_support/proc/update_sound() + if(!active || !attached) + soundloop_ekg.stop() + soundloop_ekg_slow.stop() + soundloop_ekg_fast.stop() + soundloop_flatline.stop() + + switch(attached.health) + if(-INFINITY to HEALTH_THRESHOLD_DEAD) + soundloop_flatline.start() + soundloop_ekg_slow.stop() + if(HEALTH_THRESHOLD_DEAD+1 to HEALTH_THRESHOLD_FULLCRIT) + soundloop_ekg_slow.start() + soundloop_ekg_fast.stop() + if(HEALTH_THRESHOLD_FULLCRIT+1 to HEALTH_THRESHOLD_CRIT) + soundloop_ekg_fast.start() + soundloop_ekg.stop() + if(1 to INFINITY) + soundloop_ekg.start() + /obj/machinery/medical/life_support/advanced - name = "Advanced Life Support Unit" - desc = "A miracle of space engineering, this machine allows you to indefinitely suspend someone in a stasis like state, but uses up massive amounts of electricity to do so." + name = "advanced life support unit" + desc = "A miracle of modern engineering, this machine allows you to indefinitely suspend someone in a stasis like state, but uses up massive amounts of electricity to do so." icon_state = "advanced" circuit = /obj/item/circuitboard/machine/life_support/advanced idle_power_usage = 250 @@ -70,8 +113,8 @@ health_treshold = -1000 /obj/machinery/medical/life_support/mobile - name = "Mobile Life Support Unit" - desc = "A miracle of space engineering, allows you to suspend someone in a coma-like state, wherever you go!" + name = "portable life support unit" + desc = "A miracle of modern engineering, allows you to suspend someone in a coma-like state, wherever you go!" icon_state = "mobile" circuit = /obj/item/circuitboard/machine/life_support/mobile idle_power_usage = 50 diff --git a/code/game/machinery/medical/organ_substitutes.dm b/code/game/machinery/medical/organ_substitutes.dm index b2b171c95a98..a5079e2807e8 100644 --- a/code/game/machinery/medical/organ_substitutes.dm +++ b/code/game/machinery/medical/organ_substitutes.dm @@ -19,19 +19,19 @@ active_power_usage /= C.rating /obj/machinery/medical/simple/liver - name = "Automated Liver Support System" + name = "liver support system" desc = "Stabilizes the liver at the cost of a lot of electricity. Better parts lessen the strain on the power network." icon_state = "mechanical_liver" status = TRAIT_STABLELIVER /obj/machinery/medical/simple/lung - name = "Automatic Breath Rejuvanator" + name = "ventilator" desc = "Stabilizes the lungs at the cost of a lot of electricity. Better parts lessen the strain on the power network." icon_state = "mechanical_lungs" status = TRAIT_STABLELUNG /obj/machinery/medical/simple/heart - name = "Emergency Heart Stabilizer" + name = "heart stabilizer" desc = "Stabilizes the heart at the cost of a lot of electricity. Better parts lessen the strain on the power network." icon_state = "mechanical_heart" idle_power_usage = 150 diff --git a/code/game/machinery/medical/plasmic_stabilizer.dm b/code/game/machinery/medical/plasmic_stabilizer.dm index c3e8436c46f1..0c0aa306ed1a 100644 --- a/code/game/machinery/medical/plasmic_stabilizer.dm +++ b/code/game/machinery/medical/plasmic_stabilizer.dm @@ -1,5 +1,5 @@ /obj/machinery/medical/plasmic_stabilizer - name = "Automated Inorganic Lifeform Stabilizer" + name = "plasmic stabilizer" desc = "Stabilizes free plasma particles in inorganic bodies, causing them to not burn. Uses massive amounts of electricity." icon_state = "plasmic_stabilizer" active_power_usage = 1500 diff --git a/code/game/machinery/medical/thermal_stabilizer.dm b/code/game/machinery/medical/thermal_stabilizer.dm index 6cc834c5f018..e021d9209d63 100644 --- a/code/game/machinery/medical/thermal_stabilizer.dm +++ b/code/game/machinery/medical/thermal_stabilizer.dm @@ -1,6 +1,6 @@ /obj/machinery/medical/thermal name = "Thermal Stabilizer" - desc = "Stabilizes free plasma particles in inorganic bodies, causing them to not burn. Uses massive amounts of electricity.This model seems to be very old." + desc = "Stabilizes the body temperature of a connected patient." icon_state = "thermal_stabilizer" var/stabilization_rate = 10 diff --git a/shiptest.dme b/shiptest.dme index d67c9cad1ffd..b19f689c69b9 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -662,6 +662,7 @@ #include "code\datums\looping_sounds\_looping_sound.dm" #include "code\datums\looping_sounds\item_sounds.dm" #include "code\datums\looping_sounds\machinery_sounds.dm" +#include "code\datums\looping_sounds\medical_sounds.dm" #include "code\datums\looping_sounds\weather.dm" #include "code\datums\mapgen\_biome.dm" #include "code\datums\mapgen\_MapGenerator.dm" diff --git a/sound/machines/medical/ekgbeep.ogg b/sound/machines/medical/ekgbeep.ogg new file mode 100644 index 000000000000..e929a7e43239 Binary files /dev/null and b/sound/machines/medical/ekgbeep.ogg differ diff --git a/sound/machines/medical/flatline.ogg b/sound/machines/medical/flatline.ogg new file mode 100644 index 000000000000..c19e72aa4cae Binary files /dev/null and b/sound/machines/medical/flatline.ogg differ diff --git a/sound/machines/medical/flatline_mid.ogg b/sound/machines/medical/flatline_mid.ogg new file mode 100644 index 000000000000..7f6400417ddb Binary files /dev/null and b/sound/machines/medical/flatline_mid.ogg differ diff --git a/sound/machines/medical/flatline_start.ogg b/sound/machines/medical/flatline_start.ogg new file mode 100644 index 000000000000..98903c1d29b0 Binary files /dev/null and b/sound/machines/medical/flatline_start.ogg differ