NanoUI Goes To Brazil

This commit is contained in:
ShadowLarkens
2020-09-20 02:20:55 -07:00
parent e18fb0fd7e
commit 3f191e4204
150 changed files with 102 additions and 17465 deletions

View File

@@ -78,7 +78,7 @@
output.assembly = src
/obj/item/device/electronic_assembly/device/check_interactivity(mob/user)
if(!CanInteract(user, state = deep_inventory_state))
if(!CanInteract(user, state = GLOB.tgui_deep_inventory_state))
return 0
return 1

View File

@@ -40,8 +40,8 @@ D [1]/ ||
holder = null
. = ..()
/datum/integrated_io/nano_host()
return holder.nano_host()
/datum/integrated_io/tgui_host()
return holder.tgui_host()
/datum/integrated_io/proc/data_as_type(var/as_type)

View File

@@ -117,7 +117,7 @@
/datum/integrated_io/list/display_pin_type()
return IC_FORMAT_LIST
/datum/integrated_io/list/Topic(href, href_list, state = interactive_state)
/datum/integrated_io/list/Topic(href, href_list, state = GLOB.tgui_always_state)
if(!holder.check_interactivity(usr))
return
if(..())

View File

@@ -115,7 +115,7 @@
/obj/item/device/integrated_electronics/debugger/attack_self(mob/user)
var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number","ref", "null")
if(!CanInteract(user, physical_state))
if(!CanInteract(user, GLOB.tgui_physical_state))
return
var/new_data = null
@@ -124,13 +124,13 @@
accepting_refs = 0
new_data = input("Now type in a string.","[src] string writing") as null|text
new_data = sanitizeSafe(new_data, MAX_MESSAGE_LEN, 0, 0)
if(istext(new_data) && CanInteract(user, physical_state))
if(istext(new_data) && CanInteract(user, GLOB.tgui_physical_state))
data_to_write = new_data
to_chat(user, "<span class='notice'>You set \the [src]'s memory to \"[new_data]\".</span>")
if("number")
accepting_refs = 0
new_data = input("Now type in a number.","[src] number writing") as null|num
if(isnum(new_data) && CanInteract(user, physical_state))
if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state))
data_to_write = new_data
to_chat(user, "<span class='notice'>You set \the [src]'s memory to [new_data].</span>")
if("ref")

View File

@@ -54,7 +54,7 @@
/obj/item/integrated_circuit/input/numberpad/ask_for_input(mob/user)
var/new_input = input(user, "Enter a number, please.","Number pad", get_pin_data(IC_OUTPUT, 1)) as null|num
if(isnum(new_input) && CanInteract(user, physical_state))
if(isnum(new_input) && CanInteract(user, GLOB.tgui_physical_state))
set_pin_data(IC_OUTPUT, 1, new_input)
push_data()
activate_pin(1)
@@ -73,7 +73,7 @@
/obj/item/integrated_circuit/input/textpad/ask_for_input(mob/user)
var/new_input = input(user, "Enter some words, please.","Number pad", get_pin_data(IC_OUTPUT, 1)) as null|text
if(istext(new_input) && CanInteract(user, physical_state))
if(istext(new_input) && CanInteract(user, GLOB.tgui_physical_state))
set_pin_data(IC_OUTPUT, 1, new_input)
push_data()
activate_pin(1)
@@ -92,7 +92,7 @@
/obj/item/integrated_circuit/input/colorpad/ask_for_input(mob/user)
var/new_color = input(user, "Enter a color, please.", "Color pad", get_pin_data(IC_OUTPUT, 1)) as color|null
if(new_color && CanInteract(user, physical_state))
if(new_color && CanInteract(user, GLOB.tgui_physical_state))
set_pin_data(IC_OUTPUT, 1, new_color)
push_data()
activate_pin(1)

View File

@@ -89,7 +89,7 @@
/obj/item/integrated_circuit/memory/constant/attack_self(mob/user)
var/datum/integrated_io/O = outputs[1]
var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number","ref", "null")
if(!CanInteract(user, physical_state))
if(!CanInteract(user, GLOB.tgui_physical_state))
return
var/new_data = null
@@ -97,13 +97,13 @@
if("string")
accepting_refs = 0
new_data = input("Now type in a string.","[src] string writing") as null|text
if(istext(new_data) && CanInteract(user, physical_state))
if(istext(new_data) && CanInteract(user, GLOB.tgui_physical_state))
O.data = new_data
to_chat(user, "<span class='notice'>You set \the [src]'s memory to [O.display_data(O.data)].</span>")
if("number")
accepting_refs = 0
new_data = input("Now type in a number.","[src] number writing") as null|num
if(isnum(new_data) && CanInteract(user, physical_state))
if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state))
O.data = new_data
to_chat(user, "<span class='notice'>You set \the [src]'s memory to [O.display_data(O.data)].</span>")
if("ref")