Computer noises (#13117)

* Wow this branch is old

Adds the sound files so I can update this thing.

* Why GitHub desktop

*scream

* Adds the functionality

Adds interaction sounds to mod pcs

* tablet noises

"Adds PDA clicking sounds" by comma on Baystation

* Fixes the checks

Forgot I changed that

* Fixed the abrupt cutoff

I just made it fade out

* Update code/modules/modular_computers/file_system/programs/borg_monitor.dm

* Integrated PC stuff

Should fix it

* Oops

Ack

* Coding

Cant code to save my life

* Telescreen beeping

Some refinements and telescreen beeping

Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com>
This commit is contained in:
nmajask
2022-02-10 13:51:18 -05:00
committed by GitHub
parent 5a863f5461
commit 304ae24736
35 changed files with 74 additions and 2 deletions

View File

@@ -44,6 +44,7 @@
switch(action)
if("PRG_beginReconstruction")
if(A && A.health < 100)
computer.play_interact_sound()
restoring = TRUE
A.notify_ghost_cloning("Your core files are being restored!", source = computer)
return TRUE
@@ -52,6 +53,7 @@
var/obj/item/computer_hardware/ai_slot/ai_slot = computer.all_components[MC_AI]
if(ai_slot && ai_slot.stored_card)
ai_slot.try_eject(usr)
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50)
return TRUE
/datum/computer_file/program/aidiag/process_tick()

View File

@@ -26,6 +26,7 @@
var/mob/living/user = usr
var/obj/item/computer_hardware/hard_drive/small/syndicate/hard_drive = computer.all_components[MC_HDD]
computer.play_interact_sound()
switch(action)
if("PRG_contract-accept")

View File

@@ -42,6 +42,7 @@
/datum/computer_file/program/ntnet_dos/ui_act(action, params)
if(..())
return
computer.play_interact_sound()
switch(action)
if("PRG_target_relay")
for(var/obj/machinery/ntnet_relay/R in SSnetworks.station_network.relays)

View File

@@ -50,6 +50,7 @@
/datum/computer_file/program/revelation/ui_act(action, params)
if(..())
return
computer.play_interact_sound()
switch(action)
if("PRG_arm")
armed = !armed

View File

@@ -103,6 +103,7 @@
attackamt = rand(2,6)
pause_state = TRUE
heads_up = "You attack for [attackamt] damage."
computer.play_interact_sound()
playsound(computer.loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3, falloff = 10)
boss_hp -= attackamt
sleep(10)
@@ -117,6 +118,7 @@
healcost = rand(1,3)
pause_state = TRUE
heads_up = "You heal for [healamt] damage."
computer.play_interact_sound()
playsound(computer.loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3, falloff = 10)
player_hp += healamt
player_mp -= healcost
@@ -130,6 +132,7 @@
rechargeamt = rand(4,7)
pause_state = TRUE
heads_up = "You regain [rechargeamt] magic power."
computer.play_interact_sound()
playsound(computer.loc, 'sound/arcade/mana.ogg', 50, TRUE, extrarange = -3, falloff = 10)
player_mp += rechargeamt
sleep(10)
@@ -137,6 +140,7 @@
enemy_check()
return TRUE
if("Dispense_Tickets")
computer.play_interact_sound()
if(!printer)
to_chat(usr, span_notice("Hardware error: A printer is required to redeem tickets."))
return
@@ -154,6 +158,7 @@
to_chat(user, span_notice("You don't have any stored tickets!"))
return TRUE
if("Start_Game")
computer.play_interact_sound()
game_active = TRUE
boss_hp = 45
player_hp = 30

View File

@@ -134,6 +134,7 @@
var/message = stripped_input(usr, message = "Enter message to be sent to remote cyborg.", title = "Send Message")
if(!message)
return
computer.play_interact_sound()
to_chat(R, "<br><br>[span_notice("Message from [ID] -- \"[message]\"")]<br>")
to_chat(usr, "Message sent to [R]: [message]")
R.logevent("Message from [ID] -- \"[message]\"")

View File

@@ -64,6 +64,7 @@
break
switch(action)
if("createBounty")
computer.play_interact_sound()
if(!current_user || !bounty_text)
playsound(src, 'sound/machines/buzz-sigh.ogg', 20, TRUE)
return TRUE
@@ -78,6 +79,7 @@
playsound(i.loc, 'sound/machines/ping.ogg', 30, TRUE)
return TRUE
if("apply")
computer.play_interact_sound()
if(!current_user)
computer.say("Please swipe a valid ID first.")
return TRUE
@@ -88,6 +90,7 @@
if("payApplicant")
if(!current_user)
return
computer.play_interact_sound()
if(!current_user.has_money(active_request.value) || (current_user.account_holder != active_request.owner))
playsound(computer, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
return
@@ -96,10 +99,12 @@
return TRUE
if("clear")
if(current_user)
computer.play_interact_sound()
current_user = null
computer.say("Account Reset.")
return TRUE
if("deleteRequest")
computer.play_interact_sound()
if(!current_user)
playsound(computer, 'sound/machines/buzz-sigh.ogg', 20, TRUE)
return TRUE
@@ -110,10 +115,12 @@
GLOB.request_list.Remove(active_request)
return TRUE
if("bountyVal")
computer.play_interact_sound()
bounty_value = text2num(params["bountyval"])
if(!bounty_value)
bounty_value = 1
if("bountyText")
computer.play_interact_sound()
bounty_text = (params["bountytext"])
. = TRUE

View File

@@ -41,6 +41,7 @@
if(computer && printer) //This option should never be called if there is no printer
var/contents = "<h2>Crew Manifest\n</h2>"
var/manifest = GLOB.data_core.get_manifest() // Keys are string names of departments, values are lists of lists. Each list therein has two elements: "name" and "rank"
computer.play_interact_sound()
for(var/dep in manifest) // For each department
contents += "<br><h3>[dep]</h34><br>"

View File

@@ -77,6 +77,7 @@
return
switch(action)
if("switch")
computer.play_interact_sound()
moneysink.manual_switch = !moneysink.manual_switch
if(moneysink.manual_switch)
START_PROCESSING(SSobj, moneysink)
@@ -85,8 +86,10 @@
. = TRUE
if("setinput")
var/target = params["target"]
computer.play_interact_sound()
if(target == "input")
target = input("New input target (0-[MAXIMUM_POWER_LIMIT]):", moneysink.name, moneysink.manual_power_setting) as num|null
computer.play_interact_sound()
if(!isnull(target) && !..())
. = TRUE
else if(target == "min")

View File

@@ -18,6 +18,7 @@
var/obj/item/computer_hardware/hard_drive/HDD = computer.all_components[MC_HDD]
var/obj/item/computer_hardware/hard_drive/RHDD = computer.all_components[MC_SDD]
computer.play_interact_sound()
switch(action)
if("PRG_deletefile")

View File

@@ -57,6 +57,7 @@
var/authed = FALSE
var/mob/user = usr
var/obj/item/card/id/user_id = user.get_idcard()
computer.play_interact_sound()
if(user_id)
if(ACCESS_CHANGE_IDS in user_id.access)
authed = TRUE

View File

@@ -114,6 +114,7 @@
/datum/computer_file/program/ntnetdownload/ui_act(action, params)
if(..())
return TRUE
computer.play_interact_sound()
switch(action)
if("PRG_downloadfile")
if(!downloaded_file)

View File

@@ -15,6 +15,7 @@
/datum/computer_file/program/ntnetmonitor/ui_act(action, params)
if(..())
return
computer.play_interact_sound()
switch(action)
if("resetIDS")
if(SSnetworks.station_network)

View File

@@ -29,6 +29,7 @@
var/datum/ntnet_conversation/channel = SSnetworks.station_network.get_chat_channel_by_id(active_channel)
var/authed = FALSE
computer.play_interact_sound()
if(channel && ((channel.operator == src) || netadmin_mode))
authed = TRUE
switch(action)

View File

@@ -72,6 +72,7 @@
/datum/computer_file/program/radar/ui_act(action, params)
if(..())
return
computer.play_interact_sound()
switch(action)
if("selecttarget")

View File

@@ -62,6 +62,7 @@
var/obj/item/computer_hardware/card_slot/card_slot
var/obj/item/card/id/id_card
if(computer)
computer.play_interact_sound()
card_slot = computer.all_components[MC_CARD]
if(card_slot)
id_card = card_slot.stored_card

View File

@@ -96,9 +96,11 @@
switch(action)
if("viewAlerts")
computer.play_interact_sound()
borgo.robot_alerts()
if("coverunlock")
if(borgo.locked)
computer.play_interact_sound()
borgo.locked = FALSE
borgo.update_icons()
if(borgo.emagged)
@@ -107,9 +109,11 @@
borgo.logevent("Chassis cover lock has been [borgo.locked ? "engaged" : "released"]")
if("lawchannel")
computer.play_interact_sound()
borgo.set_autosay()
if("lawstate")
computer.play_interact_sound()
borgo.checklaws()
if("alertPower")
@@ -120,28 +124,36 @@
playsound(borgo, 'sound/machines/buzz-two.ogg', 50, FALSE)
if("toggleSensors")
computer.play_interact_sound()
borgo.toggle_sensors()
if("viewImage")
computer.play_interact_sound()
borgo.aicamera?.viewpictures(usr)
if("printImage")
computer.play_interact_sound()
var/obj/item/camera/siliconcam/robot_camera/borgcam = borgo.aicamera
borgcam?.borgprint(usr)
if("takeImage")
computer.play_interact_sound()
var/obj/item/camera/siliconcam/robot_camera/borgcam = borgo.aicamera
borgcam?.toggle_camera_mode(usr)
if("toggleThrusters")
computer.play_interact_sound()
borgo.toggle_ionpulse()
if("lampIntensity")
borgo.lamp_intensity = params["ref"]
computer.play_interact_sound()
borgo.toggle_headlamp(FALSE, TRUE)
if("selfDestruct")
computer.play_interact_sound()
borgo.self_self_destruct()
if("toggle_light")
computer.play_interact_sound()
borgo.toggle_headlamp()
return TRUE
@@ -155,6 +167,7 @@
if(color_hex2num(new_color) < 200) //Colors too dark are rejected
to_chat(user, "<span class='warning'>That color is too dark! Choose a lighter one.</span>")
new_color = null
computer.play_interact_sound()
borgo.lamp_color = new_color
borgo.toggle_headlamp(FALSE, TRUE)
return TRUE

View File

@@ -190,6 +190,7 @@
/datum/computer_file/program/supermatter_monitor/ui_act(action, params)
if(..())
return TRUE
computer.play_interact_sound()
switch(action)
if("PRG_clear")