mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-24 09:14:17 +00:00
Ports Nano UI to Subsystems
This commit is contained in:
@@ -102,7 +102,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
|
||||
ui_tick++
|
||||
var/datum/nanoui/old_ui = nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/old_ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/auto_update = 1
|
||||
if(!current_app)
|
||||
return
|
||||
@@ -117,7 +117,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/title = "Personal Data Assistant"
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
@@ -217,7 +217,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return
|
||||
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/mob/living/U = usr
|
||||
if(usr.stat == DEAD)
|
||||
return 0
|
||||
@@ -282,7 +282,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return // return 1 tells it to refresh the UI in NanoUI
|
||||
|
||||
/obj/item/device/pda/proc/close(mob/user)
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
ui.close()
|
||||
|
||||
/obj/item/device/pda/verb/verb_reset_pda()
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
if(L)
|
||||
to_chat(L, "[bicon(pda)] [message]")
|
||||
nanomanager.update_user_uis(L, pda) // Update the receiving user's PDA UI so that they can see the new message
|
||||
SSnanoui.update_user_uis(L, pda) // Update the receiving user's PDA UI so that they can see the new message
|
||||
|
||||
if(!notify_silent)
|
||||
pda.play_ringtone()
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
if(!PM.conversations.Find("\ref[pda]"))
|
||||
PM.conversations.Add("\ref[pda]")
|
||||
|
||||
nanomanager.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message
|
||||
SSnanoui.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message
|
||||
PM.notify("<b>Message from [pda.owner] ([pda.ownjob]), </b>\"[t]\" (<a href='?src=[PM.UID()];choice=Message;target=\ref[pda]'>Reply</a>)")
|
||||
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user