mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
+15
-14
@@ -378,20 +378,21 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
for(var/mob/O in hearers(3, loc))
|
||||
O.show_message(text("[bicon(src)] *[ttone]*"))
|
||||
|
||||
/obj/item/pda/proc/set_ringtone()
|
||||
var/t = input("Please enter new ringtone", name, ttone) as text
|
||||
if(in_range(src, usr) && loc == usr)
|
||||
if(t)
|
||||
if(hidden_uplink && hidden_uplink.check_trigger(usr, lowertext(t), lowertext(lock_code)))
|
||||
to_chat(usr, "The PDA softly beeps.")
|
||||
close(usr)
|
||||
else
|
||||
t = sanitize(copytext(t, 1, 20))
|
||||
ttone = t
|
||||
return 1
|
||||
else
|
||||
close(usr)
|
||||
return 0
|
||||
/obj/item/pda/proc/set_ringtone(mob/user)
|
||||
var/new_tone = input("Please enter new ringtone", name, ttone) as text
|
||||
new_tone = trim(new_tone)
|
||||
if(!in_range(src, user) || loc != user)
|
||||
close(user)
|
||||
return FALSE
|
||||
if(!new_tone)
|
||||
return FALSE
|
||||
|
||||
if(hidden_uplink && hidden_uplink.check_trigger(user, lowertext(new_tone), lowertext(lock_code)))
|
||||
to_chat(user, "The PDA softly beeps.")
|
||||
close(user)
|
||||
return TRUE
|
||||
ttone = sanitize(copytext(new_tone, 1, 20))
|
||||
return TRUE
|
||||
|
||||
/obj/item/pda/process()
|
||||
if(current_app)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
if(..())
|
||||
return
|
||||
|
||||
add_fingerprint(usr)
|
||||
add_fingerprint(ui.user)
|
||||
|
||||
. = TRUE
|
||||
switch(action)
|
||||
@@ -93,13 +93,13 @@
|
||||
update_shortcuts()
|
||||
playsound(src, 'sound/machines/terminal_eject.ogg', 50, TRUE)
|
||||
if("Authenticate") //Checks for ID
|
||||
id_check(usr, 1)
|
||||
id_check(ui.user, 1)
|
||||
if("Available_Ringtones")
|
||||
ttone = params["selected_ringtone"]
|
||||
if("Ringtone")
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||
return set_ringtone()
|
||||
return set_ringtone(ui.user)
|
||||
else
|
||||
if(current_app)
|
||||
. = current_app.ui_act(action, params, ui, state) // It needs proxying through down here so apps actually have their interacts called
|
||||
|
||||
Reference in New Issue
Block a user