Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Machine Sounds Plus #13859

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions code/_globalvars/lists/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var/global/list/SOUNDIN_CAN_OPEN = list('sound/effects/can_open1.ogg', 'sound/e
var/global/list/SOUNDIN_BONEBREAK = list('sound/effects/bonebreak1.ogg', 'sound/effects/bonebreak2.ogg', 'sound/effects/bonebreak3.ogg', 'sound/effects/bonebreak4.ogg')
var/global/list/SOUNDIN_RUSTLE = list('sound/effects/rustle1.ogg', 'sound/effects/rustle2.ogg', 'sound/effects/rustle3.ogg', 'sound/effects/rustle4.ogg', 'sound/effects/rustle5.ogg')
var/global/list/SOUNDIN_HORROR = list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/hallucinations/wail.ogg', 'sound/effects/screech.ogg', 'sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg', 'sound/hallucinations/far_noise.ogg', 'sound/hallucinations/i_see_you_3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you_1.ogg', 'sound/hallucinations/i_see_you_2.ogg', 'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg', 'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg')
var/global/list/FABRICATOR = list('sound/machines/fabricator1.ogg', 'sound/machines/fabricator2.ogg', 'sound/machines/fabricator3.ogg', 'sound/machines/fabricator4.ogg')
// Simple footsteps
var/global/list/SOUNDIN_CLOWNSTEP = list('sound/effects/clownstep1.ogg', 'sound/effects/clownstep2.ogg')
var/global/list/SOUNDIN_FOOTSTEPS = list('sound/effects/tile1.wav', 'sound/effects/tile2.wav', 'sound/effects/tile3.wav', 'sound/effects/tile4.wav')
Expand Down
8 changes: 8 additions & 0 deletions code/game/machinery/Sleeper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
if(beaker)
if(beaker.reagents.total_volume < beaker.reagents.maximum_volume)
H.blood_trans_to(beaker, 1)
playsound(src, 'sound/machines/dialysis.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

На всякий случай, ты же знаешь, что такое "vary"? Если нет, то потыкай, может так даже лучше будет.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отлично знаю
Как раз и отключаю, чтобы не было кринж-рандомной тональности

for(var/datum/reagent/x in src.occupant.reagents.reagent_list)
H.reagents.trans_to(beaker, 3)
H.blood_trans_to(beaker, 1)
Expand Down Expand Up @@ -290,6 +291,8 @@
if(!. || usr == occupant)
return FALSE

if(href_list)
playsound(src, 'sound/machines/select.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
if(href_list["refresh"])
updateUsrDialog()
else if(href_list["open"])
Expand All @@ -305,19 +308,23 @@
inject_chem(usr, href_list["inject"])
else
to_chat(usr, "<span class='notice'>ERROR: Subject is not in stable condition for auto-injection.</span>")
playsound(src, 'sound/machines/synth_no.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
else
to_chat(usr, "<span class='notice'>ERROR: Subject cannot metabolise chemicals.</span>")
playsound(src, 'sound/machines/synth_no.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
updateUsrDialog()

/obj/machinery/sleeper/open_machine()
if(!state_open && !panel_open)
..()
playsound(src, 'sound/machines/sleeper_open.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
if(beaker)
beaker.loc = src

/obj/machinery/sleeper/close_machine(mob/target)
if(state_open && !panel_open)
to_chat(target, "<span class='notice'><b>You feel cool air surround you. You go numb as your senses turn inward.</b></span>")
playsound(src, 'sound/machines/sleeper_close.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
..(target)

/obj/machinery/sleeper/proc/inject_chem(mob/user, chem)
Expand All @@ -326,6 +333,7 @@
occupant.reagents.add_reagent(chem, 10)
var/units = round(occupant.reagents.get_reagent_amount(chem))
to_chat(user, "<span class='notice'>Occupant now has [units] unit\s of [chem] in their bloodstream.</span>")
playsound(src, 'sound/machines/sleeper_inject.ogg', VOL_EFFECTS_MASTER, vary = FALSE)

/obj/machinery/sleeper/update_icon()
if(state_open)
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/autolathe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ var/global/list/datum/autolathe_recipe/autolathe_recipes_all = autolathe_recipes
stored_material[MAT_METAL] += m_amt
stored_material[MAT_GLASS] += g_amt
to_chat(user, "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe.")
playsound(src, 'sound/machines/material_insert.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
if(I && I.loc == src)
qdel(I)
busy = FALSE
Expand Down Expand Up @@ -445,6 +446,7 @@ var/global/list/datum/autolathe_recipe/autolathe_recipes_all = autolathe_recipes
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
playsound(src, 'sound/machines/autolathe.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
spawn(32/coeff)
if(istype(recipe, /datum/autolathe_recipe/stack))
stored_material[MAT_METAL] -= recipe.resources[MAT_METAL] * multiplier
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/camera/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -473,5 +473,5 @@
/obj/machinery/camera/proc/set_active()
if(stat & BROKEN)
return
playsound(src, 'sound/effects/triple_beep.ogg', VOL_EFFECTS_MASTER, 25, FALSE)
playsound(src, 'sound/machines/camera_activate.ogg', VOL_EFFECTS_MASTER, 75, FALSE)
update_icon()
17 changes: 17 additions & 0 deletions code/game/machinery/computer/station_alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
light_color = "#e6ffff"
circuit = /obj/item/weapon/circuitboard/stationalert
var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
var/muted = 0
required_skills = list(/datum/skill/engineering = SKILL_LEVEL_NOVICE, /datum/skill/command = SKILL_LEVEL_NONE)

/obj/machinery/computer/station_alert/atom_init()
Expand All @@ -20,6 +21,9 @@
if(!do_skill_checks(user))
return
var/dat = ""
dat += text({"
<td>Mute Mode: </td><td>[]</td>
<A href='byond://?src=\ref[src];command=mute'>[muted ? "On" : "Off"]</A><BR><BR>"})
for (var/cat in src.alarms)
dat += text("<B>[]</B><BR>\n", cat)
var/list/L = src.alarms[cat]
Expand All @@ -42,6 +46,17 @@
popup.set_content(dat)
popup.open()

/obj/machinery/computer/station_alert/Topic(href, href_list)
. = ..()
if(!.)
return

if(href_list["command"])
switch(href_list["command"])
if("mute")
muted = !muted
updateUsrDialog()

/obj/machinery/computer/station_alert/proc/triggerAlarm(class, area/A, O, alarmsource)
if(stat & (BROKEN))
return
Expand Down Expand Up @@ -88,6 +103,8 @@
/obj/machinery/computer/station_alert/process()
update_icon()
..()
if((icon_state == "atmos_alert_2") && !muted)
playsound(src, 'sound/machines/atmos_alarm.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
return

/obj/machinery/computer/station_alert/update_icon()
Expand Down
4 changes: 4 additions & 0 deletions code/game/machinery/teleporter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@
if(href_list["calibrate"])
if(!target)
to_chat(usr, "<span class='danger'>Error: No target set to calibrate to.</span>")
playsound(src, 'sound/machines/buzz-two.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
return FALSE
if(power_station.teleporter_hub.calibrated || power_station.teleporter_hub.accurate >= 3)
to_chat(usr, "<span class='warning'>Hub is already calibrated!</span>")
playsound(src, 'sound/machines/buzz-two.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
return FALSE
to_chat(usr, "<span class='notice'>Processing hub calibration to target...</span>")

Expand All @@ -126,8 +128,10 @@
if(check_hub_connection())
power_station.teleporter_hub.calibrated = 1
to_chat(usr, "<span class='notice'>Calibration complete.</span>")
playsound(src, 'sound/machines/calibration_complete.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
else
to_chat(usr, "<span class='danger'>Error: Unable to detect hub.</span>")
playsound(src, 'sound/machines/buzz-two.ogg', VOL_EFFECTS_MASTER, vary = FALSE)

updateDialog()

Expand Down
3 changes: 3 additions & 0 deletions code/game/machinery/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
playsound(src, 'sound/machines/use_card.ogg', VOL_EFFECTS_MASTER)
if(check_accounts)
if(vendor_account)
var/datum/money_account/D = get_account(C.associated_account_number)
Expand Down Expand Up @@ -391,6 +392,8 @@
if(!.)
return

if(href_list)
playsound(src, 'sound/machines/vendo_button.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
if(href_list["remove_coin"] && !issilicon(usr) && !isobserver(usr))
if(!coin)
to_chat(usr, "There is no coin in this machine.")
Expand Down
9 changes: 9 additions & 0 deletions code/game/mecha/mech_fabricator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
New_parts()
files = new /datum/research(src) //Setup the research data holder.

/obj/machinery/mecha_part_fabricator/process()
if(being_built)
playsound(src, pick(FABRICATOR), VOL_EFFECTS_MASTER, vary = FALSE)

/obj/machinery/mecha_part_fabricator/proc/New_parts()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/mechfab(null)
Expand Down Expand Up @@ -368,6 +372,9 @@
if(!.)
return

if(href_list)
playsound(src, 'sound/machines/select.ogg', VOL_EFFECTS_MASTER, vary = FALSE)

var/datum/topic_input/F = new /datum/topic_input(href,href_list)
if(href_list["part_set"])
var/tpart_set = F.getStr("part_set")
Expand Down Expand Up @@ -455,6 +462,7 @@
temp = "Not enough [material] to produce a sheet."
else
temp = "Ejected [removed] of [material]"
playsound(src, 'sound/machines/material_eject.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
temp += "<br><a href='byond://?src=\ref[src];clear_temp=1'>Return</a>"

updateUsrDialog()
Expand Down Expand Up @@ -555,6 +563,7 @@
resources[material] += transfer_amount * MINERAL_MATERIAL_AMOUNT
stack.use(transfer_amount)
to_chat(user, "<span class='notice'>You insert [transfer_amount] [sname] sheet\s into \the [src].</span>")
playsound(src, 'sound/machines/material_insert.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
sleep(10)
updateUsrDialog()
cut_overlay("fab-load-[material]") //No matter what the overlay shall still be deleted
Expand Down
8 changes: 8 additions & 0 deletions code/modules/cargo/console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,19 @@ ADD_TO_GLOBAL_LIST(/obj/machinery/computer/cargo, cargo_consoles)
if(href_list["send"])
if(!SSshuttle.can_move())
temp = "[safety_warning]<BR><BR><A href='byond://?src=\ref[src];mainmenu=1'>OK</A>"
playsound(src, 'sound/machines/cargo_shuttle_error.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
else if(SSshuttle.at_station)
SSshuttle.moving = -1
SSshuttle.sell()
SSshuttle.send()
temp = "The supply shuttle has departed.<BR><BR><A href='byond://?src=\ref[src];mainmenu=1'>OK</A>"
playsound(src, 'sound/machines/cargo_shuttle_send.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
else
SSshuttle.moving = 1
SSshuttle.buy()
SSshuttle.set_eta_timeofday()
temp = "The supply shuttle has been called and will arrive in [round(SSshuttle.movetime/600,1)] minutes.<BR><BR><A href='byond://?src=\ref[src];mainmenu=1'>OK</A>"
playsound(src, 'sound/machines/cargo_shuttle_call.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
post_signal("supply")

if(href_list["order"])
Expand Down Expand Up @@ -207,9 +210,14 @@ ADD_TO_GLOBAL_LIST(/obj/machinery/computer/cargo, cargo_consoles)
SSshuttle.shoppinglist += O
temp = "Thanks for your order.<BR>"
temp += "<BR><A href='byond://?src=\ref[src];viewrequests=1'>Back</A> <A href='byond://?src=\ref[src];mainmenu=1'>Main Menu</A>"
if(prob(5))
playsound(src, 'sound/machines/megabuy.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
else
playsound(src, 'sound/machines/buysound.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
else
temp = "Not enough credits.<BR>"
temp += "<BR><A href='byond://?src=\ref[src];viewrequests=1'>Back</A> <A href='byond://?src=\ref[src];mainmenu=1'>Main Menu</A>"
playsound(src, 'sound/machines/roboboop.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
break

if(href_list["online_shop_delivery_cost"])
Expand Down
8 changes: 8 additions & 0 deletions code/modules/detectivework/detective_work.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ var/global/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringperc
if(!authorization(user))
return ..()
ui_interact(user)
playsound(src, 'sound/machines/material_insert.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
else if(istype(I, /obj/item/weapon/evidencebag))
if(!authenticated)
if(!authorization(user))
Expand All @@ -118,6 +119,7 @@ var/global/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringperc
evidencebag_drop(E)
//prevent remove interactions that were not intended
attack_hand(user)
playsound(src, 'sound/machines/material_insert.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
else
return ..()

Expand Down Expand Up @@ -180,12 +182,14 @@ var/global/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringperc
if(scanning)
scanning.forceMove(loc)
scanning = null
playsound(src, 'sound/machines/material_eject.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
else
temp = "Eject Failed: No Object"
if("insert")
var/mob/M = usr
var/obj/item/I = M.get_active_hand()
if(I && istype(I))
playsound(src, 'sound/machines/material_insert.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
if(istype(I, /obj/item/weapon/evidencebag))
evidencebag_drop(I)
else
Expand Down Expand Up @@ -403,13 +407,15 @@ var/global/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringperc
else if(scanning)
scan_process = 3
scan_data = "Scanning [scanning]: 25% complete"
playsound(src, 'sound/machines/bzzi.ogg', VOL_EFFECTS_MASTER, vary = FALSE, frequency = 1)
updateDialog()
sleep(50)
if(!scan_process)
scan_data = null
updateDialog()
return
scan_data = "Scanning [scanning]: 50% complete"
playsound(src, 'sound/machines/bzzi.ogg', VOL_EFFECTS_MASTER, vary = FALSE, frequency = 1.2)
updateDialog()
scan_process = 2
sleep(50)
Expand All @@ -418,6 +424,7 @@ var/global/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringperc
updateDialog()
return
scan_data = "Scanning [scanning]: 75% complete"
playsound(src, 'sound/machines/bzzi.ogg', VOL_EFFECTS_MASTER, vary = FALSE, frequency = 1.4)
updateDialog()
scan_process = 1
sleep(50)
Expand All @@ -426,6 +433,7 @@ var/global/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringperc
updateDialog()
return
if(scanning)
playsound(src, 'sound/machines/complete.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
scan_process = 0
scan_name = scanning.name
scan_data = "<u>[scanning]</u><br><br>"
Expand Down
5 changes: 4 additions & 1 deletion code/modules/research/circuitprinter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
spawn(16)
if(stack.get_amount() >= amount)
to_chat(user, "<span class='notice'>You add [amount] sheets to the [src.name].</span>")
playsound(src, 'sound/machines/material_insert.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
for(var/M in loaded_materials)
if(stack.type == loaded_materials[M].sheet_type)
loaded_materials[M].amount += amount * stack.perunit
Expand Down Expand Up @@ -161,7 +162,6 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
return

busy = TRUE
flick("circuit_imprinter_ani", src)
use_power(power)

for(var/M in D.materials)
Expand All @@ -184,7 +184,9 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
var/obj/O = A
O.origin_tech = null
busy = FALSE
flick("circuit_imprinter_ani", src)
queue -= RNDD
playsound(src, 'sound/machines/circuit_imprinter.ogg', VOL_EFFECTS_MASTER, vary = FALSE)

if(queue.len)
produce_design(queue[1])
Expand All @@ -201,3 +203,4 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
var/sheet_amount = min(available_num_sheets, amount)
sheet.set_amount(sheet_amount)
loaded_materials[sheet_type].amount = max(0, loaded_materials[sheet_type].amount - sheet_amount * loaded_materials[sheet_type].sheet_size)
playsound(src, 'sound/machines/material_eject.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
3 changes: 3 additions & 0 deletions code/modules/research/destructive_analyzer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Note: Must be placed within 3 tiles of the R&D Console
loaded_item = O
user.drop_from_inventory(O, src)
to_chat(user, "<span class='notice'>You add the [O.name] to the machine!</span>")
playsound(src, 'sound/machines/destructive_analyzer_close.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
icon_state = "d_analyzer_l"
flick("d_analyzer_la", src)
if(linked_console)
Expand All @@ -96,6 +97,7 @@ Note: Must be placed within 3 tiles of the R&D Console

busy = TRUE
flick("d_analyzer_process", src)
playsound(src, 'sound/machines/destructive_analyzer_act.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
if(linked_console)
linked_console.screen = "working"
addtimer(CALLBACK(src, PROC_REF(finish_deconstructing)), 15)
Expand Down Expand Up @@ -141,6 +143,7 @@ Note: Must be placed within 3 tiles of the R&D Console
loaded_item.forceMove(loc)
loaded_item = null
update_icon()
playsound(src, 'sound/machines/destructive_analyzer_open.ogg', VOL_EFFECTS_MASTER, vary = FALSE)

/obj/machinery/r_n_d/destructive_analyzer/power_change()
. = ..()
Expand Down
5 changes: 4 additions & 1 deletion code/modules/research/protolathe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ Note: Must be placed west/left of and R&D console to function.
busy = TRUE

to_chat(user, "<span class='notice'>You add [amount] sheets to the [name].</span>")
playsound(src, 'sound/machines/material_insert.ogg', VOL_EFFECTS_MASTER, vary = FALSE)

add_overlay("protolathe_[stack.name]")
sleep(10)
Expand Down Expand Up @@ -210,7 +211,6 @@ Note: Must be placed west/left of and R&D console to function.
return

busy = TRUE
flick("protolathe_n",src)
use_power(power)

for(var/M in D.materials)
Expand Down Expand Up @@ -243,6 +243,8 @@ Note: Must be placed west/left of and R&D console to function.
linked_console.files.design_created_prototypes[D.id]++
busy = FALSE
queue -= RNDD
flick("protolathe_n",src)
playsound(src, 'sound/machines/protolat.ogg', VOL_EFFECTS_MASTER, vary = FALSE)

if(queue.len)
produce_design(queue[1])
Expand All @@ -259,3 +261,4 @@ Note: Must be placed west/left of and R&D console to function.
var/sheet_amount = min(available_num_sheets, amount)
sheet.set_amount(sheet_amount)
loaded_materials[sheet_type].amount = max(0, loaded_materials[sheet_type].amount - sheet_amount * loaded_materials[sheet_type].sheet_size)
playsound(src, 'sound/machines/material_eject.ogg', VOL_EFFECTS_MASTER, vary = FALSE)
Loading
Loading