diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index d82f3e7cf5..076c949f8e 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -149,6 +149,15 @@ /obj/screen/fullscreen/color_vision/blue color = "#0000ff" +/obj/screen/fullscreen/cinematic_backdrop + icon = 'icons/mob/screen_gen.dmi' + screen_loc = "WEST,SOUTH to EAST,NORTH" + icon_state = "flash" + plane = SPLASHSCREEN_PLANE + layer = SPLASHSCREEN_LAYER - 1 + color = "#000000" + show_when_dead = TRUE + /obj/screen/fullscreen/lighting_backdrop icon = 'icons/mob/screen_gen.dmi' icon_state = "flash" diff --git a/code/_onclick/hud/parallax.dm b/code/_onclick/hud/parallax.dm index eaa8214b7d..5d48f430d7 100755 --- a/code/_onclick/hud/parallax.dm +++ b/code/_onclick/hud/parallax.dm @@ -10,6 +10,8 @@ C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_1(null, C.view) C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_2(null, C.view) C.parallax_layers_cached += new /obj/screen/parallax_layer/planet(null, C.view) + if(SSparallax.random_layer) + C.parallax_layers_cached += new SSparallax.random_layer C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_3(null, C.view) C.parallax_layers = C.parallax_layers_cached.Copy() @@ -52,12 +54,12 @@ switch(C.prefs.parallax) if (PARALLAX_INSANE) C.parallax_throttle = FALSE - C.parallax_layers_max = 4 + C.parallax_layers_max = 5 return TRUE if (PARALLAX_MED) C.parallax_throttle = PARALLAX_DELAY_MED - C.parallax_layers_max = 2 + C.parallax_layers_max = 3 return TRUE if (PARALLAX_LOW) @@ -68,8 +70,9 @@ if (PARALLAX_DISABLE) return FALSE + //This is high parallax. C.parallax_throttle = PARALLAX_DELAY_DEFAULT - C.parallax_layers_max = 3 + C.parallax_layers_max = 4 return TRUE /datum/hud/proc/update_parallax_pref(mob/viewmob) @@ -219,15 +222,14 @@ L.screen_loc = "CENTER-7:[round(L.offset_x,1)],CENTER-7:[round(L.offset_y,1)]" /atom/movable/proc/update_parallax_contents() - set waitfor = FALSE if(length(client_mobs_in_contents)) for(var/thing in client_mobs_in_contents) var/mob/M = thing - if(M && M.client && M.hud_used && length(M.client.parallax_layers)) + if(M?.client && M.hud_used && length(M.client.parallax_layers)) M.hud_used.update_parallax() /mob/proc/update_parallax_teleport() //used for arrivals shuttle - if(client && client.eye && hud_used && length(client.parallax_layers)) + if(client?.eye && hud_used && length(client.parallax_layers)) var/area/areaobj = get_area(client.eye) hud_used.set_parallax_movedir(areaobj.parallax_movedir, TRUE) diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm index 7a8b0a1121..f5b8991e20 100644 --- a/code/_onclick/hud/plane_master.dm +++ b/code/_onclick/hud/plane_master.dm @@ -28,8 +28,6 @@ . = ..() filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE) -/obj/screen/plane_master/openspace/backdrop(mob/mymob) - filters = list() filters += filter(type = "drop_shadow", color = "#04080FAA", size = -10) filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15) filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20) @@ -93,13 +91,6 @@ else remove_filter("ambient_occlusion") -//Reserved to chat messages, so they are still displayed above the field of vision masking. -/obj/screen/plane_master/chat_messages - name = "chat messages plane master" - plane = CHAT_PLANE - appearance_flags = PLANE_MASTER - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - ///Contains all shadow cone masks, whose image overrides are displayed only to their respective owners. /obj/screen/plane_master/field_of_vision name = "field of vision mask plane master" @@ -135,10 +126,14 @@ blend_mode = BLEND_MULTIPLY mouse_opacity = MOUSE_OPACITY_TRANSPARENT +/obj/screen/plane_master/lighting/backdrop(mob/mymob) + mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit) + mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit) + /obj/screen/plane_master/lighting/Initialize() . = ..() - filters += filter(type="alpha", render_source=EMISSIVE_RENDER_TARGET, flags=MASK_INVERSE) - filters += filter(type="alpha", render_source=EMISSIVE_UNBLOCKABLE_RENDER_TARGET, flags=MASK_INVERSE) + filters += filter(type="alpha", render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE) + filters += filter(type="alpha", render_source = EMISSIVE_UNBLOCKABLE_RENDER_TARGET, flags = MASK_INVERSE) /** * Things placed on this mask the lighting plane. Doesn't render directly. @@ -186,7 +181,6 @@ render_target = EMISSIVE_BLOCKER_RENDER_TARGET ///Contains space parallax - /obj/screen/plane_master/parallax name = "parallax plane master" plane = PLANE_SPACE_PARALLAX @@ -197,12 +191,16 @@ name = "parallax whitifier plane master" plane = PLANE_SPACE -/obj/screen/plane_master/lighting/backdrop(mob/mymob) - mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit) - mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit) - /obj/screen/plane_master/camera_static name = "camera static plane master" plane = CAMERA_STATIC_PLANE appearance_flags = PLANE_MASTER blend_mode = BLEND_OVERLAY + + +//Reserved to chat messages, so they are still displayed above the field of vision masking. +/obj/screen/plane_master/chat_messages + name = "runechat plane master" + plane = CHAT_PLANE + appearance_flags = PLANE_MASTER + blend_mode = BLEND_OVERLAY diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 2ed8c81ba2..53915ff42b 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -12,9 +12,14 @@ layer = HUD_LAYER plane = HUD_PLANE resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + animate_movement = SLIDE_STEPS + speech_span = SPAN_ROBOT + vis_flags = VIS_INHERIT_PLANE appearance_flags = APPEARANCE_UI - var/obj/master = null //A reference to the object in the slot. Grabs or items, generally. - var/datum/hud/hud = null // A reference to the owner HUD, if any. + /// A reference to the object in the slot. Grabs or items, generally. + var/obj/master = null + /// A reference to the owner HUD, if any. + var/datum/hud/hud = null /** * Map name assigned to this object. * Automatically set by /client/proc/add_obj_to_map. @@ -60,7 +65,17 @@ name = "swap hand" /obj/screen/swap_hand/Click() - usr.swap_hand() + // At this point in client Click() code we have passed the 1/10 sec check and little else + // We don't even know if it's a middle click + // if(world.time <= usr.next_move) + // return 1 + + if(usr.incapacitated()) + return 1 + + if(ismob(usr)) + var/mob/M = usr + M.swap_hand() return 1 /obj/screen/craft @@ -96,17 +111,27 @@ H.open_language_menu(usr) /obj/screen/inventory - var/slot_id // The indentifier for the slot. It has nothing to do with ID cards. - var/icon_empty // Icon when empty. For now used only by humans. - var/icon_full // Icon when contains an item. For now used only by humans. + /// The identifier for the slot. It has nothing to do with ID cards. + var/slot_id + /// Icon when empty. For now used only by humans. + var/icon_empty + /// Icon when contains an item. For now used only by humans. + var/icon_full + /// The overlay when hovering over with an item in your hand var/list/object_overlays = list() layer = HUD_LAYER plane = HUD_PLANE /obj/screen/inventory/Click(location, control, params) - if(hud?.mymob && (hud.mymob != usr)) - return - // just redirect clicks + // At this point in client Click() code we have passed the 1/10 sec check and little else + // We don't even know if it's a middle click + // if(world.time <= usr.next_move) + // return TRUE + + if(usr.incapacitated()) // ignore_stasis = TRUE + return TRUE + if(ismecha(usr.loc)) // stops inventory actions in a mech + return TRUE if(hud?.mymob && slot_id) var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id) @@ -150,12 +175,13 @@ var/image/item_overlay = image(holding) item_overlay.alpha = 92 - if(!user.can_equip(holding, slot_id, TRUE, TRUE, TRUE)) + if(!user.can_equip(holding, slot_id, TRUE)) item_overlay.color = "#FF0000" else item_overlay.color = "#00ff00" - object_overlays += item_overlay + cut_overlay(object_overlays) + // object_overlay = item_overlay add_overlay(object_overlays) /obj/screen/inventory/hand @@ -187,10 +213,17 @@ /obj/screen/inventory/hand/Click(location, control, params) - if(hud?.mymob && (hud.mymob != usr)) - return - var/mob/user = hud.mymob - // just redirect clicks + // At this point in client Click() code we have passed the 1/10 sec check and little else + // We don't even know if it's a middle click + var/mob/user = hud?.mymob + if(usr != user) + return TRUE + // if(world.time <= user.next_move) + // return TRUE + if(user.incapacitated()) + return TRUE + if (ismecha(user.loc)) // stops inventory actions in a mech + return TRUE if(user.active_hand_index == held_index) var/obj/item/I = user.get_active_held_item() diff --git a/code/controllers/subsystem/fire_burning.dm b/code/controllers/subsystem/fire_burning.dm index 3251285ade..f81c23d186 100644 --- a/code/controllers/subsystem/fire_burning.dm +++ b/code/controllers/subsystem/fire_burning.dm @@ -18,6 +18,7 @@ SUBSYSTEM_DEF(fire_burning) //cache for sanic speed (lists are references anyways) var/list/currentrun = src.currentrun + var/delta_time = wait * 0.1 while(currentrun.len) var/obj/O = currentrun[currentrun.len] @@ -28,10 +29,12 @@ SUBSYSTEM_DEF(fire_burning) return continue - if(O.resistance_flags & ON_FIRE) - O.take_damage(20, BURN, "fire", 0) - else - processing -= O + + if(O.resistance_flags & ON_FIRE) //in case an object is extinguished while still in currentrun + if(!(O.resistance_flags & FIRE_PROOF)) + O.take_damage(10 * delta_time, BURN, "fire", 0) + else + O.extinguish() if (MC_TICK_CHECK) return diff --git a/code/controllers/subsystem/machines.dm b/code/controllers/subsystem/machines.dm index f356009569..23190574d8 100644 --- a/code/controllers/subsystem/machines.dm +++ b/code/controllers/subsystem/machines.dm @@ -2,6 +2,7 @@ SUBSYSTEM_DEF(machines) name = "Machines" init_order = INIT_ORDER_MACHINES flags = SS_KEEP_TIMING + wait = 2 SECONDS var/list/processing = list() var/list/currentrun = list() var/list/powernets = list() @@ -27,7 +28,7 @@ SUBSYSTEM_DEF(machines) return ..() -/datum/controller/subsystem/machines/fire(resumed = 0) +/datum/controller/subsystem/machines/fire(resumed = FALSE) if (!resumed) for(var/datum/powernet/Powernet in powernets) Powernet.reset() //reset the power state. @@ -36,11 +37,10 @@ SUBSYSTEM_DEF(machines) //cache for sanic speed (lists are references anyways) var/list/currentrun = src.currentrun - var/seconds = wait * 0.1 while(currentrun.len) var/obj/machinery/thing = currentrun[currentrun.len] currentrun.len-- - if(!QDELETED(thing) && thing.process(seconds) != PROCESS_KILL) + if(!QDELETED(thing) && thing.process(wait * 0.1) != PROCESS_KILL) if(thing.use_power) thing.auto_use_power() //add back the power state else diff --git a/code/controllers/subsystem/minor_mapping.dm b/code/controllers/subsystem/minor_mapping.dm index bd950e453e..d6cbf99f97 100644 --- a/code/controllers/subsystem/minor_mapping.dm +++ b/code/controllers/subsystem/minor_mapping.dm @@ -1,3 +1,5 @@ +#define PROB_MOUSE_SPAWN 98 + SUBSYSTEM_DEF(minor_mapping) name = "Minor Mapping" init_order = INIT_ORDER_MINOR_MAPPING @@ -5,29 +7,43 @@ SUBSYSTEM_DEF(minor_mapping) /datum/controller/subsystem/minor_mapping/Initialize(timeofday) trigger_migration(CONFIG_GET(number/mice_roundstart)) + // place_satchels() return ..() /datum/controller/subsystem/minor_mapping/proc/trigger_migration(num_mice=10) var/list/exposed_wires = find_exposed_wires() - var/mob/living/simple_animal/mouse/M + var/mob/living/simple_animal/mouse/mouse var/turf/proposed_turf while((num_mice > 0) && exposed_wires.len) proposed_turf = pick_n_take(exposed_wires) - if(!M) - M = new(proposed_turf) - else - M.forceMove(proposed_turf) - if(M.environment_is_safe()) - num_mice -= 1 - M = null + if(prob(PROB_MOUSE_SPAWN)) + if(!mouse) + mouse = new(proposed_turf) + else + mouse.forceMove(proposed_turf) + // else + // mouse = new /mob/living/simple_animal/hostile/regalrat/controlled(proposed_turf) + if(mouse.environment_is_safe()) + num_mice -= 1 + mouse = null + +// /datum/controller/subsystem/minor_mapping/proc/place_satchels(amount=10) +// var/list/turfs = find_satchel_suitable_turfs() + +// while(turfs.len && amount > 0) +// var/turf/T = pick_n_take(turfs) +// var/obj/item/storage/backpack/satchel/flat/F = new(T) + +// SEND_SIGNAL(F, COMSIG_OBJ_HIDE, T.intact) +// amount-- /proc/find_exposed_wires() var/list/exposed_wires = list() - exposed_wires.Cut() + var/list/all_turfs - for (var/z in SSmapping.levels_by_trait(ZTRAIT_STATION)) + for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION)) all_turfs += block(locate(1,1,z), locate(world.maxx,world.maxy,z)) for(var/turf/open/floor/plating/T in all_turfs) if(is_blocked_turf(T)) @@ -36,3 +52,15 @@ SUBSYSTEM_DEF(minor_mapping) exposed_wires += T return shuffle(exposed_wires) + +// /proc/find_satchel_suitable_turfs() +// var/list/suitable = list() + +// for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION)) +// for(var/t in block(locate(1,1,z), locate(world.maxx,world.maxy,z))) +// if(isfloorturf(t) && !isplatingturf(t)) +// suitable += t + +// return shuffle(suitable) + +#undef PROB_MOUSE_SPAWN diff --git a/code/controllers/subsystem/parallax.dm b/code/controllers/subsystem/parallax.dm index 7acb779dcc..7096c667e1 100644 --- a/code/controllers/subsystem/parallax.dm +++ b/code/controllers/subsystem/parallax.dm @@ -16,7 +16,7 @@ SUBSYSTEM_DEF(parallax) . = ..() if(prob(70)) //70% chance to pick a special extra layer random_layer = pick(/obj/screen/parallax_layer/random/space_gas, /obj/screen/parallax_layer/random/asteroids) - random_parallax_color = pick(COLOR_TEAL, COLOR_GREEN, COLOR_SILVER, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE, COLOR_PURPLE)//Special color for random_layer1. Has to be done here so everyone sees the same color. + random_parallax_color = pick(COLOR_TEAL, COLOR_GREEN, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE, COLOR_PURPLE)//Special color for random_layer1. Has to be done here so everyone sees the same color. [COLOR_SILVER] planet_y_offset = rand(100, 160) planet_x_offset = rand(100, 160) diff --git a/code/datums/cinematic.dm b/code/datums/cinematic.dm index 7b3081cb33..2648ae1eab 100644 --- a/code/datums/cinematic.dm +++ b/code/datums/cinematic.dm @@ -30,7 +30,7 @@ /datum/cinematic var/id = CINEMATIC_DEFAULT var/list/watching = list() //List of clients watching this - var/list/locked = list() //Who had mob_transforming set during the cinematic + var/list/locked = list() //Who had mob_transforming set during the cinematic var/is_global = FALSE //Global cinematics will override mob-specific ones var/obj/screen/cinematic/screen var/datum/callback/special_callback //For special effects synced with animation (explosions after the countdown etc) @@ -45,7 +45,7 @@ if(!CC) continue var/client/C = CC - //C.mob.clear_fullscreen("cinematic") + C.mob.clear_fullscreen("cinematic") C.screen -= screen watching = null QDEL_NULL(screen) @@ -54,7 +54,7 @@ if(!MM) continue var/mob/M = MM - M.mob_transforming = FALSE + M.mob_transforming = FALSE locked = null return ..() @@ -93,7 +93,7 @@ toggle_ooc(TRUE) /datum/cinematic/proc/show_to(mob/M, client/C) - //SIGNAL_HANDLER //must not wait. + SIGNAL_HANDLER if(!M.mob_transforming) locked += M @@ -101,7 +101,7 @@ if(!C) return watching += C - //M.overlay_fullscreen("cinematic",/obj/screen/fullscreen/cinematic_backdrop) + M.overlay_fullscreen("cinematic",/obj/screen/fullscreen/cinematic_backdrop) C.screen += screen //Sound helper @@ -122,7 +122,7 @@ sleep(50) /datum/cinematic/proc/replacement_cinematic(datum/source, datum/cinematic/other) - //SIGNAL_HANDLER + SIGNAL_HANDLER if(!is_global && other.is_global) //Allow it to play if we're local and it's global return NONE @@ -210,6 +210,20 @@ special() screen.icon_state = "summary_cult" +// /datum/cinematic/cult_fail +// id = CINEMATIC_CULT_FAIL + +// /datum/cinematic/cult_fail/content() +// screen.icon_state = "station_intact" +// sleep(20) +// cinematic_sound(sound('sound/creatures/narsie_rises.ogg')) +// sleep(60) +// cinematic_sound(sound('sound/effects/explosion_distant.ogg')) +// sleep(10) +// cinematic_sound(sound('sound/magic/demon_dies.ogg')) +// sleep(30) +// special() + /datum/cinematic/nuke_annihilation id = CINEMATIC_ANNIHILATION diff --git a/code/datums/components/combat_mode.dm b/code/datums/components/combat_mode.dm index b9952e9133..0ffc32542b 100644 --- a/code/datums/components/combat_mode.dm +++ b/code/datums/components/combat_mode.dm @@ -87,7 +87,7 @@ else to_chat(source, self_message) if(playsound) - source.playsound_local(source, 'sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay! + source.playsound_local(source, 'sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE, use_reverb= FALSE) //Sound from interbay! RegisterSignal(source, COMSIG_MOB_CLIENT_MOUSEMOVE, .proc/onMouseMove) RegisterSignal(source, COMSIG_MOVABLE_MOVED, .proc/on_move) RegisterSignal(source, COMSIG_MOB_CLIENT_MOVE, .proc/on_client_move) @@ -114,7 +114,7 @@ else to_chat(source, self_message) if(playsound) - source.playsound_local(source, 'sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the toggleon sound! + source.playsound_local(source, 'sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE, use_reverb= FALSE) //Slightly modified version of the toggleon sound! UnregisterSignal(source, list(COMSIG_MOB_CLIENT_MOUSEMOVE, COMSIG_MOVABLE_MOVED, COMSIG_MOB_CLIENT_MOVE)) if(hud_icon) hud_icon.combat_on = FALSE diff --git a/code/datums/components/footstep.dm b/code/datums/components/footstep.dm index f767c607a5..8b326ac424 100644 --- a/code/datums/components/footstep.dm +++ b/code/datums/components/footstep.dm @@ -46,7 +46,7 @@ var/mob/living/LM = parent if(!T.footstep || LM.buckled || !CHECK_MOBILITY(LM, MOBILITY_STAND) || LM.buckled || LM.throwing || (LM.movement_type & (VENTCRAWLING | FLYING))) if (LM.lying && !LM.buckled && !(!T.footstep || LM.movement_type & (VENTCRAWLING | FLYING))) //play crawling sound if we're lying - playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * volume) + playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * volume, falloff_distance = 1) return if(HAS_TRAIT(LM, TRAIT_SILENT_STEP)) @@ -75,7 +75,7 @@ if(!T) return if(isfile(footstep_sounds) || istext(footstep_sounds)) - playsound(T, footstep_sounds, volume) + playsound(T, footstep_sounds, volume, falloff_distance = 1) return var/turf_footstep switch(footstep_type) @@ -89,7 +89,7 @@ turf_footstep = T.footstep if(!turf_footstep) return - playsound(T, pick(footstep_sounds[turf_footstep][1]), footstep_sounds[turf_footstep][2] * volume, TRUE, footstep_sounds[turf_footstep][3] + e_range) + playsound(T, pick(footstep_sounds[turf_footstep][1]), footstep_sounds[turf_footstep][2] * volume, TRUE, footstep_sounds[turf_footstep][3] + e_range, falloff_distance = 1) /datum/component/footstep/proc/play_humanstep() var/turf/open/T = prepare_step() @@ -114,10 +114,10 @@ turf_footstep = T.footstep L = GLOB.footstep if(FOOTSTEP_MOB_SLIME) - playsound(T, 'sound/effects/footstep/slime1.ogg', 50 * volume) + playsound(T, 'sound/effects/footstep/slime1.ogg', 50 * volume, falloff_distance = 1) return if(FOOTSTEP_MOB_CRAWL) - playsound(T, 'sound/effects/footstep/crawl1.ogg', 50 * volume) + playsound(T, 'sound/effects/footstep/crawl1.ogg', 50 * volume, falloff_distance = 1) return special = TRUE else @@ -126,13 +126,13 @@ playsound(T, pick(GLOB.footstep[T.footstep][1]), GLOB.footstep[T.footstep][2] * volume, TRUE, - GLOB.footstep[T.footstep][3] + e_range) + GLOB.footstep[T.footstep][3] + e_range, falloff_distance = 1) return if(!special && H.dna.species.special_step_sounds) - playsound(T, pick(H.dna.species.special_step_sounds), 50, TRUE) + playsound(T, pick(H.dna.species.special_step_sounds), 50, TRUE, falloff_distance = 1) else playsound(T, pick(L[turf_footstep][1]), L[turf_footstep][2] * volume, TRUE, - L[turf_footstep][3] + e_range) + L[turf_footstep][3] + e_range, falloff_distance = 1) diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm index 0552a791ea..c82a4819c1 100644 --- a/code/datums/components/squeak.dm +++ b/code/datums/components/squeak.dm @@ -19,7 +19,14 @@ /// chance we'll be stopped from squeaking by cooldown when something crossing us squeaks var/cross_squeak_delay_chance = 33 // about 3 things can squeak at a time -/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override) + ///extra-range for this component's sound + var/sound_extra_range = -1 + ///when sounds start falling off for the squeak + var/sound_falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE + ///sound exponent for squeak. Defaults to 10 as squeaking is loud and annoying enough. + var/sound_falloff_exponent = 10 + +/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, extrarange, falloff_exponent, fallof_distance) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak) @@ -45,6 +52,12 @@ step_delay = step_delay_override if(isnum(use_delay_override)) use_delay = use_delay_override + if(isnum(extrarange)) + sound_extra_range = extrarange + if(isnum(falloff_exponent)) + sound_falloff_exponent = falloff_exponent + if(isnum(fallof_distance)) + sound_falloff_distance = fallof_distance /datum/component/squeak/UnregisterFromParent() if(!isatom(parent)) @@ -62,42 +75,42 @@ return ..() /datum/component/squeak/proc/play_squeak() - do_play_squeak() + SIGNAL_HANDLER + -/datum/component/squeak/proc/do_play_squeak(bypass_cooldown = FALSE) - if(!bypass_cooldown && ((last_squeak + squeak_delay) >= world.time)) - return FALSE if(prob(squeak_chance)) if(!override_squeak_sounds) - playsound(parent, pickweight(default_squeak_sounds), volume, 1, -1) + playsound(parent, pickweight(default_squeak_sounds), volume, TRUE, sound_extra_range, sound_falloff_exponent, falloff_distance = sound_falloff_distance) else - playsound(parent, pickweight(override_squeak_sounds), volume, 1, -1) - last_squeak = world.time + playsound(parent, pickweight(override_squeak_sounds), volume, TRUE, sound_extra_range, sound_falloff_exponent, falloff_distance = sound_falloff_distance) return TRUE - return FALSE /datum/component/squeak/proc/step_squeak() + SIGNAL_HANDLER + if(steps > step_delay) - do_play_squeak(TRUE) + play_squeak() steps = 0 else steps++ /datum/component/squeak/proc/play_squeak_crossed(datum/source, atom/movable/AM) + SIGNAL_HANDLER + if(isitem(AM)) var/obj/item/I = AM if(I.item_flags & ABSTRACT) return - else if(istype(AM, /obj/item/projectile)) - var/obj/item/projectile/P = AM - if(P.original != parent) - return + if(AM.movement_type & (FLYING|FLOATING) || !AM.has_gravity()) + return var/atom/current_parent = parent if(isturf(current_parent.loc)) - if(do_play_squeak()) + if(play_squeak()) SEND_SIGNAL(AM, COMSIG_CROSS_SQUEAKED) /datum/component/squeak/proc/use_squeak() + SIGNAL_HANDLER + if(last_use + use_delay < world.time) last_use = world.time play_squeak() @@ -118,6 +131,8 @@ RegisterSignal(holder, COMSIG_ATOM_DIR_CHANGE, .proc/holder_dir_change) /datum/component/squeak/proc/holder_dir_change(datum/source, old_dir, new_dir) + SIGNAL_HANDLER + //If the dir changes it means we're going through a bend in the pipes, let's pretend we bumped the wall if(old_dir != new_dir) play_squeak() diff --git a/code/datums/datum.dm b/code/datums/datum.dm index d11532a883..42580425ce 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -77,21 +77,21 @@ /** - * Default implementation of clean-up code. - * - * This should be overridden to remove all references pointing to the object being destroyed, if - * you do override it, make sure to call the parent and return it's return value by default - * - * Return an appropriate [QDEL_HINT][QDEL_HINT_QUEUE] to modify handling of your deletion; - * in most cases this is [QDEL_HINT_QUEUE]. - * - * The base case is responsible for doing the following - * * Erasing timers pointing to this datum - * * Erasing compenents on this datum - * * Notifying datums listening to signals from this datum that we are going away - * - * Returns [QDEL_HINT_QUEUE] - */ + * Default implementation of clean-up code. + * + * This should be overridden to remove all references pointing to the object being destroyed, if + * you do override it, make sure to call the parent and return it's return value by default + * + * Return an appropriate [QDEL_HINT][QDEL_HINT_QUEUE] to modify handling of your deletion; + * in most cases this is [QDEL_HINT_QUEUE]. + * + * The base case is responsible for doing the following + * * Erasing timers pointing to this datum + * * Erasing compenents on this datum + * * Notifying datums listening to signals from this datum that we are going away + * + * Returns [QDEL_HINT_QUEUE] + */ /datum/proc/Destroy(force=FALSE, ...) SHOULD_CALL_PARENT(TRUE) tag = null @@ -138,8 +138,6 @@ UnregisterSignal(target, signal_procs[target]) //END: ECS SHIT - SSsounds.free_datum_channels(src) //?? (not on tg) - return QDEL_HINT_QUEUE #ifdef DATUMVAR_DEBUGGING_MODE diff --git a/code/datums/diseases/heart_failure.dm b/code/datums/diseases/heart_failure.dm index aabb9ed144..ddccee3661 100644 --- a/code/datums/diseases/heart_failure.dm +++ b/code/datums/diseases/heart_failure.dm @@ -37,7 +37,7 @@ to_chat(H, "You feel [pick("full", "nauseated", "sweaty", "weak", "tired", "short on breath", "uneasy")].") if(3 to 4) if(!sound) - H.playsound_local(H, 'sound/health/slowbeat.ogg',40,0, channel = CHANNEL_HEARTBEAT) + H.playsound_local(H, 'sound/health/slowbeat.ogg', 40, FALSE, channel = CHANNEL_HEARTBEAT, use_reverb = FALSE) sound = TRUE if(prob(3)) to_chat(H, "You feel a sharp pain in your chest!") @@ -53,7 +53,7 @@ H.emote("cough") if(5) H.stop_sound_channel(CHANNEL_HEARTBEAT) - H.playsound_local(H, 'sound/effects/singlebeat.ogg', 100, 0) + H.playsound_local(H, 'sound/effects/singlebeat.ogg', 100, FALSE, use_reverb = FALSE) if(H.stat == CONSCIOUS) H.visible_message("[H] clutches at [H.p_their()] chest as if [H.p_their()] heart is stopping!") H.adjustStaminaLoss(60) diff --git a/code/datums/looping_sounds/_looping_sound.dm b/code/datums/looping_sounds/_looping_sound.dm index 8bee4f3d1c..6af3b3c993 100644 --- a/code/datums/looping_sounds/_looping_sound.dm +++ b/code/datums/looping_sounds/_looping_sound.dm @@ -18,8 +18,12 @@ var/list/atom/output_atoms var/mid_sounds var/mid_length + ///Override for volume of start sound + var/start_volume var/start_sound var/start_length + ///Override for volume of end sound + var/end_volume var/end_sound var/chance var/volume = 100 @@ -27,10 +31,9 @@ var/max_loops var/direct var/extra_range = 0 - var/falloff - + var/falloff_exponent var/timerid - var/init_timerid + var/falloff_distance /datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, _direct=FALSE) if(!mid_sounds) @@ -51,16 +54,13 @@ /datum/looping_sound/proc/start(atom/add_thing) if(add_thing) output_atoms |= add_thing - if(timerid || init_timerid) + if(timerid) return on_start() /datum/looping_sound/proc/stop(atom/remove_thing) if(remove_thing) output_atoms -= remove_thing - if(init_timerid) - deltimer(init_timerid) - init_timerid = null if(!timerid) return on_stop() @@ -76,18 +76,18 @@ if(!timerid) timerid = addtimer(CALLBACK(src, .proc/sound_loop, world.time), mid_length, TIMER_CLIENT_TIME | TIMER_STOPPABLE | TIMER_LOOP) -/datum/looping_sound/proc/play(soundfile) +/datum/looping_sound/proc/play(soundfile, volume_override) var/list/atoms_cache = output_atoms var/sound/S = sound(soundfile) if(direct) S.channel = SSsounds.random_available_channel() - S.volume = volume + S.volume = volume_override || volume //Use volume as fallback if theres no override for(var/i in 1 to atoms_cache.len) var/atom/thing = atoms_cache[i] if(direct) SEND_SOUND(thing, S) else - playsound(thing, S, volume, vary, extra_range, falloff) + playsound(thing, S, volume, vary, extra_range, falloff_exponent = falloff_exponent, falloff_distance = falloff_distance) /datum/looping_sound/proc/get_sound(starttime, _mid_sounds) . = _mid_sounds || mid_sounds @@ -97,10 +97,10 @@ /datum/looping_sound/proc/on_start() var/start_wait = 0 if(start_sound) - play(start_sound) + play(start_sound, start_volume) start_wait = start_length - init_timerid = addtimer(CALLBACK(src, .proc/sound_loop), start_wait, TIMER_CLIENT_TIME | TIMER_STOPPABLE) + addtimer(CALLBACK(src, .proc/sound_loop), start_wait, TIMER_CLIENT_TIME) /datum/looping_sound/proc/on_stop() if(end_sound) - play(end_sound) + play(end_sound, end_volume) diff --git a/code/datums/looping_sounds/machinery_sounds.dm b/code/datums/looping_sounds/machinery_sounds.dm index 4f6996bfdd..f7a3b46118 100644 --- a/code/datums/looping_sounds/machinery_sounds.dm +++ b/code/datums/looping_sounds/machinery_sounds.dm @@ -4,7 +4,7 @@ mid_sounds = list('sound/machines/shower/shower_mid1.ogg'=1,'sound/machines/shower/shower_mid2.ogg'=1,'sound/machines/shower/shower_mid3.ogg'=1) mid_length = 10 end_sound = 'sound/machines/shower/shower_end.ogg' - volume = 10 + volume = 20 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -12,6 +12,28 @@ mid_sounds = list('sound/machines/sm/supermatter1.ogg'=1,'sound/machines/sm/supermatter2.ogg'=1,'sound/machines/sm/supermatter3.ogg'=1) mid_length = 10 volume = 1 + extra_range = 25 + falloff_exponent = 10 + falloff_distance = 5 + vary = TRUE + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/datum/looping_sound/destabilized_crystal + mid_sounds = list('sound/machines/sm/loops/delamming.ogg' = 1) + mid_length = 60 + volume = 55 + extra_range = 15 + vary = TRUE + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// /datum/looping_sound/hypertorus +// mid_sounds = list('sound/machines/hypertorus/loops/hypertorus_nominal.ogg' = 1) +// mid_length = 60 +// volume = 55 +// extra_range = 15 +// vary = TRUE /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -32,7 +54,22 @@ mid_sounds = list('sound/machines/fryer/deep_fryer_1.ogg' = 1, 'sound/machines/fryer/deep_fryer_2.ogg' = 1) mid_length = 2 end_sound = 'sound/machines/fryer/deep_fryer_emerge.ogg' - volume = 5 + volume = 15 + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +/datum/looping_sound/grill + mid_sounds = list('sound/machines/grill/grillsizzle.ogg' = 1) + mid_length = 18 + volume = 50 + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/datum/looping_sound/deep_fryer + mid_length = 2 + mid_sounds = list('sound/machines/fryer/deep_fryer_1.ogg' = 1, 'sound/machines/fryer/deep_fryer_2.ogg' = 1) + volume = 30 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -46,9 +83,39 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/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 = 10 +// /datum/looping_sound/jackpot +// mid_length = 11 +// mid_sounds = list('sound/machines/roulettejackpot.ogg') +// volume = 85 +// vary = TRUE -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* +/datum/looping_sound/server + mid_sounds = list('sound/machines/tcomms/tcomms_mid1.ogg'=1,'sound/machines/tcomms/tcomms_mid2.ogg'=1,'sound/machines/tcomms/tcomms_mid3.ogg'=1,'sound/machines/tcomms/tcomms_mid4.ogg'=1,\ + 'sound/machines/tcomms/tcomms_mid5.ogg'=1,'sound/machines/tcomms/tcomms_mid6.ogg'=1,'sound/machines/tcomms/tcomms_mid7.ogg'=1) + mid_length = 1.8 SECONDS + extra_range = -11 + falloff_distance = 1 + falloff_exponent = 5 + volume = 50 +*/ +// /datum/looping_sound/computer +// start_sound = 'sound/machines/computer/computer_start.ogg' +// start_length = 7.2 SECONDS +// start_volume = 10 +// mid_sounds = list('sound/machines/computer/computer_mid1.ogg'=1, 'sound/machines/computer/computer_mid2.ogg'=1) +// mid_length = 1.8 SECONDS +// end_sound = 'sound/machines/computer/computer_end.ogg' +// end_volume = 10 +// volume = 2 +// falloff_exponent = 5 //Ultra quiet very fast +// extra_range = -12 +// falloff_distance = 1 //Instant falloff after initial tile + +// /datum/looping_sound/gravgen +// mid_sounds = list('sound/machines/gravgen/gravgen_mid1.ogg'=1,'sound/machines/gravgen/gravgen_mid2.ogg'=1,'sound/machines/gravgen/gravgen_mid3.ogg'=1,'sound/machines/gravgen/gravgen_mid4.ogg'=1,) +// mid_length = 1.8 SECONDS +// extra_range = 10 +// volume = 70 +// falloff_distance = 5 +// falloff_exponent = 20 diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 706d2bb9bf..2ffd556dc1 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -100,51 +100,54 @@ eat(AM) . = ..() -/obj/machinery/recycler/proc/eat(atom/AM0) - if(stat & (BROKEN|NOPOWER) || safety_mode) +/obj/machinery/recycler/proc/eat(atom/movable/AM0, sound=TRUE) + if(stat & (BROKEN|NOPOWER)) return + if(safety_mode) + return + if(!isturf(AM0.loc)) + return //I don't know how you called Crossed() but stop it. - var/list/to_eat + var/list/to_eat = AM0.GetAllContents() - to_eat = list(AM0) + var/living_detected = FALSE //technically includes silicons as well but eh + var/list/nom = list() + var/list/crunchy_nom = list() //Mobs have to be handled differently so they get a different list instead of checking them multiple times. - var/items_recycled = 0 - var/buzz = FALSE for(var/i in to_eat) var/atom/movable/AM = i - if(QDELETED(AM)) - continue - var/obj/item/bodypart/head/as_head = AM - var/obj/item/mmi/as_mmi = AM - var/brain_holder = istype(AM, /obj/item/organ/brain) || (istype(as_head) && as_head.brain) || (istype(as_mmi) && as_mmi.brain) || istype(AM, /obj/item/dullahan_relay) - if(brain_holder) - if(obj_flags & EMAGGED) - continue - else - emergency_stop(AM) - return + if(istype(AM, /obj/item)) + var/obj/item/bodypart/head/as_head = AM + var/obj/item/mmi/as_mmi = AM + if(istype(AM, /obj/item/organ/brain) || (istype(as_head) && as_head.brain) || (istype(as_mmi) && as_mmi.brain) || istype(AM, /obj/item/dullahan_relay)) + living_detected = TRUE + nom += AM else if(isliving(AM)) - if((obj_flags & EMAGGED)||((!allowed(AM))&&(!ishuman(AM)))) - to_eat += crush_living(AM) - else - emergency_stop(AM) - return - else if(isitem(AM)) - var/obj/O = AM - if(O.resistance_flags & INDESTRUCTIBLE) - buzz = TRUE - O.forceMove(loc) - else - to_eat += recycle_item(AM) - items_recycled++ - else - buzz = TRUE - AM.forceMove(loc) - - if(items_recycled) - playsound(src, item_recycle_sound, 50, 1) - if(buzz) - playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0) + living_detected = TRUE + crunchy_nom += AM + var/not_eaten = to_eat.len - nom.len - crunchy_nom.len + if(living_detected) // First, check if we have any living beings detected. + if(obj_flags & EMAGGED) + for(var/CRUNCH in crunchy_nom) // Eat them and keep going because we don't care about safety. + if(isliving(CRUNCH)) // MMIs and brains will get eaten like normal items + crush_living(CRUNCH) + else // Stop processing right now without eating anything. + emergency_stop() + return + for(var/nommed in nom) + recycle_item(nommed) + if(nom.len && sound) + playsound(src, item_recycle_sound, (50 + nom.len*5), TRUE, nom.len, ignore_walls = (nom.len - 10)) // As a substitute for playing 50 sounds at once. + if(not_eaten) + playsound(src, 'sound/machines/buzz-sigh.ogg', (50 + not_eaten*5), FALSE, not_eaten, ignore_walls = (not_eaten - 10)) // Ditto. + if(!ismob(AM0)) + AM0.moveToNullspace() + qdel(AM0) + else // Lets not move a mob to nullspace and qdel it, yes? + for(var/i in AM0.contents) + var/atom/movable/content = i + content.moveToNullspace() + qdel(content) /obj/machinery/recycler/proc/recycle_item(obj/item/I) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 1c75f1e533..b98054655c 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -11,7 +11,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb name = "item" icon = 'icons/obj/items_and_weapons.dmi' blocks_emissive = EMISSIVE_BLOCK_GENERIC - + attack_hand_speed = 0 attack_hand_is_action = FALSE attack_hand_unwieldlyness = 0 @@ -428,18 +428,19 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb /obj/item/proc/talk_into(mob/M, input, channel, spans, datum/language/language) return ITALICS | REDUCE_RANGE -/obj/item/proc/dropped(mob/user) +/// Called when a mob drops an item. +/obj/item/proc/dropped(mob/user, silent = FALSE) SHOULD_CALL_PARENT(TRUE) - current_equipped_slot = null for(var/X in actions) var/datum/action/A = X A.Remove(user) if(item_flags & DROPDEL) qdel(src) item_flags &= ~IN_INVENTORY - if(SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user) & COMPONENT_DROPPED_RELOCATION) - . = ITEM_RELOCATED_BY_DROPPED - user.update_equipment_speed_mods() + SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user) + // if(!silent) + // playsound(src, drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE) + user?.update_equipment_speed_mods() // called just as an item is picked up (loc is not yet changed) /obj/item/proc/pickup(mob/user) @@ -473,23 +474,32 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb over.MouseDrop_T(src,usr) return -// called after an item is placed in an equipment slot -// user is mob that equipped it -// slot uses the slot_X defines found in setup.dm -// for items that can be placed in multiple slots -// note this isn't called during the initial dressing of a player -/obj/item/proc/equipped(mob/user, slot) +/** + * Called after an item is placed in an equipment slot. + * + * Note that hands count as slots. + * + * Arguments: + * * user is mob that equipped it + * * slot uses the slot_X defines found in setup.dm for items that can be placed in multiple slots + * * Initial is used to indicate whether or not this is the initial equipment (job datums etc) or just a player doing it + */ +/obj/item/proc/equipped(mob/user, slot, initial = FALSE) SHOULD_CALL_PARENT(TRUE) - . = SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot) - current_equipped_slot = slot - if(!(. & COMPONENT_NO_GRANT_ACTIONS)) - for(var/X in actions) - var/datum/action/A = X - if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot. - A.Grant(user) + SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot) + for(var/X in actions) + var/datum/action/A = X + if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot. + A.Grant(user) item_flags |= IN_INVENTORY + // if(!initial) + // if(equip_sound && (slot_flags & slot)) + // playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE) + // else if(slot == ITEM_SLOT_HANDS) + // playsound(src, pickup_sound, PICKUP_SOUND_VOLUME, ignore_walls = FALSE) user.update_equipment_speed_mods() + //Overlays for the worn overlay so you can overlay while you overlay //eg: ammo counters, primed grenade flashing, etc. //"icon_file" is used automatically for inhands etc. to make sure it gets the right inhand file @@ -656,6 +666,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb else playsound(hit_atom, 'sound/weapons/throwtap.ogg', 1, volume, -1) + // else + // playsound(src, drop_sound, YEET_SOUND_VOLUME, ignore_walls = FALSE) return hit_atom.hitby(src, 0, itempush, throwingdatum=throwingdatum) /obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, messy_throw = TRUE) diff --git a/code/modules/admin/sound_emitter.dm b/code/modules/admin/sound_emitter.dm index 56c778dc85..ad9c995aa1 100644 --- a/code/modules/admin/sound_emitter.dm +++ b/code/modules/admin/sound_emitter.dm @@ -52,11 +52,9 @@ edit_emitter(user) /obj/effect/sound_emitter/AltClick(mob/user) - . = ..() if(check_rights_for(user.client, R_SOUNDS)) activate(user) - to_chat(user, "Sound emitter activated.") - return TRUE + to_chat(user, "Sound emitter activated.", confidential = TRUE) /obj/effect/sound_emitter/proc/edit_emitter(mob/user) var/dat = "" @@ -84,20 +82,20 @@ if(!new_label) return maptext = new_label - to_chat(user, "Label set to [maptext].") + to_chat(user, "Label set to [maptext].", confidential = TRUE) if(href_list["edit_sound_file"]) var/new_file = input(user, "Choose a sound file.", "Sound Emitter") as null|sound if(!new_file) return sound_file = new_file - to_chat(user, "New sound file set to [sound_file].") + to_chat(user, "New sound file set to [sound_file].", confidential = TRUE) if(href_list["edit_volume"]) var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num if(isnull(new_volume)) return new_volume = clamp(new_volume, 0, 100) sound_volume = new_volume - to_chat(user, "Volume set to [sound_volume]%.") + to_chat(user, "Volume set to [sound_volume]%.", confidential = TRUE) if(href_list["edit_mode"]) var/new_mode var/mode_list = list("Local (normal sound)" = SOUND_EMITTER_LOCAL, "Direct (not affected by environment/location)" = SOUND_EMITTER_DIRECT) @@ -105,7 +103,7 @@ if(!new_mode) return motus_operandi = mode_list[new_mode] - to_chat(user, "Mode set to [motus_operandi].") + to_chat(user, "Mode set to [motus_operandi].", confidential = TRUE) if(href_list["edit_range"]) var/new_range var/range_list = list("Radius (all mobs within a radius)" = SOUND_EMITTER_RADIUS, "Z-Level (all mobs on the same z)" = SOUND_EMITTER_ZLEVEL, "Global (all players)" = SOUND_EMITTER_GLOBAL) @@ -113,14 +111,14 @@ if(!new_range) return emitter_range = range_list[new_range] - to_chat(user, "Range set to [emitter_range].") + to_chat(user, "Range set to [emitter_range].", confidential = TRUE) if(href_list["edit_radius"]) var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num if(isnull(new_radius)) return new_radius = clamp(new_radius, 0, 127) play_radius = new_radius - to_chat(user, "Audible radius set to [play_radius].") + to_chat(user, "Audible radius set to [play_radius].", confidential = TRUE) if(href_list["play"]) activate(user) edit_emitter(user) //Refresh the UI to see our changes diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 6e188a6c7a..c9a5cafd9b 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -4,12 +4,10 @@ if(!check_rights(R_SOUNDS)) return + var/freq = 1 var/vol = input(usr, "What volume would you like the sound to play at?",, 100) as null|num if(!vol) return - var/freq = input(usr, "What frequency would you like the sound to play at?",, 1) as null|num - if(!freq) - freq = 1 vol = clamp(vol, 1, 100) var/sound/admin_sound = new() @@ -18,14 +16,14 @@ admin_sound.channel = CHANNEL_ADMIN admin_sound.frequency = freq admin_sound.wait = 1 - admin_sound.repeat = 0 + admin_sound.repeat = FALSE admin_sound.status = SOUND_STREAM admin_sound.volume = vol var/res = alert(usr, "Show the title of this song to the players?",, "Yes","No", "Cancel") switch(res) if("Yes") - to_chat(world, "An admin played: [S]") + to_chat(world, "An admin played: [S]", confidential = TRUE) if("Cancel") return @@ -49,7 +47,7 @@ log_admin("[key_name(src)] played a local sound [S]") message_admins("[key_name_admin(src)] played a local sound [S]") - playsound(get_turf(src.mob), S, 50, 0, 0) + playsound(get_turf(src.mob), S, 50, FALSE, FALSE) SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Local Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/play_web_sound() diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm index 7a34af4d13..28ec6c016e 100644 --- a/code/modules/antagonists/changeling/changeling.dm +++ b/code/modules/antagonists/changeling/changeling.dm @@ -358,7 +358,7 @@ to_chat(owner.current, "You are [changelingID], a changeling! You have absorbed and taken the form of a human.") to_chat(owner.current, "Use say \"[MODE_TOKEN_CHANGELING] message\" to communicate with your fellow changelings.") to_chat(owner.current, "You must complete the following tasks:") - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ling_aler.ogg', 100, FALSE, pressure_affected = FALSE) + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ling_aler.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE) owner.announce_objectives() diff --git a/code/modules/antagonists/clockcult/clockcult.dm b/code/modules/antagonists/clockcult/clockcult.dm index b6ed7dfe65..0c25e28870 100644 --- a/code/modules/antagonists/clockcult/clockcult.dm +++ b/code/modules/antagonists/clockcult/clockcult.dm @@ -60,7 +60,7 @@ owner.current.visible_message("[owner.current]'s eyes glow a blazing yellow!", null, null, 7, owner.current) //don't show the owner this message to_chat(owner.current, "Assist your new companions in their righteous efforts. Your goal is theirs, and theirs yours. You serve the Clockwork \ Justiciar above all else. Perform his every whim without hesitation.") - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/clockcultalr.ogg', 70, FALSE, pressure_affected = FALSE) + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/clockcultalr.ogg', 70, FALSE, pressure_affected = FALSE, use_reverb = FALSE) /datum/antagonist/clockcult/on_gain() var/mob/living/current = owner.current diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm index a2ec4a47a4..2e8962178c 100644 --- a/code/modules/antagonists/cult/cult.dm +++ b/code/modules/antagonists/cult/cult.dm @@ -61,7 +61,7 @@ /datum/antagonist/cult/greet() to_chat(owner, "You are a member of the cult!") - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/bloodcult.ogg', 100, FALSE, pressure_affected = FALSE)//subject to change + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/bloodcult.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)//subject to change owner.announce_objectives() /datum/antagonist/cult/on_gain() diff --git a/code/modules/antagonists/nukeop/nukeop.dm b/code/modules/antagonists/nukeop/nukeop.dm index 652b19a8e7..c618edf862 100644 --- a/code/modules/antagonists/nukeop/nukeop.dm +++ b/code/modules/antagonists/nukeop/nukeop.dm @@ -43,7 +43,7 @@ return TRUE /datum/antagonist/nukeop/greet() - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0) + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0, use_reverb = FALSE) to_chat(owner, "You are a [nuke_team ? nuke_team.syndicate_name : "syndicate"] agent!") owner.announce_objectives() @@ -171,7 +171,7 @@ owner.current.real_name = "Syndicate [title]" /datum/antagonist/nukeop/leader/greet() - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0) + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0, use_reverb = FALSE) to_chat(owner, "You are the Syndicate [title] for this mission. You are responsible for the distribution of telecrystals and your ID is the only one who can open the launch bay doors.") to_chat(owner, "If you feel you are not up to this task, give your ID to another operative.") to_chat(owner, "In your hand you will find a special item capable of triggering a greater challenge for your team. Examine it carefully and consult with your fellow operatives before activating it.") diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index 47a9c59274..fa0876c324 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -114,7 +114,7 @@ if(traitor_kind.finalize_traitor(src)) if(should_equip) equip(silent) - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE) + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE) /datum/antagonist/traitor/antag_panel_objectives() . += "Traitor class: [traitor_kind.employer]
" diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index fbf2d27c31..823f759e67 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -911,10 +911,10 @@ if(!istype(apc) || QDELETED(apc) || apc.stat & BROKEN) to_chat(src, "Hack aborted. The designated APC no longer exists on the power network.") - playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1) + playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, TRUE, ignore_walls = FALSE) else if(apc.aidisabled) to_chat(src, "Hack aborted. \The [apc] is no longer responding to our systems.") - playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 1) + playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, TRUE, ignore_walls = FALSE) else malf_picker.processing_time += 10 @@ -923,7 +923,7 @@ apc.locked = TRUE apc.coverlocked = TRUE - playsound(get_turf(src), 'sound/machines/ding.ogg', 50, 1) + playsound(get_turf(src), 'sound/machines/ding.ogg', 50, TRUE, ignore_walls = FALSE) to_chat(src, "Hack complete. \The [apc] is now under your exclusive control.") apc.update_icon() diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index f385b640aa..1e82a601ea 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -348,11 +348,11 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) /obj/machinery/power/supermatter_crystal/proc/alarm() switch(get_status()) if(SUPERMATTER_DELAMINATING) - playsound(src, 'sound/misc/bloblarm.ogg', 100) + playsound(src, 'sound/misc/bloblarm.ogg', 100, FALSE, 40, 30, falloff_distance = 10) if(SUPERMATTER_EMERGENCY) - playsound(src, 'sound/machines/engine_alert1.ogg', 100) + playsound(src, 'sound/machines/engine_alert1.ogg', 100, FALSE, 30, 30, falloff_distance = 10) if(SUPERMATTER_DANGER) - playsound(src, 'sound/machines/engine_alert2.ogg', 100) + playsound(src, 'sound/machines/engine_alert2.ogg', 100, FALSE, 30, 30, falloff_distance = 10) if(SUPERMATTER_WARNING) playsound(src, 'sound/machines/terminal_alert.ogg', 75) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 1c3a0d230f..22f6ed4572 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -158,7 +158,7 @@ user.UseStaminaBuffer(safe_cost) if(suppressed) - playsound(user, fire_sound, 10, 1) + playsound(user, fire_sound, 10, TRUE, ignore_walls = FALSE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0) else playsound(user, fire_sound, 50, 1) if(message) diff --git a/sound/machines/grill/grillsizzle.ogg b/sound/machines/grill/grillsizzle.ogg new file mode 100644 index 0000000000..056ce45941 Binary files /dev/null and b/sound/machines/grill/grillsizzle.ogg differ