mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Update NanoUI to be up-to-date with Bay
This commit is contained in:
@@ -506,7 +506,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
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
|
||||
ui = new(user, src, ui_key, "pda.tmpl", title, 630, 600)
|
||||
ui = new(user, src, ui_key, "pda.tmpl", title, 630, 600, state = inventory_state)
|
||||
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
@@ -815,6 +815,21 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
return 1 // return 1 tells it to refresh the UI in NanoUI
|
||||
|
||||
/obj/item/device/pda/verb/verb_reset_pda()
|
||||
set category = "Object"
|
||||
set name = "Reset PDA"
|
||||
set src in usr
|
||||
|
||||
if(issilicon(usr))
|
||||
return
|
||||
|
||||
if(can_use(usr))
|
||||
mode = 0
|
||||
nanomanager.update_uis(src)
|
||||
usr << "<span class='notice'>You press the reset button on \the [src].</span>"
|
||||
else
|
||||
usr << "<span class='notice'>You cannot do this while restrained.</span>"
|
||||
|
||||
/obj/item/device/pda/proc/remove_id()
|
||||
if (id)
|
||||
if (ismob(loc))
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
w_class = 2.0
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "biotech=3;materials=3;magnets=3"
|
||||
var/obj/nano_module/crew_monitor/crew_monitor
|
||||
var/datum/nano_module/crew_monitor/crew_monitor
|
||||
|
||||
/obj/item/device/sensor_device/New()
|
||||
crew_monitor = new(src)
|
||||
|
||||
@@ -24,6 +24,9 @@ var/list/world_uplinks = list()
|
||||
var/job = null
|
||||
var/show_descriptions = 0
|
||||
|
||||
/obj/item/device/uplink/nano_host()
|
||||
return loc
|
||||
|
||||
/obj/item/device/uplink/New()
|
||||
..()
|
||||
welcome = ticker.mode.uplink_welcome
|
||||
@@ -202,7 +205,7 @@ var/list/world_uplinks = list()
|
||||
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
|
||||
ui = new(user, src, ui_key, "uplink.tmpl", title, 700, 600)
|
||||
ui = new(user, src, ui_key, "uplink.tmpl", title, 700, 600, state = inventory_state)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
@@ -294,8 +297,8 @@ var/list/world_uplinks = list()
|
||||
qdel(S)
|
||||
user << "<span class='notice'>Teleporter refunded.</span>"
|
||||
else
|
||||
user << "<span class='notice'>This teleporter is already used, or is currently being used.</span>"
|
||||
|
||||
user << "<span class='notice'>This teleporter is already used, or is currently being used.</span>"
|
||||
|
||||
// PRESET UPLINKS
|
||||
// A collection of preset uplinks.
|
||||
//
|
||||
|
||||
@@ -23,15 +23,14 @@
|
||||
// Reagent ID => friendly name
|
||||
var/list/reagents_to_log=list()
|
||||
|
||||
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state = default_state)
|
||||
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/state = default_state)
|
||||
// Calling Topic without a corresponding window open causes runtime errors
|
||||
if(!nowindow && ..())
|
||||
return 1
|
||||
|
||||
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
|
||||
// Instead any such checks are made in CanUseTopic()
|
||||
var/obj/host = nano_host()
|
||||
if(host.CanUseTopic(usr, href_list, custom_state) == STATUS_INTERACTIVE)
|
||||
if(CanUseTopic(usr, state, href_list) == STATUS_INTERACTIVE)
|
||||
CouldUseTopic(usr)
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user