Immursive Audio 2

This commit is contained in:
Letter N
2020-12-24 11:06:49 +08:00
parent 35edf3589b
commit 56fb81d02c
29 changed files with 388 additions and 210 deletions

View File

@@ -149,6 +149,15 @@
/obj/screen/fullscreen/color_vision/blue /obj/screen/fullscreen/color_vision/blue
color = "#0000ff" 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 /obj/screen/fullscreen/lighting_backdrop
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
icon_state = "flash" icon_state = "flash"

View File

@@ -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_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/layer_2(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/planet(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_cached += new /obj/screen/parallax_layer/layer_3(null, C.view)
C.parallax_layers = C.parallax_layers_cached.Copy() C.parallax_layers = C.parallax_layers_cached.Copy()
@@ -52,12 +54,12 @@
switch(C.prefs.parallax) switch(C.prefs.parallax)
if (PARALLAX_INSANE) if (PARALLAX_INSANE)
C.parallax_throttle = FALSE C.parallax_throttle = FALSE
C.parallax_layers_max = 4 C.parallax_layers_max = 5
return TRUE return TRUE
if (PARALLAX_MED) if (PARALLAX_MED)
C.parallax_throttle = PARALLAX_DELAY_MED C.parallax_throttle = PARALLAX_DELAY_MED
C.parallax_layers_max = 2 C.parallax_layers_max = 3
return TRUE return TRUE
if (PARALLAX_LOW) if (PARALLAX_LOW)
@@ -68,8 +70,9 @@
if (PARALLAX_DISABLE) if (PARALLAX_DISABLE)
return FALSE return FALSE
//This is high parallax.
C.parallax_throttle = PARALLAX_DELAY_DEFAULT C.parallax_throttle = PARALLAX_DELAY_DEFAULT
C.parallax_layers_max = 3 C.parallax_layers_max = 4
return TRUE return TRUE
/datum/hud/proc/update_parallax_pref(mob/viewmob) /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)]" L.screen_loc = "CENTER-7:[round(L.offset_x,1)],CENTER-7:[round(L.offset_y,1)]"
/atom/movable/proc/update_parallax_contents() /atom/movable/proc/update_parallax_contents()
set waitfor = FALSE
if(length(client_mobs_in_contents)) if(length(client_mobs_in_contents))
for(var/thing in client_mobs_in_contents) for(var/thing in client_mobs_in_contents)
var/mob/M = thing 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() M.hud_used.update_parallax()
/mob/proc/update_parallax_teleport() //used for arrivals shuttle /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) var/area/areaobj = get_area(client.eye)
hud_used.set_parallax_movedir(areaobj.parallax_movedir, TRUE) hud_used.set_parallax_movedir(areaobj.parallax_movedir, TRUE)

View File

@@ -28,8 +28,6 @@
. = ..() . = ..()
filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE) 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 = -10)
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15) filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15)
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20) filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20)
@@ -93,13 +91,6 @@
else else
remove_filter("ambient_occlusion") 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. ///Contains all shadow cone masks, whose image overrides are displayed only to their respective owners.
/obj/screen/plane_master/field_of_vision /obj/screen/plane_master/field_of_vision
name = "field of vision mask plane master" name = "field of vision mask plane master"
@@ -135,10 +126,14 @@
blend_mode = BLEND_MULTIPLY blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT 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() /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_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_UNBLOCKABLE_RENDER_TARGET, flags = MASK_INVERSE)
/** /**
* Things placed on this mask the lighting plane. Doesn't render directly. * Things placed on this mask the lighting plane. Doesn't render directly.
@@ -186,7 +181,6 @@
render_target = EMISSIVE_BLOCKER_RENDER_TARGET render_target = EMISSIVE_BLOCKER_RENDER_TARGET
///Contains space parallax ///Contains space parallax
/obj/screen/plane_master/parallax /obj/screen/plane_master/parallax
name = "parallax plane master" name = "parallax plane master"
plane = PLANE_SPACE_PARALLAX plane = PLANE_SPACE_PARALLAX
@@ -197,12 +191,16 @@
name = "parallax whitifier plane master" name = "parallax whitifier plane master"
plane = PLANE_SPACE 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 /obj/screen/plane_master/camera_static
name = "camera static plane master" name = "camera static plane master"
plane = CAMERA_STATIC_PLANE plane = CAMERA_STATIC_PLANE
appearance_flags = PLANE_MASTER appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY 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

View File

@@ -12,9 +12,14 @@
layer = HUD_LAYER layer = HUD_LAYER
plane = HUD_PLANE plane = HUD_PLANE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF 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 appearance_flags = APPEARANCE_UI
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally. /// 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. var/obj/master = null
/// A reference to the owner HUD, if any.
var/datum/hud/hud = null
/** /**
* Map name assigned to this object. * Map name assigned to this object.
* Automatically set by /client/proc/add_obj_to_map. * Automatically set by /client/proc/add_obj_to_map.
@@ -60,7 +65,17 @@
name = "swap hand" name = "swap hand"
/obj/screen/swap_hand/Click() /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 return 1
/obj/screen/craft /obj/screen/craft
@@ -96,17 +111,27 @@
H.open_language_menu(usr) H.open_language_menu(usr)
/obj/screen/inventory /obj/screen/inventory
var/slot_id // The indentifier for the slot. It has nothing to do with ID cards. /// The identifier for the slot. It has nothing to do with ID cards.
var/icon_empty // Icon when empty. For now used only by humans. var/slot_id
var/icon_full // Icon when contains an item. For now used only by humans. /// 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() var/list/object_overlays = list()
layer = HUD_LAYER layer = HUD_LAYER
plane = HUD_PLANE plane = HUD_PLANE
/obj/screen/inventory/Click(location, control, params) /obj/screen/inventory/Click(location, control, params)
if(hud?.mymob && (hud.mymob != usr)) // At this point in client Click() code we have passed the 1/10 sec check and little else
return // We don't even know if it's a middle click
// just redirect clicks // 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) if(hud?.mymob && slot_id)
var/obj/item/inv_item = hud.mymob.get_item_by_slot(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) var/image/item_overlay = image(holding)
item_overlay.alpha = 92 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" item_overlay.color = "#FF0000"
else else
item_overlay.color = "#00ff00" item_overlay.color = "#00ff00"
object_overlays += item_overlay cut_overlay(object_overlays)
// object_overlay = item_overlay
add_overlay(object_overlays) add_overlay(object_overlays)
/obj/screen/inventory/hand /obj/screen/inventory/hand
@@ -187,10 +213,17 @@
/obj/screen/inventory/hand/Click(location, control, params) /obj/screen/inventory/hand/Click(location, control, params)
if(hud?.mymob && (hud.mymob != usr)) // At this point in client Click() code we have passed the 1/10 sec check and little else
return // We don't even know if it's a middle click
var/mob/user = hud.mymob var/mob/user = hud?.mymob
// just redirect clicks 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) if(user.active_hand_index == held_index)
var/obj/item/I = user.get_active_held_item() var/obj/item/I = user.get_active_held_item()

View File

@@ -18,6 +18,7 @@ SUBSYSTEM_DEF(fire_burning)
//cache for sanic speed (lists are references anyways) //cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun var/list/currentrun = src.currentrun
var/delta_time = wait * 0.1
while(currentrun.len) while(currentrun.len)
var/obj/O = currentrun[currentrun.len] var/obj/O = currentrun[currentrun.len]
@@ -28,10 +29,12 @@ SUBSYSTEM_DEF(fire_burning)
return return
continue continue
if(O.resistance_flags & ON_FIRE)
O.take_damage(20, BURN, "fire", 0) if(O.resistance_flags & ON_FIRE) //in case an object is extinguished while still in currentrun
else if(!(O.resistance_flags & FIRE_PROOF))
processing -= O O.take_damage(10 * delta_time, BURN, "fire", 0)
else
O.extinguish()
if (MC_TICK_CHECK) if (MC_TICK_CHECK)
return return

View File

@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(machines)
name = "Machines" name = "Machines"
init_order = INIT_ORDER_MACHINES init_order = INIT_ORDER_MACHINES
flags = SS_KEEP_TIMING flags = SS_KEEP_TIMING
wait = 2 SECONDS
var/list/processing = list() var/list/processing = list()
var/list/currentrun = list() var/list/currentrun = list()
var/list/powernets = list() var/list/powernets = list()
@@ -27,7 +28,7 @@ SUBSYSTEM_DEF(machines)
return ..() return ..()
/datum/controller/subsystem/machines/fire(resumed = 0) /datum/controller/subsystem/machines/fire(resumed = FALSE)
if (!resumed) if (!resumed)
for(var/datum/powernet/Powernet in powernets) for(var/datum/powernet/Powernet in powernets)
Powernet.reset() //reset the power state. Powernet.reset() //reset the power state.
@@ -36,11 +37,10 @@ SUBSYSTEM_DEF(machines)
//cache for sanic speed (lists are references anyways) //cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun var/list/currentrun = src.currentrun
var/seconds = wait * 0.1
while(currentrun.len) while(currentrun.len)
var/obj/machinery/thing = currentrun[currentrun.len] var/obj/machinery/thing = currentrun[currentrun.len]
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) if(thing.use_power)
thing.auto_use_power() //add back the power state thing.auto_use_power() //add back the power state
else else

View File

@@ -1,3 +1,5 @@
#define PROB_MOUSE_SPAWN 98
SUBSYSTEM_DEF(minor_mapping) SUBSYSTEM_DEF(minor_mapping)
name = "Minor Mapping" name = "Minor Mapping"
init_order = INIT_ORDER_MINOR_MAPPING init_order = INIT_ORDER_MINOR_MAPPING
@@ -5,29 +7,43 @@ SUBSYSTEM_DEF(minor_mapping)
/datum/controller/subsystem/minor_mapping/Initialize(timeofday) /datum/controller/subsystem/minor_mapping/Initialize(timeofday)
trigger_migration(CONFIG_GET(number/mice_roundstart)) trigger_migration(CONFIG_GET(number/mice_roundstart))
// place_satchels()
return ..() return ..()
/datum/controller/subsystem/minor_mapping/proc/trigger_migration(num_mice=10) /datum/controller/subsystem/minor_mapping/proc/trigger_migration(num_mice=10)
var/list/exposed_wires = find_exposed_wires() 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 var/turf/proposed_turf
while((num_mice > 0) && exposed_wires.len) while((num_mice > 0) && exposed_wires.len)
proposed_turf = pick_n_take(exposed_wires) proposed_turf = pick_n_take(exposed_wires)
if(!M) if(prob(PROB_MOUSE_SPAWN))
M = new(proposed_turf) if(!mouse)
else mouse = new(proposed_turf)
M.forceMove(proposed_turf) else
if(M.environment_is_safe()) mouse.forceMove(proposed_turf)
num_mice -= 1 // else
M = null // 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() /proc/find_exposed_wires()
var/list/exposed_wires = list() var/list/exposed_wires = list()
exposed_wires.Cut()
var/list/all_turfs 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)) all_turfs += block(locate(1,1,z), locate(world.maxx,world.maxy,z))
for(var/turf/open/floor/plating/T in all_turfs) for(var/turf/open/floor/plating/T in all_turfs)
if(is_blocked_turf(T)) if(is_blocked_turf(T))
@@ -36,3 +52,15 @@ SUBSYSTEM_DEF(minor_mapping)
exposed_wires += T exposed_wires += T
return shuffle(exposed_wires) 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

View File

@@ -16,7 +16,7 @@ SUBSYSTEM_DEF(parallax)
. = ..() . = ..()
if(prob(70)) //70% chance to pick a special extra layer 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_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_y_offset = rand(100, 160)
planet_x_offset = rand(100, 160) planet_x_offset = rand(100, 160)

View File

@@ -30,7 +30,7 @@
/datum/cinematic /datum/cinematic
var/id = CINEMATIC_DEFAULT var/id = CINEMATIC_DEFAULT
var/list/watching = list() //List of clients watching this 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/is_global = FALSE //Global cinematics will override mob-specific ones
var/obj/screen/cinematic/screen var/obj/screen/cinematic/screen
var/datum/callback/special_callback //For special effects synced with animation (explosions after the countdown etc) var/datum/callback/special_callback //For special effects synced with animation (explosions after the countdown etc)
@@ -45,7 +45,7 @@
if(!CC) if(!CC)
continue continue
var/client/C = CC var/client/C = CC
//C.mob.clear_fullscreen("cinematic") C.mob.clear_fullscreen("cinematic")
C.screen -= screen C.screen -= screen
watching = null watching = null
QDEL_NULL(screen) QDEL_NULL(screen)
@@ -54,7 +54,7 @@
if(!MM) if(!MM)
continue continue
var/mob/M = MM var/mob/M = MM
M.mob_transforming = FALSE M.mob_transforming = FALSE
locked = null locked = null
return ..() return ..()
@@ -93,7 +93,7 @@
toggle_ooc(TRUE) toggle_ooc(TRUE)
/datum/cinematic/proc/show_to(mob/M, client/C) /datum/cinematic/proc/show_to(mob/M, client/C)
//SIGNAL_HANDLER //must not wait. SIGNAL_HANDLER
if(!M.mob_transforming) if(!M.mob_transforming)
locked += M locked += M
@@ -101,7 +101,7 @@
if(!C) if(!C)
return return
watching += C watching += C
//M.overlay_fullscreen("cinematic",/obj/screen/fullscreen/cinematic_backdrop) M.overlay_fullscreen("cinematic",/obj/screen/fullscreen/cinematic_backdrop)
C.screen += screen C.screen += screen
//Sound helper //Sound helper
@@ -122,7 +122,7 @@
sleep(50) sleep(50)
/datum/cinematic/proc/replacement_cinematic(datum/source, datum/cinematic/other) /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 if(!is_global && other.is_global) //Allow it to play if we're local and it's global
return NONE return NONE
@@ -210,6 +210,20 @@
special() special()
screen.icon_state = "summary_cult" 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 /datum/cinematic/nuke_annihilation
id = CINEMATIC_ANNIHILATION id = CINEMATIC_ANNIHILATION

View File

@@ -87,7 +87,7 @@
else else
to_chat(source, self_message) to_chat(source, self_message)
if(playsound) 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_MOB_CLIENT_MOUSEMOVE, .proc/onMouseMove)
RegisterSignal(source, COMSIG_MOVABLE_MOVED, .proc/on_move) RegisterSignal(source, COMSIG_MOVABLE_MOVED, .proc/on_move)
RegisterSignal(source, COMSIG_MOB_CLIENT_MOVE, .proc/on_client_move) RegisterSignal(source, COMSIG_MOB_CLIENT_MOVE, .proc/on_client_move)
@@ -114,7 +114,7 @@
else else
to_chat(source, self_message) to_chat(source, self_message)
if(playsound) 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)) UnregisterSignal(source, list(COMSIG_MOB_CLIENT_MOUSEMOVE, COMSIG_MOVABLE_MOVED, COMSIG_MOB_CLIENT_MOVE))
if(hud_icon) if(hud_icon)
hud_icon.combat_on = FALSE hud_icon.combat_on = FALSE

View File

@@ -46,7 +46,7 @@
var/mob/living/LM = parent 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(!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 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 return
if(HAS_TRAIT(LM, TRAIT_SILENT_STEP)) if(HAS_TRAIT(LM, TRAIT_SILENT_STEP))
@@ -75,7 +75,7 @@
if(!T) if(!T)
return return
if(isfile(footstep_sounds) || istext(footstep_sounds)) if(isfile(footstep_sounds) || istext(footstep_sounds))
playsound(T, footstep_sounds, volume) playsound(T, footstep_sounds, volume, falloff_distance = 1)
return return
var/turf_footstep var/turf_footstep
switch(footstep_type) switch(footstep_type)
@@ -89,7 +89,7 @@
turf_footstep = T.footstep turf_footstep = T.footstep
if(!turf_footstep) if(!turf_footstep)
return 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() /datum/component/footstep/proc/play_humanstep()
var/turf/open/T = prepare_step() var/turf/open/T = prepare_step()
@@ -114,10 +114,10 @@
turf_footstep = T.footstep turf_footstep = T.footstep
L = GLOB.footstep L = GLOB.footstep
if(FOOTSTEP_MOB_SLIME) 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 return
if(FOOTSTEP_MOB_CRAWL) 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 return
special = TRUE special = TRUE
else else
@@ -126,13 +126,13 @@
playsound(T, pick(GLOB.footstep[T.footstep][1]), playsound(T, pick(GLOB.footstep[T.footstep][1]),
GLOB.footstep[T.footstep][2] * volume, GLOB.footstep[T.footstep][2] * volume,
TRUE, TRUE,
GLOB.footstep[T.footstep][3] + e_range) GLOB.footstep[T.footstep][3] + e_range, falloff_distance = 1)
return return
if(!special && H.dna.species.special_step_sounds) 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 else
playsound(T, pick(L[turf_footstep][1]), playsound(T, pick(L[turf_footstep][1]),
L[turf_footstep][2] * volume, L[turf_footstep][2] * volume,
TRUE, TRUE,
L[turf_footstep][3] + e_range) L[turf_footstep][3] + e_range, falloff_distance = 1)

View File

@@ -19,7 +19,14 @@
/// chance we'll be stopped from squeaking by cooldown when something crossing us squeaks /// 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 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)) if(!isatom(parent))
return COMPONENT_INCOMPATIBLE return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak) 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 step_delay = step_delay_override
if(isnum(use_delay_override)) if(isnum(use_delay_override))
use_delay = 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() /datum/component/squeak/UnregisterFromParent()
if(!isatom(parent)) if(!isatom(parent))
@@ -62,42 +75,42 @@
return ..() return ..()
/datum/component/squeak/proc/play_squeak() /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(prob(squeak_chance))
if(!override_squeak_sounds) 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 else
playsound(parent, pickweight(override_squeak_sounds), volume, 1, -1) playsound(parent, pickweight(override_squeak_sounds), volume, TRUE, sound_extra_range, sound_falloff_exponent, falloff_distance = sound_falloff_distance)
last_squeak = world.time
return TRUE return TRUE
return FALSE
/datum/component/squeak/proc/step_squeak() /datum/component/squeak/proc/step_squeak()
SIGNAL_HANDLER
if(steps > step_delay) if(steps > step_delay)
do_play_squeak(TRUE) play_squeak()
steps = 0 steps = 0
else else
steps++ steps++
/datum/component/squeak/proc/play_squeak_crossed(datum/source, atom/movable/AM) /datum/component/squeak/proc/play_squeak_crossed(datum/source, atom/movable/AM)
SIGNAL_HANDLER
if(isitem(AM)) if(isitem(AM))
var/obj/item/I = AM var/obj/item/I = AM
if(I.item_flags & ABSTRACT) if(I.item_flags & ABSTRACT)
return return
else if(istype(AM, /obj/item/projectile)) if(AM.movement_type & (FLYING|FLOATING) || !AM.has_gravity())
var/obj/item/projectile/P = AM return
if(P.original != parent)
return
var/atom/current_parent = parent var/atom/current_parent = parent
if(isturf(current_parent.loc)) if(isturf(current_parent.loc))
if(do_play_squeak()) if(play_squeak())
SEND_SIGNAL(AM, COMSIG_CROSS_SQUEAKED) SEND_SIGNAL(AM, COMSIG_CROSS_SQUEAKED)
/datum/component/squeak/proc/use_squeak() /datum/component/squeak/proc/use_squeak()
SIGNAL_HANDLER
if(last_use + use_delay < world.time) if(last_use + use_delay < world.time)
last_use = world.time last_use = world.time
play_squeak() play_squeak()
@@ -118,6 +131,8 @@
RegisterSignal(holder, COMSIG_ATOM_DIR_CHANGE, .proc/holder_dir_change) RegisterSignal(holder, COMSIG_ATOM_DIR_CHANGE, .proc/holder_dir_change)
/datum/component/squeak/proc/holder_dir_change(datum/source, old_dir, new_dir) /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 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) if(old_dir != new_dir)
play_squeak() play_squeak()

View File

@@ -77,21 +77,21 @@
/** /**
* Default implementation of clean-up code. * Default implementation of clean-up code.
* *
* This should be overridden to remove all references pointing to the object being destroyed, if * 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 * 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; * Return an appropriate [QDEL_HINT][QDEL_HINT_QUEUE] to modify handling of your deletion;
* in most cases this is [QDEL_HINT_QUEUE]. * in most cases this is [QDEL_HINT_QUEUE].
* *
* The base case is responsible for doing the following * The base case is responsible for doing the following
* * Erasing timers pointing to this datum * * Erasing timers pointing to this datum
* * Erasing compenents on this datum * * Erasing compenents on this datum
* * Notifying datums listening to signals from this datum that we are going away * * Notifying datums listening to signals from this datum that we are going away
* *
* Returns [QDEL_HINT_QUEUE] * Returns [QDEL_HINT_QUEUE]
*/ */
/datum/proc/Destroy(force=FALSE, ...) /datum/proc/Destroy(force=FALSE, ...)
SHOULD_CALL_PARENT(TRUE) SHOULD_CALL_PARENT(TRUE)
tag = null tag = null
@@ -138,8 +138,6 @@
UnregisterSignal(target, signal_procs[target]) UnregisterSignal(target, signal_procs[target])
//END: ECS SHIT //END: ECS SHIT
SSsounds.free_datum_channels(src) //?? (not on tg)
return QDEL_HINT_QUEUE return QDEL_HINT_QUEUE
#ifdef DATUMVAR_DEBUGGING_MODE #ifdef DATUMVAR_DEBUGGING_MODE

View File

@@ -37,7 +37,7 @@
to_chat(H, "<span class='warning'>You feel [pick("full", "nauseated", "sweaty", "weak", "tired", "short on breath", "uneasy")].</span>") to_chat(H, "<span class='warning'>You feel [pick("full", "nauseated", "sweaty", "weak", "tired", "short on breath", "uneasy")].</span>")
if(3 to 4) if(3 to 4)
if(!sound) 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 sound = TRUE
if(prob(3)) if(prob(3))
to_chat(H, "<span class='danger'>You feel a sharp pain in your chest!</span>") to_chat(H, "<span class='danger'>You feel a sharp pain in your chest!</span>")
@@ -53,7 +53,7 @@
H.emote("cough") H.emote("cough")
if(5) if(5)
H.stop_sound_channel(CHANNEL_HEARTBEAT) 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) if(H.stat == CONSCIOUS)
H.visible_message("<span class='userdanger'>[H] clutches at [H.p_their()] chest as if [H.p_their()] heart is stopping!</span>") H.visible_message("<span class='userdanger'>[H] clutches at [H.p_their()] chest as if [H.p_their()] heart is stopping!</span>")
H.adjustStaminaLoss(60) H.adjustStaminaLoss(60)

View File

@@ -18,8 +18,12 @@
var/list/atom/output_atoms var/list/atom/output_atoms
var/mid_sounds var/mid_sounds
var/mid_length var/mid_length
///Override for volume of start sound
var/start_volume
var/start_sound var/start_sound
var/start_length var/start_length
///Override for volume of end sound
var/end_volume
var/end_sound var/end_sound
var/chance var/chance
var/volume = 100 var/volume = 100
@@ -27,10 +31,9 @@
var/max_loops var/max_loops
var/direct var/direct
var/extra_range = 0 var/extra_range = 0
var/falloff var/falloff_exponent
var/timerid var/timerid
var/init_timerid var/falloff_distance
/datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, _direct=FALSE) /datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, _direct=FALSE)
if(!mid_sounds) if(!mid_sounds)
@@ -51,16 +54,13 @@
/datum/looping_sound/proc/start(atom/add_thing) /datum/looping_sound/proc/start(atom/add_thing)
if(add_thing) if(add_thing)
output_atoms |= add_thing output_atoms |= add_thing
if(timerid || init_timerid) if(timerid)
return return
on_start() on_start()
/datum/looping_sound/proc/stop(atom/remove_thing) /datum/looping_sound/proc/stop(atom/remove_thing)
if(remove_thing) if(remove_thing)
output_atoms -= remove_thing output_atoms -= remove_thing
if(init_timerid)
deltimer(init_timerid)
init_timerid = null
if(!timerid) if(!timerid)
return return
on_stop() on_stop()
@@ -76,18 +76,18 @@
if(!timerid) if(!timerid)
timerid = addtimer(CALLBACK(src, .proc/sound_loop, world.time), mid_length, TIMER_CLIENT_TIME | TIMER_STOPPABLE | TIMER_LOOP) 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/list/atoms_cache = output_atoms
var/sound/S = sound(soundfile) var/sound/S = sound(soundfile)
if(direct) if(direct)
S.channel = SSsounds.random_available_channel() 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) for(var/i in 1 to atoms_cache.len)
var/atom/thing = atoms_cache[i] var/atom/thing = atoms_cache[i]
if(direct) if(direct)
SEND_SOUND(thing, S) SEND_SOUND(thing, S)
else 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) /datum/looping_sound/proc/get_sound(starttime, _mid_sounds)
. = _mid_sounds || mid_sounds . = _mid_sounds || mid_sounds
@@ -97,10 +97,10 @@
/datum/looping_sound/proc/on_start() /datum/looping_sound/proc/on_start()
var/start_wait = 0 var/start_wait = 0
if(start_sound) if(start_sound)
play(start_sound) play(start_sound, start_volume)
start_wait = start_length 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() /datum/looping_sound/proc/on_stop()
if(end_sound) if(end_sound)
play(end_sound) play(end_sound, end_volume)

View File

@@ -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_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 mid_length = 10
end_sound = 'sound/machines/shower/shower_end.ogg' 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_sounds = list('sound/machines/sm/supermatter1.ogg'=1,'sound/machines/sm/supermatter2.ogg'=1,'sound/machines/sm/supermatter3.ogg'=1)
mid_length = 10 mid_length = 10
volume = 1 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_sounds = list('sound/machines/fryer/deep_fryer_1.ogg' = 1, 'sound/machines/fryer/deep_fryer_2.ogg' = 1)
mid_length = 2 mid_length = 2
end_sound = 'sound/machines/fryer/deep_fryer_emerge.ogg' 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 // /datum/looping_sound/jackpot
mid_length = 2 // mid_length = 11
mid_sounds = list('sound/machines/fryer/deep_fryer_1.ogg' = 1, 'sound/machines/fryer/deep_fryer_2.ogg' = 1) // mid_sounds = list('sound/machines/roulettejackpot.ogg')
volume = 10 // 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

View File

@@ -100,51 +100,54 @@
eat(AM) eat(AM)
. = ..() . = ..()
/obj/machinery/recycler/proc/eat(atom/AM0) /obj/machinery/recycler/proc/eat(atom/movable/AM0, sound=TRUE)
if(stat & (BROKEN|NOPOWER) || safety_mode) if(stat & (BROKEN|NOPOWER))
return 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) for(var/i in to_eat)
var/atom/movable/AM = i var/atom/movable/AM = i
if(QDELETED(AM)) if(istype(AM, /obj/item))
continue var/obj/item/bodypart/head/as_head = AM
var/obj/item/bodypart/head/as_head = AM var/obj/item/mmi/as_mmi = 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))
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) living_detected = TRUE
if(brain_holder) nom += AM
if(obj_flags & EMAGGED)
continue
else
emergency_stop(AM)
return
else if(isliving(AM)) else if(isliving(AM))
if((obj_flags & EMAGGED)||((!allowed(AM))&&(!ishuman(AM)))) living_detected = TRUE
to_eat += crush_living(AM) crunchy_nom += AM
else var/not_eaten = to_eat.len - nom.len - crunchy_nom.len
emergency_stop(AM) if(living_detected) // First, check if we have any living beings detected.
return if(obj_flags & EMAGGED)
else if(isitem(AM)) for(var/CRUNCH in crunchy_nom) // Eat them and keep going because we don't care about safety.
var/obj/O = AM if(isliving(CRUNCH)) // MMIs and brains will get eaten like normal items
if(O.resistance_flags & INDESTRUCTIBLE) crush_living(CRUNCH)
buzz = TRUE else // Stop processing right now without eating anything.
O.forceMove(loc) emergency_stop()
else return
to_eat += recycle_item(AM) for(var/nommed in nom)
items_recycled++ recycle_item(nommed)
else if(nom.len && sound)
buzz = TRUE 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.
AM.forceMove(loc) if(not_eaten)
playsound(src, 'sound/machines/buzz-sigh.ogg', (50 + not_eaten*5), FALSE, not_eaten, ignore_walls = (not_eaten - 10)) // Ditto.
if(items_recycled) if(!ismob(AM0))
playsound(src, item_recycle_sound, 50, 1) AM0.moveToNullspace()
if(buzz) qdel(AM0)
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0) 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) /obj/machinery/recycler/proc/recycle_item(obj/item/I)

View File

@@ -11,7 +11,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
name = "item" name = "item"
icon = 'icons/obj/items_and_weapons.dmi' icon = 'icons/obj/items_and_weapons.dmi'
blocks_emissive = EMISSIVE_BLOCK_GENERIC blocks_emissive = EMISSIVE_BLOCK_GENERIC
attack_hand_speed = 0 attack_hand_speed = 0
attack_hand_is_action = FALSE attack_hand_is_action = FALSE
attack_hand_unwieldlyness = 0 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) /obj/item/proc/talk_into(mob/M, input, channel, spans, datum/language/language)
return ITALICS | REDUCE_RANGE 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) SHOULD_CALL_PARENT(TRUE)
current_equipped_slot = null
for(var/X in actions) for(var/X in actions)
var/datum/action/A = X var/datum/action/A = X
A.Remove(user) A.Remove(user)
if(item_flags & DROPDEL) if(item_flags & DROPDEL)
qdel(src) qdel(src)
item_flags &= ~IN_INVENTORY item_flags &= ~IN_INVENTORY
if(SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user) & COMPONENT_DROPPED_RELOCATION) SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
. = ITEM_RELOCATED_BY_DROPPED // if(!silent)
user.update_equipment_speed_mods() // 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) // called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user) /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) over.MouseDrop_T(src,usr)
return return
// called after an item is placed in an equipment slot /**
// user is mob that equipped it * Called after an item is placed in an equipment slot.
// slot uses the slot_X defines found in setup.dm *
// for items that can be placed in multiple slots * Note that hands count as slots.
// note this isn't called during the initial dressing of a player *
/obj/item/proc/equipped(mob/user, slot) * 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) SHOULD_CALL_PARENT(TRUE)
. = SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot) SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
current_equipped_slot = slot for(var/X in actions)
if(!(. & COMPONENT_NO_GRANT_ACTIONS)) var/datum/action/A = X
for(var/X in actions) if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
var/datum/action/A = X A.Grant(user)
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 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() user.update_equipment_speed_mods()
//Overlays for the worn overlay so you can overlay while you overlay //Overlays for the worn overlay so you can overlay while you overlay
//eg: ammo counters, primed grenade flashing, etc. //eg: ammo counters, primed grenade flashing, etc.
//"icon_file" is used automatically for inhands etc. to make sure it gets the right inhand file //"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 else
playsound(hit_atom, 'sound/weapons/throwtap.ogg', 1, volume, -1) 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) 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) /obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, messy_throw = TRUE)

View File

@@ -52,11 +52,9 @@
edit_emitter(user) edit_emitter(user)
/obj/effect/sound_emitter/AltClick(mob/user) /obj/effect/sound_emitter/AltClick(mob/user)
. = ..()
if(check_rights_for(user.client, R_SOUNDS)) if(check_rights_for(user.client, R_SOUNDS))
activate(user) activate(user)
to_chat(user, "<span class='notice'>Sound emitter activated.</span>") to_chat(user, "<span class='notice'>Sound emitter activated.</span>", confidential = TRUE)
return TRUE
/obj/effect/sound_emitter/proc/edit_emitter(mob/user) /obj/effect/sound_emitter/proc/edit_emitter(mob/user)
var/dat = "" var/dat = ""
@@ -84,20 +82,20 @@
if(!new_label) if(!new_label)
return return
maptext = new_label maptext = new_label
to_chat(user, "<span class='notice'>Label set to [maptext].</span>") to_chat(user, "<span class='notice'>Label set to [maptext].</span>", confidential = TRUE)
if(href_list["edit_sound_file"]) if(href_list["edit_sound_file"])
var/new_file = input(user, "Choose a sound file.", "Sound Emitter") as null|sound var/new_file = input(user, "Choose a sound file.", "Sound Emitter") as null|sound
if(!new_file) if(!new_file)
return return
sound_file = new_file sound_file = new_file
to_chat(user, "<span class='notice'>New sound file set to [sound_file].</span>") to_chat(user, "<span class='notice'>New sound file set to [sound_file].</span>", confidential = TRUE)
if(href_list["edit_volume"]) if(href_list["edit_volume"])
var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num
if(isnull(new_volume)) if(isnull(new_volume))
return return
new_volume = clamp(new_volume, 0, 100) new_volume = clamp(new_volume, 0, 100)
sound_volume = new_volume sound_volume = new_volume
to_chat(user, "<span class='notice'>Volume set to [sound_volume]%.</span>") to_chat(user, "<span class='notice'>Volume set to [sound_volume]%.</span>", confidential = TRUE)
if(href_list["edit_mode"]) if(href_list["edit_mode"])
var/new_mode var/new_mode
var/mode_list = list("Local (normal sound)" = SOUND_EMITTER_LOCAL, "Direct (not affected by environment/location)" = SOUND_EMITTER_DIRECT) 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) if(!new_mode)
return return
motus_operandi = mode_list[new_mode] motus_operandi = mode_list[new_mode]
to_chat(user, "<span class='notice'>Mode set to [motus_operandi].</span>") to_chat(user, "<span class='notice'>Mode set to [motus_operandi].</span>", confidential = TRUE)
if(href_list["edit_range"]) if(href_list["edit_range"])
var/new_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) 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) if(!new_range)
return return
emitter_range = range_list[new_range] emitter_range = range_list[new_range]
to_chat(user, "<span class='notice'>Range set to [emitter_range].</span>") to_chat(user, "<span class='notice'>Range set to [emitter_range].</span>", confidential = TRUE)
if(href_list["edit_radius"]) if(href_list["edit_radius"])
var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num
if(isnull(new_radius)) if(isnull(new_radius))
return return
new_radius = clamp(new_radius, 0, 127) new_radius = clamp(new_radius, 0, 127)
play_radius = new_radius play_radius = new_radius
to_chat(user, "<span class='notice'>Audible radius set to [play_radius].</span>") to_chat(user, "<span class='notice'>Audible radius set to [play_radius].</span>", confidential = TRUE)
if(href_list["play"]) if(href_list["play"])
activate(user) activate(user)
edit_emitter(user) //Refresh the UI to see our changes edit_emitter(user) //Refresh the UI to see our changes

View File

@@ -4,12 +4,10 @@
if(!check_rights(R_SOUNDS)) if(!check_rights(R_SOUNDS))
return return
var/freq = 1
var/vol = input(usr, "What volume would you like the sound to play at?",, 100) as null|num var/vol = input(usr, "What volume would you like the sound to play at?",, 100) as null|num
if(!vol) if(!vol)
return 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) vol = clamp(vol, 1, 100)
var/sound/admin_sound = new() var/sound/admin_sound = new()
@@ -18,14 +16,14 @@
admin_sound.channel = CHANNEL_ADMIN admin_sound.channel = CHANNEL_ADMIN
admin_sound.frequency = freq admin_sound.frequency = freq
admin_sound.wait = 1 admin_sound.wait = 1
admin_sound.repeat = 0 admin_sound.repeat = FALSE
admin_sound.status = SOUND_STREAM admin_sound.status = SOUND_STREAM
admin_sound.volume = vol admin_sound.volume = vol
var/res = alert(usr, "Show the title of this song to the players?",, "Yes","No", "Cancel") var/res = alert(usr, "Show the title of this song to the players?",, "Yes","No", "Cancel")
switch(res) switch(res)
if("Yes") if("Yes")
to_chat(world, "<span class='boldannounce'>An admin played: [S]</span>") to_chat(world, "<span class='boldannounce'>An admin played: [S]</span>", confidential = TRUE)
if("Cancel") if("Cancel")
return return
@@ -49,7 +47,7 @@
log_admin("[key_name(src)] played a local sound [S]") log_admin("[key_name(src)] played a local sound [S]")
message_admins("[key_name_admin(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! 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() /client/proc/play_web_sound()

View File

@@ -358,7 +358,7 @@
to_chat(owner.current, "<span class='boldannounce'>You are [changelingID], a changeling! You have absorbed and taken the form of a human.</span>") to_chat(owner.current, "<span class='boldannounce'>You are [changelingID], a changeling! You have absorbed and taken the form of a human.</span>")
to_chat(owner.current, "<span class='boldannounce'>Use say \"[MODE_TOKEN_CHANGELING] message\" to communicate with your fellow changelings.</span>") to_chat(owner.current, "<span class='boldannounce'>Use say \"[MODE_TOKEN_CHANGELING] message\" to communicate with your fellow changelings.</span>")
to_chat(owner.current, "<b>You must complete the following tasks:</b>") to_chat(owner.current, "<b>You must complete the following tasks:</b>")
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() owner.announce_objectives()

View File

@@ -60,7 +60,7 @@
owner.current.visible_message("<span class='heavy_brass'>[owner.current]'s eyes glow a blazing yellow!</span>", null, null, 7, owner.current) //don't show the owner this message owner.current.visible_message("<span class='heavy_brass'>[owner.current]'s eyes glow a blazing yellow!</span>", null, null, 7, owner.current) //don't show the owner this message
to_chat(owner.current, "<span class='heavy_brass'>Assist your new companions in their righteous efforts. Your goal is theirs, and theirs yours. You serve the Clockwork \ to_chat(owner.current, "<span class='heavy_brass'>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.</span>") Justiciar above all else. Perform his every whim without hesitation.</span>")
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() /datum/antagonist/clockcult/on_gain()
var/mob/living/current = owner.current var/mob/living/current = owner.current

View File

@@ -61,7 +61,7 @@
/datum/antagonist/cult/greet() /datum/antagonist/cult/greet()
to_chat(owner, "<span class='userdanger'>You are a member of the cult!</span>") to_chat(owner, "<span class='userdanger'>You are a member of the cult!</span>")
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() owner.announce_objectives()
/datum/antagonist/cult/on_gain() /datum/antagonist/cult/on_gain()

View File

@@ -43,7 +43,7 @@
return TRUE return TRUE
/datum/antagonist/nukeop/greet() /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, "<span class='notice'>You are a [nuke_team ? nuke_team.syndicate_name : "syndicate"] agent!</span>") to_chat(owner, "<span class='notice'>You are a [nuke_team ? nuke_team.syndicate_name : "syndicate"] agent!</span>")
owner.announce_objectives() owner.announce_objectives()
@@ -171,7 +171,7 @@
owner.current.real_name = "Syndicate [title]" owner.current.real_name = "Syndicate [title]"
/datum/antagonist/nukeop/leader/greet() /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, "<B>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.</B>") to_chat(owner, "<B>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.</B>")
to_chat(owner, "<B>If you feel you are not up to this task, give your ID to another operative.</B>") to_chat(owner, "<B>If you feel you are not up to this task, give your ID to another operative.</B>")
to_chat(owner, "<B>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.</B>") to_chat(owner, "<B>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.</B>")

View File

@@ -114,7 +114,7 @@
if(traitor_kind.finalize_traitor(src)) if(traitor_kind.finalize_traitor(src))
if(should_equip) if(should_equip)
equip(silent) 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() /datum/antagonist/traitor/antag_panel_objectives()
. += "<i><b>Traitor class:</b></i> <a href='?src=[REF(owner)];traitor_class=1;target_antag=[REF(src)]'>[traitor_kind.employer]</a><br>" . += "<i><b>Traitor class:</b></i> <a href='?src=[REF(owner)];traitor_class=1;target_antag=[REF(src)]'>[traitor_kind.employer]</a><br>"

View File

@@ -911,10 +911,10 @@
if(!istype(apc) || QDELETED(apc) || apc.stat & BROKEN) if(!istype(apc) || QDELETED(apc) || apc.stat & BROKEN)
to_chat(src, "<span class='danger'>Hack aborted. The designated APC no longer exists on the power network.</span>") to_chat(src, "<span class='danger'>Hack aborted. The designated APC no longer exists on the power network.</span>")
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) else if(apc.aidisabled)
to_chat(src, "<span class='danger'>Hack aborted. \The [apc] is no longer responding to our systems.</span>") to_chat(src, "<span class='danger'>Hack aborted. \The [apc] is no longer responding to our systems.</span>")
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 else
malf_picker.processing_time += 10 malf_picker.processing_time += 10
@@ -923,7 +923,7 @@
apc.locked = TRUE apc.locked = TRUE
apc.coverlocked = 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.") to_chat(src, "Hack complete. \The [apc] is now under your exclusive control.")
apc.update_icon() apc.update_icon()

View File

@@ -348,11 +348,11 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/proc/alarm() /obj/machinery/power/supermatter_crystal/proc/alarm()
switch(get_status()) switch(get_status())
if(SUPERMATTER_DELAMINATING) 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) 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) 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) if(SUPERMATTER_WARNING)
playsound(src, 'sound/machines/terminal_alert.ogg', 75) playsound(src, 'sound/machines/terminal_alert.ogg', 75)

View File

@@ -158,7 +158,7 @@
user.UseStaminaBuffer(safe_cost) user.UseStaminaBuffer(safe_cost)
if(suppressed) 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 else
playsound(user, fire_sound, 50, 1) playsound(user, fire_sound, 50, 1)
if(message) if(message)

Binary file not shown.