mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 23:17:28 +01:00
NanoUI Goes To Brazil
This commit is contained in:
@@ -233,7 +233,6 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
||||
initialize_exonet(user)
|
||||
alert_called = 0
|
||||
update_icon()
|
||||
ui_interact(user) // TGUITODO: Remove
|
||||
tgui_interact(user)
|
||||
if(video_source)
|
||||
watch_video(user)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/in_hack_mode = 0
|
||||
var/list/known_targets
|
||||
var/list/supported_types
|
||||
var/datum/topic_state/default/must_hack/hack_state
|
||||
var/datum/tgui_state/default/must_hack/hack_state
|
||||
|
||||
/obj/item/device/multitool/hacktool/New()
|
||||
..()
|
||||
@@ -39,7 +39,8 @@
|
||||
if(!attempt_hack(user, A))
|
||||
return 0
|
||||
|
||||
A.ui_interact(user, state = hack_state)
|
||||
// Note, if you ever want to expand supported_types, you must manually add the custom state argument to their tgui_interact
|
||||
A.tgui_interact(user, custom_state = hack_state)
|
||||
return 1
|
||||
|
||||
/obj/item/device/multitool/hacktool/proc/attempt_hack(var/mob/user, var/atom/target)
|
||||
@@ -83,18 +84,18 @@
|
||||
/obj/item/device/multitool/hacktool/proc/on_target_destroy(var/target)
|
||||
known_targets -= target
|
||||
|
||||
/datum/topic_state/default/must_hack
|
||||
/datum/tgui_state/default/must_hack
|
||||
var/obj/item/device/multitool/hacktool/hacktool
|
||||
|
||||
/datum/topic_state/default/must_hack/New(var/hacktool)
|
||||
/datum/tgui_state/default/must_hack/New(var/hacktool)
|
||||
src.hacktool = hacktool
|
||||
..()
|
||||
|
||||
/datum/topic_state/default/must_hack/Destroy()
|
||||
/datum/tgui_state/default/must_hack/Destroy()
|
||||
hacktool = null
|
||||
return ..()
|
||||
|
||||
/datum/topic_state/default/must_hack/can_use_topic(var/src_object, var/mob/user)
|
||||
/datum/tgui_state/default/must_hack/can_use_topic(src_object, mob/user)
|
||||
if(!hacktool || !hacktool.in_hack_mode || !(src_object in hacktool.known_targets))
|
||||
return STATUS_CLOSE
|
||||
return ..()
|
||||
|
||||
@@ -151,14 +151,6 @@ var/global/list/default_medbay_channels = list(
|
||||
|
||||
return tgui_interact(user)
|
||||
|
||||
/obj/item/device/radio/ui_interact(mob/user, ui_key, datum/nanoui/ui, force_open, datum/nano_ui/master_ui, datum/topic_state/state)
|
||||
log_runtime(EXCEPTION("Warning: [user] attempted to call ui_interact on radio [src] [type]. This is deprecated. Please update the caller to tgui_interact."))
|
||||
|
||||
/obj/item/device/radio/Topic(href, href_list)
|
||||
if(href_list["track"])
|
||||
log_runtime(EXCEPTION("Warning: Topic() was improperly called on radio [src] [type], with the track href and \[[href] [json_encode(href_list)]]. Please update the caller to use tgui_act."))
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/radio/tgui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
popup.set_content(jointext(dat,null))
|
||||
popup.open()
|
||||
|
||||
/obj/item/device/tvcamera/Topic(bred, href_list, state = physical_state)
|
||||
/obj/item/device/tvcamera/Topic(bred, href_list, state = GLOB.tgui_physical_state)
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["channel"])
|
||||
|
||||
Reference in New Issue
Block a user