mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 20:17:15 +01:00
Merge branch 'master' of https://github.com/VOREStation/VOREStation into upstream-merge-8298
This commit is contained in:
@@ -176,7 +176,7 @@
|
||||
if(!check_interactivity(M))
|
||||
return
|
||||
|
||||
var/input = sanitizeSafe(input(usr, "What do you want to name this?", "Rename", src.name) as null|text, MAX_NAME_LEN)
|
||||
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name this?", "Rename", src.name, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
if(src && input)
|
||||
to_chat(M, "<span class='notice'>The machine now has a label reading '[input]'.</span>")
|
||||
name = input
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
if(!T.AdjacentQuick(user)) // So people aren't messing with these from across the room
|
||||
return FALSE
|
||||
var/obj/item/I = user.get_active_hand() // ctrl-shift-click doesn't give us the item, we have to fetch it
|
||||
if(!I)
|
||||
return FALSE
|
||||
return IC.attackby(I, user)
|
||||
|
||||
/obj/item/clothing/attack_self(mob/user)
|
||||
|
||||
@@ -68,7 +68,7 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
if(!check_interactivity(M))
|
||||
return
|
||||
|
||||
var/input = sanitizeSafe(input(usr, "What do you want to name the circuit?", "Rename", src.name) as null|text, MAX_NAME_LEN)
|
||||
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the circuit?", "Rename", src.name, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
if(src && input && assembly.check_interactivity(M))
|
||||
to_chat(M, "<span class='notice'>The circuit '[src.name]' is now labeled '[input]'.</span>")
|
||||
displayed_name = input
|
||||
|
||||
@@ -154,12 +154,12 @@ list[](
|
||||
var/new_data = null
|
||||
switch(type_to_use)
|
||||
if("string")
|
||||
new_data = input(usr, "Now type in a string.","[src] string writing", istext(default) ? default : null) as null|text
|
||||
new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing", istext(default) ? default : null)
|
||||
if(istext(new_data) && holder.check_interactivity(user) )
|
||||
to_chat(user, "<span class='notice'>You input [new_data] into the pin.</span>")
|
||||
return new_data
|
||||
if("number")
|
||||
new_data = input(usr, "Now type in a number.","[src] number writing", isnum(default) ? default : null) as null|num
|
||||
new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing", isnum(default) ? default : null)
|
||||
if(isnum(new_data) && holder.check_interactivity(user) )
|
||||
to_chat(user, "<span class='notice'>You input [new_data] into the pin.</span>")
|
||||
return new_data
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "char pin"
|
||||
|
||||
/datum/integrated_io/char/ask_for_pin_data(mob/user)
|
||||
var/new_data = input(usr, "Please type in one character.","[src] char writing") as null|text
|
||||
var/new_data = tgui_input_text(usr, "Please type in one character.","[src] char writing")
|
||||
if(holder.check_interactivity(user) )
|
||||
to_chat(user, "<span class='notice'>You input [new_data ? "new_data" : "NULL"] into the pin.</span>")
|
||||
write_data_to_pin(new_data)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "dir pin"
|
||||
|
||||
/datum/integrated_io/dir/ask_for_pin_data(mob/user)
|
||||
var/new_data = input(usr, "Please type in a valid dir number. \
|
||||
var/new_data = tgui_input_number(usr, "Please type in a valid dir number. \
|
||||
Valid dirs are;\n\
|
||||
North/Fore = [NORTH],\n\
|
||||
South/Aft = [SOUTH],\n\
|
||||
@@ -14,7 +14,7 @@
|
||||
Southeast = [SOUTHEAST],\n\
|
||||
Southwest = [SOUTHWEST],\n\
|
||||
Up = [UP],\n\
|
||||
Down = [DOWN]","[src] dir writing") as null|num
|
||||
Down = [DOWN]","[src] dir writing")
|
||||
if(isnum(new_data) && holder.check_interactivity(user) )
|
||||
to_chat(user, "<span class='notice'>You input [new_data] into the pin.</span>")
|
||||
write_data_to_pin(new_data)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// data = 0
|
||||
|
||||
/datum/integrated_io/number/ask_for_pin_data(mob/user)
|
||||
var/new_data = input(usr, "Please type in a number.","[src] number writing") as null|num
|
||||
var/new_data = tgui_input_number(usr, "Please type in a number.","[src] number writing")
|
||||
if(isnum(new_data) && holder.check_interactivity(user) )
|
||||
to_chat(user, "<span class='notice'>You input [new_data] into the pin.</span>")
|
||||
write_data_to_pin(new_data)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "string pin"
|
||||
|
||||
/datum/integrated_io/string/ask_for_pin_data(mob/user)
|
||||
var/new_data = input(usr, "Please type in a string.","[src] string writing") as null|text
|
||||
var/new_data = tgui_input_text(usr, "Please type in a string.","[src] string writing")
|
||||
new_data = sanitizeSafe(new_data, MAX_MESSAGE_LEN, 0, 0)
|
||||
|
||||
if(new_data && holder.check_interactivity(user) )
|
||||
|
||||
@@ -122,14 +122,14 @@
|
||||
switch(type_to_use)
|
||||
if("string")
|
||||
accepting_refs = 0
|
||||
new_data = input(usr, "Now type in a string.","[src] string writing") as null|text
|
||||
new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing")
|
||||
new_data = sanitizeSafe(new_data, MAX_MESSAGE_LEN, 0, 0)
|
||||
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(usr, "Now type in a number.","[src] number writing") as null|num
|
||||
new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing")
|
||||
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>")
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
power_draw_per_use = 4
|
||||
|
||||
/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
|
||||
var/new_input = tgui_input_number(user, "Enter a number, please.","Number pad", get_pin_data(IC_OUTPUT, 1))
|
||||
if(isnum(new_input) && CanInteract(user, GLOB.tgui_physical_state))
|
||||
set_pin_data(IC_OUTPUT, 1, new_input)
|
||||
push_data()
|
||||
@@ -72,7 +72,7 @@
|
||||
power_draw_per_use = 4
|
||||
|
||||
/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
|
||||
var/new_input = tgui_input_text(user, "Enter some words, please.","Number pad", get_pin_data(IC_OUTPUT, 1))
|
||||
if(istext(new_input) && CanInteract(user, GLOB.tgui_physical_state))
|
||||
set_pin_data(IC_OUTPUT, 1, new_input)
|
||||
push_data()
|
||||
@@ -414,7 +414,7 @@
|
||||
|
||||
if(loc)
|
||||
for(var/mob/O in hearers(1, get_turf(src)))
|
||||
O.show_message("[bicon(src)] *beep* *beep*", 3, "*beep* *beep*", 2)
|
||||
O.show_message("\icon[src][bicon(src)] *beep* *beep*", 3, "*beep* *beep*", 2)
|
||||
|
||||
/obj/item/integrated_circuit/input/EPv2
|
||||
name = "\improper EPv2 circuit"
|
||||
|
||||
@@ -96,13 +96,13 @@
|
||||
switch(type_to_use)
|
||||
if("string")
|
||||
accepting_refs = 0
|
||||
new_data = input(usr, "Now type in a string.","[src] string writing") as null|text
|
||||
new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing")
|
||||
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(usr, "Now type in a number.","[src] number writing") as null|num
|
||||
new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing")
|
||||
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>")
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
var/list/nearby_things = range(0, get_turf(src))
|
||||
for(var/mob/M in nearby_things)
|
||||
var/obj/O = assembly ? assembly : src
|
||||
to_chat(M, "<span class='notice'>[bicon(O)] [stuff_to_display]</span>")
|
||||
to_chat(M, "<span class='notice'>\icon[O][bicon(O)] [stuff_to_display]</span>")
|
||||
|
||||
/obj/item/integrated_circuit/output/screen/large
|
||||
name = "large screen"
|
||||
@@ -56,7 +56,7 @@
|
||||
/obj/item/integrated_circuit/output/screen/large/do_work()
|
||||
..()
|
||||
var/obj/O = assembly ? loc : assembly
|
||||
O.visible_message("<span class='notice'>[bicon(O)] [stuff_to_display]</span>")
|
||||
O.visible_message("<span class='notice'>\icon[O][bicon(O)] [stuff_to_display]</span>")
|
||||
|
||||
/obj/item/integrated_circuit/output/light
|
||||
name = "light"
|
||||
@@ -134,7 +134,7 @@
|
||||
text = get_pin_data(IC_INPUT, 1)
|
||||
if(!isnull(text))
|
||||
var/obj/O = assembly ? loc : assembly
|
||||
audible_message("[bicon(O)] \The [O.name] states, \"[text]\"", runemessage = text)
|
||||
audible_message("\icon[O][bicon(O)] \The [O.name] states, \"[text]\"", runemessage = text)
|
||||
|
||||
/obj/item/integrated_circuit/output/text_to_speech/advanced
|
||||
name = "advanced text-to-speech circuit"
|
||||
@@ -259,15 +259,28 @@
|
||||
/obj/item/integrated_circuit/output/video_camera
|
||||
name = "video camera circuit"
|
||||
desc = "This small camera allows a remote viewer to see what it sees."
|
||||
extended_desc = "The camera is linked to the Research camera network."
|
||||
var/list/networks = list(
|
||||
"research" = NETWORK_CIRCUITS,
|
||||
"engine" = NETWORK_ENGINE,
|
||||
"engineering" = NETWORK_ENGINEERING,
|
||||
"mining" = NETWORK_MINE,
|
||||
"medical" = NETWORK_MEDICAL,
|
||||
"entertainment" = NETWORK_THUNDER,
|
||||
"security" = NETWORK_SECURITY,
|
||||
"command" = NETWORK_COMMAND
|
||||
)
|
||||
icon_state = "video_camera"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
complexity = 10
|
||||
inputs = list(
|
||||
"camera name" = IC_PINTYPE_STRING,
|
||||
"camera network" = IC_PINTYPE_STRING,
|
||||
"camera active" = IC_PINTYPE_BOOLEAN
|
||||
)
|
||||
inputs_default = list("1" = "video camera circuit")
|
||||
inputs_default = list(
|
||||
"1" = "video camera circuit",
|
||||
"2" = "research"
|
||||
)
|
||||
outputs = list()
|
||||
activators = list()
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
@@ -276,6 +289,11 @@
|
||||
|
||||
/obj/item/integrated_circuit/output/video_camera/Initialize()
|
||||
. = ..()
|
||||
extended_desc = list()
|
||||
extended_desc += "Network choices are; "
|
||||
extended_desc += jointext(networks, ", ")
|
||||
extended_desc += "."
|
||||
extended_desc = jointext(extended_desc, null)
|
||||
camera = new(src)
|
||||
on_data_written()
|
||||
|
||||
@@ -294,10 +312,20 @@
|
||||
/obj/item/integrated_circuit/output/video_camera/on_data_written()
|
||||
if(camera)
|
||||
var/cam_name = get_pin_data(IC_INPUT, 1)
|
||||
var/cam_active = get_pin_data(IC_INPUT, 2)
|
||||
var/cam_network = get_pin_data(IC_INPUT, 2)
|
||||
var/cam_active = get_pin_data(IC_INPUT, 3)
|
||||
if(!isnull(cam_name))
|
||||
camera.c_tag = cam_name
|
||||
camera.replace_networks(list(cam_network))
|
||||
set_camera_status(cam_active)
|
||||
if(isnull(cam_network))
|
||||
camera.clear_all_networks()
|
||||
return
|
||||
var/selected_network = networks[cam_network]
|
||||
if(!selected_network)
|
||||
camera.clear_all_networks()
|
||||
return
|
||||
camera.replace_networks(list(selected_network))
|
||||
|
||||
/obj/item/integrated_circuit/output/video_camera/power_fail()
|
||||
if(camera)
|
||||
|
||||
Reference in New Issue
Block a user