Adds PDA Sounds

Adds new sound files and gives the PDA life!
This commit is contained in:
Zandario
2019-03-29 14:18:34 -05:00
parent bf829a2d79
commit 30ff894398
8 changed files with 57 additions and 0 deletions
@@ -391,6 +391,7 @@ GLOBAL_LIST_EMPTY(PDAs)
//BASIC FUNCTIONS===================================
if("Refresh")//Refresh, goes to the end of the proc.
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if ("Toggle_Font")
//CODE REVISION 2
@@ -405,12 +406,16 @@ GLOBAL_LIST_EMPTY(PDAs)
font_mode = FONT_ORBITRON
if (MODE_VT)
font_mode = FONT_VT
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
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
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if ("Toggle_Underline")
underline_flag = !underline_flag
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Return")//Return
if(mode<=9)
@@ -419,13 +424,19 @@ GLOBAL_LIST_EMPTY(PDAs)
mode = round(mode/10)
if(mode==4 || mode == 5)//Fix for cartridges. Redirects to hub.
mode = 0
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if ("Authenticate")//Checks for ID
id_check(U)
if("UpdateInfo")
ownjob = id.assignment
if(istype(id, /obj/item/card/id/syndicate))
owner = id.registered_name
update_label()
playsound(src, 'sound/machines/terminal_processing.ogg', 50, 1)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/machines/terminal_success.ogg', 50, 1), 13)
if("Eject")//Ejects the cart, only done from hub.
if (!isnull(cartridge))
U.put_in_hands(cartridge)
@@ -434,55 +445,74 @@ GLOBAL_LIST_EMPTY(PDAs)
cartridge.host_pda = null
cartridge = null
update_icon()
playsound(src, 'sound/machines/terminal_eject_disc.ogg', 50, 1)
//MENU FUNCTIONS===================================
if("0")//Hub
mode = 0
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("1")//Notes
mode = 1
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("2")//Messenger
mode = 2
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("21")//Read messeges
mode = 21
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("3")//Atmos scan
mode = 3
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("4")//Redirects to hub
mode = 0
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
//MAIN FUNCTIONS===================================
if("Light")
toggle_light()
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Medical Scan")
if(scanmode == PDA_SCANNER_MEDICAL)
scanmode = PDA_SCANNER_NONE
else if((!isnull(cartridge)) && (cartridge.access & CART_MEDICAL))
scanmode = PDA_SCANNER_MEDICAL
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Reagent Scan")
if(scanmode == PDA_SCANNER_REAGENT)
scanmode = PDA_SCANNER_NONE
else if((!isnull(cartridge)) && (cartridge.access & CART_REAGENT_SCANNER))
scanmode = PDA_SCANNER_REAGENT
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Halogen Counter")
if(scanmode == PDA_SCANNER_HALOGEN)
scanmode = PDA_SCANNER_NONE
else if((!isnull(cartridge)) && (cartridge.access & CART_ENGINE))
scanmode = PDA_SCANNER_HALOGEN
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Honk")
if ( !(last_noise && world.time < last_noise + 20) )
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
last_noise = world.time
if("Trombone")
if ( !(last_noise && world.time < last_noise + 20) )
playsound(src, 'sound/misc/sadtrombone.ogg', 50, 1)
last_noise = world.time
if("Gas Scan")
if(scanmode == PDA_SCANNER_GAS)
scanmode = PDA_SCANNER_NONE
else if((!isnull(cartridge)) && (cartridge.access & CART_ATMOS))
scanmode = PDA_SCANNER_GAS
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
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)
@@ -490,6 +520,7 @@ 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)
playsound(src, 'sound/machines/terminal_success.ogg', 50, 1)
//NOTEKEEPER FUNCTIONS===================================
@@ -641,6 +672,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if (!signal.data["done"])
to_chat(user, "<span class='notice'>ERROR: Server isn't responding.</span>")
return
playsound(src, 'sound/machines/terminal_error.ogg', 50, 1)
var/target_text = signal.format_target()
// Log it in our logs
@@ -653,6 +685,7 @@ 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'>Message sent to [target_text]: \"[message]\"</span>")
playsound(src, 'sound/machines/terminal_success.ogg', 50, 1)
// Reset the photo
picture = null
last_text = world.time
@@ -699,8 +732,10 @@ GLOBAL_LIST_EMPTY(PDAs)
if(id)
remove_id()
playsound(src, 'sound/machines/terminal_eject_disc.ogg', 50, 1)
else
remove_pen()
playsound(src, 'sound/machines/button4.ogg', 50, 1)
/obj/item/pda/CtrlClick()
..()
@@ -776,6 +811,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if(old_id)
user.put_in_hands(old_id)
update_icon()
playsound(src, 'sound/machines/button.ogg', 50, 1)
return TRUE
// access to status display signals
@@ -787,17 +823,21 @@ GLOBAL_LIST_EMPTY(PDAs)
cartridge.host_pda = src
to_chat(user, "<span class='notice'>You insert [cartridge] into [src].</span>")
update_icon()
playsound(src, 'sound/machines/button.ogg', 50, 1)
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>")
return
playsound(src, 'sound/machines/terminal_error.ogg', 50, 1)
if(!owner)
owner = idcard.registered_name
ownjob = idcard.assignment
update_label()
to_chat(user, "<span class='notice'>Card scanned.</span>")
playsound(src, 'sound/machines/terminal_success.ogg', 50, 1)
else
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
if(((src in user.contents) || (isturf(loc) && in_range(src, user))) && (C in user.contents))
@@ -823,6 +863,8 @@ 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/button.ogg', 50, 1)
else if(istype(C, /obj/item/photo))
var/obj/item/photo/P = C
picture = P.picture
@@ -580,6 +580,7 @@ Code:
host_pda.mode = 441
if(!active2)
active1 = null
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Security Records")
active1 = find_record("id", href_list["target"], GLOB.data_core.general)
@@ -588,19 +589,23 @@ Code:
host_pda.mode = 451
if(!active3)
active1 = null
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Send Signal")
INVOKE_ASYNC(radio, /obj/item/integrated_signaler.proc/send_activation)
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Signal Frequency")
var/new_frequency = sanitize_frequency(radio.frequency + text2num(href_list["sfreq"]))
radio.set_frequency(new_frequency)
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Signal Code")
radio.code += text2num(href_list["scode"])
radio.code = round(radio.code)
radio.code = min(100, radio.code)
radio.code = max(1, radio.code)
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Status")
switch(href_list["statdisp"])
@@ -616,16 +621,21 @@ Code:
updateSelfDialog()
else
post_status(href_list["statdisp"])
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Power Select")
var/pnum = text2num(href_list["target"])
powmonitor = powermonitors[pnum]
host_pda.mode = 433
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Supply Orders")
host_pda.mode =47
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Newscaster Access")
host_pda.mode = 53
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Newscaster Message")
var/host_pda_owner_name = host_pda.id ? "[host_pda.id.registered_name] ([host_pda.id.assignment])" : "Unknown"
@@ -641,11 +651,13 @@ Code:
GLOB.news_network.SubmitArticle(message,host_pda.owner,current_channel)
host_pda.Topic(null,list("choice"=num2text(host_pda.mode)))
return
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if("Newscaster Switch Channel")
current_channel = host_pda.msg_input()
host_pda.Topic(null,list("choice"=num2text(host_pda.mode)))
return
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
//Bot control section! Viciously ripped from radios for being laggy and terrible.
if(href_list["op"])
@@ -656,10 +668,13 @@ Code:
if("botlist")
active_bot = null
if("summon") //Args are in the correct order, they are stated here just as an easy reminder.
active_bot.bot_control(command= "summon", user_turf= get_turf(usr), user_access= host_pda.GetAccess())
else //Forward all other bot commands to the bot itself!
active_bot.bot_control(command= href_list["op"], user= usr)
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
if(href_list["mule"]) //MULEbots are special snowflakes, and need different args due to how they work.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.