mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Adds sounds for the PDA (#54499)
This makes the PDA play all sorts of nice sounds, aswell as sounds for ejecting or inserting the ID/pen/cartridge. The noises for pressing buttons will need for your ringer to be ON, the other noises get played either way.
This commit is contained in:
@@ -447,6 +447,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
//BASIC FUNCTIONS===================================
|
||||
|
||||
if("Refresh")//Refresh, goes to the end of the proc.
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
|
||||
if ("Toggle_Font")
|
||||
//CODE REVISION 2
|
||||
@@ -461,12 +463,16 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
font_mode = FONT_ORBITRON
|
||||
if (MODE_VT)
|
||||
font_mode = FONT_VT
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
if ("Change_Color")
|
||||
var/new_color = input("Please enter a color name or hex value (Default is \'#808000\').",background_color)as color
|
||||
background_color = new_color
|
||||
|
||||
if ("Toggle_Underline")
|
||||
underline_flag = !underline_flag
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
|
||||
if("Return")//Return
|
||||
if(mode<=9)
|
||||
@@ -475,6 +481,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
mode = round(mode/10)
|
||||
if(mode==4 || mode == 5)//Fix for cartridges. Redirects to hub.
|
||||
mode = 0
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
if ("Authenticate")//Checks for ID
|
||||
id_check(U)
|
||||
if("UpdateInfo")
|
||||
@@ -482,34 +490,55 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if(istype(id, /obj/item/card/id/syndicate))
|
||||
owner = id.registered_name
|
||||
update_label()
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_processing.ogg', 15, TRUE)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/machines/terminal_success.ogg', 15, TRUE), 1.3 SECONDS)
|
||||
if("Eject")//Ejects the cart, only done from hub.
|
||||
eject_cart(U)
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_eject.ogg', 50, TRUE)
|
||||
|
||||
//MENU FUNCTIONS===================================
|
||||
|
||||
if("0")//Hub
|
||||
mode = 0
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
if("1")//Notes
|
||||
mode = 1
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
if("2")//Messenger
|
||||
mode = 2
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
if("21")//Read messeges
|
||||
mode = 21
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
if("3")//Atmos scan
|
||||
mode = 3
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
if("4")//Redirects to hub
|
||||
mode = 0
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
|
||||
|
||||
//MAIN FUNCTIONS===================================
|
||||
|
||||
if("Light")
|
||||
toggle_light(U)
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
if("Medical Scan")
|
||||
if(scanmode == PDA_SCANNER_MEDICAL)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
else if((!isnull(cartridge)) && (cartridge.access & CART_MEDICAL))
|
||||
scanmode = PDA_SCANNER_MEDICAL
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
if("Reagent Scan")
|
||||
if(scanmode == PDA_SCANNER_REAGENT)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
@@ -520,6 +549,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
else if((!isnull(cartridge)) && (cartridge.access & CART_ENGINE))
|
||||
scanmode = PDA_SCANNER_HALOGEN
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
if("Honk")
|
||||
if ( !(last_noise && world.time < last_noise + 20) )
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, TRUE)
|
||||
@@ -533,6 +564,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
else if((!isnull(cartridge)) && (cartridge.access & CART_ATMOS))
|
||||
scanmode = PDA_SCANNER_GAS
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
if("Drone Phone")
|
||||
var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical")
|
||||
var/area/A = get_area(U)
|
||||
@@ -540,6 +573,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/msg = "<span class='boldnotice'>NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!</span>"
|
||||
_alert_drones(msg, TRUE, U)
|
||||
to_chat(U, msg)
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_success.ogg', 15, TRUE)
|
||||
|
||||
|
||||
//NOTEKEEPER FUNCTIONS===================================
|
||||
@@ -665,6 +700,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
id = null
|
||||
updateSelfDialog()
|
||||
update_icon()
|
||||
playsound(src, 'sound/machines/terminal_eject.ogg', 50, TRUE)
|
||||
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
@@ -718,6 +754,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
// If it didn't reach, note that fact
|
||||
if (!signal.data["done"])
|
||||
to_chat(user, "<span class='notice'>ERROR: Server isn't responding.</span>")
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_error.ogg', 15, TRUE)
|
||||
return
|
||||
|
||||
var/target_text = signal.format_target()
|
||||
@@ -735,6 +773,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
// Log in the talk log
|
||||
user.log_talk(message, LOG_PDA, tag="PDA: [initial(name)] to [target_text]")
|
||||
to_chat(user, "<span class='info'>PDA message sent to [target_text]: \"[message]\"</span>")
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_success.ogg', 15, TRUE)
|
||||
// Reset the photo
|
||||
picture = null
|
||||
last_text = world.time
|
||||
@@ -857,6 +897,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
to_chat(user, "<span class='notice'>You remove [inserted_item] from [src].</span>")
|
||||
inserted_item = null
|
||||
update_icon()
|
||||
playsound(src, 'sound/machines/pda_button2.ogg', 50, TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This PDA does not have a pen in it!</span>")
|
||||
|
||||
@@ -888,6 +929,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
return FALSE
|
||||
insert_id(I, user)
|
||||
update_icon()
|
||||
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -940,17 +982,22 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
to_chat(user, "<span class='notice'>You insert [cartridge] into [src].</span>")
|
||||
updateSelfDialog()
|
||||
update_icon()
|
||||
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
|
||||
|
||||
else if(istype(C, /obj/item/card/id))
|
||||
var/obj/item/card/id/idcard = C
|
||||
if(!idcard.registered_name)
|
||||
to_chat(user, "<span class='warning'>\The [src] rejects the ID!</span>")
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_error.ogg', 50, TRUE)
|
||||
return
|
||||
if(!owner)
|
||||
owner = idcard.registered_name
|
||||
ownjob = idcard.assignment
|
||||
update_label()
|
||||
to_chat(user, "<span class='notice'>Card scanned.</span>")
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_success.ogg', 50, TRUE)
|
||||
else
|
||||
if(!id_check(user, idcard))
|
||||
return
|
||||
@@ -975,6 +1022,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
to_chat(user, "<span class='notice'>You slide \the [C] into \the [src].</span>")
|
||||
inserted_item = C
|
||||
update_icon()
|
||||
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
|
||||
else if(istype(C, /obj/item/photo))
|
||||
var/obj/item/photo/P = C
|
||||
picture = P.picture
|
||||
|
||||
Reference in New Issue
Block a user