[MIRROR] usr to user part two (#10015)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-01-31 14:27:34 -07:00
committed by GitHub
parent 538c8e7187
commit a245b8687f
203 changed files with 974 additions and 993 deletions

View File

@@ -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(tgui_input_text(usr, "What do you want to name the circuit?", "Rename", src.name, MAX_NAME_LEN), MAX_NAME_LEN)
var/input = sanitizeSafe(tgui_input_text(M, "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_notice("The circuit '[src.name]' is now labeled '[input]'."))
displayed_name = input

View File

@@ -147,20 +147,20 @@ list[](
src.linked.Remove(their_io)
/datum/integrated_io/proc/ask_for_data_type(mob/user, var/default, var/list/allowed_data_types = list("string","number","null"))
var/type_to_use = tgui_input_list(usr, "Please choose a type to use.","[src] type setting", allowed_data_types)
var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", allowed_data_types)
if(!holder.check_interactivity(user))
return
var/new_data = null
switch(type_to_use)
if("string")
new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing", istext(default) ? default : null, MAX_NAME_LEN)
new_data = tgui_input_text(user, "Now type in a string.","[src] string writing", istext(default) ? default : null, MAX_NAME_LEN)
new_data = sanitize(new_data,MAX_NAME_LEN)
if(istext(new_data) && holder.check_interactivity(user) )
to_chat(user, span_notice("You input [new_data] into the pin."))
return new_data
if("number")
new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing", isnum(default) ? default : null, MAX_NAME_LEN)
new_data = tgui_input_number(user, "Now type in a number.","[src] number writing", isnum(default) ? default : null, MAX_NAME_LEN)
if(isnum(new_data) && holder.check_interactivity(user) )
to_chat(user, span_notice("You input [new_data] into the pin."))
return new_data

View File

@@ -3,7 +3,7 @@
name = "char pin"
/datum/integrated_io/char/ask_for_pin_data(mob/user)
var/new_data = tgui_input_text(usr, "Please type in one character.","[src] char writing")
var/new_data = tgui_input_text(user, "Please type in one character.","[src] char writing")
if(holder.check_interactivity(user) )
to_chat(user, span_notice("You input [new_data ? "new_data" : "NULL"] into the pin."))
write_data_to_pin(new_data)

View File

@@ -3,7 +3,7 @@
name = "color pin"
/datum/integrated_io/color/ask_for_pin_data(mob/user)
var/new_data = input(usr, "Please select a color.","[src] color writing", data ? data : "#000000") as null|color
var/new_data = input(user, "Please select a color.","[src] color writing", data ? data : "#000000") as null|color
if(holder.check_interactivity(user) )
to_chat(user, span_notice("You input a <font color='[new_data]'>new color</font> into the pin."))
write_data_to_pin(new_data)

View File

@@ -3,7 +3,7 @@
name = "dir pin"
/datum/integrated_io/dir/ask_for_pin_data(mob/user)
var/new_data = tgui_input_number(usr, "Please type in a valid dir number. \
var/new_data = tgui_input_number(user, "Please type in a valid dir number. \
Valid dirs are;\n\
North/Fore = [NORTH],\n\
South/Aft = [SOUTH],\n\

View File

@@ -53,7 +53,7 @@
to_chat(user, span_warning("The list is empty, there's nothing to remove."))
return
if(!target_entry)
target_entry = tgui_input_list(usr, "Which piece of data do you want to remove?", "Remove", my_list)
target_entry = tgui_input_list(user, "Which piece of data do you want to remove?", "Remove", my_list)
if(target_entry)
my_list.Remove(target_entry)
@@ -63,7 +63,7 @@
to_chat(user, span_warning("The list is empty, there's nothing to modify."))
return
if(!target_entry)
target_entry = tgui_input_list(usr, "Which piece of data do you want to edit?", "Edit", my_list)
target_entry = tgui_input_list(user, "Which piece of data do you want to edit?", "Edit", my_list)
if(target_entry)
var/edited_entry = ask_for_data_type(user, target_entry)
if(edited_entry)
@@ -88,11 +88,11 @@
to_chat(user, span_warning("The list is empty, or too small to do any meaningful swapping."))
return
if(!first_target)
first_target = tgui_input_list(usr, "Which piece of data do you want to swap? (1)", "Swap", my_list)
first_target = tgui_input_list(user, "Which piece of data do you want to swap? (1)", "Swap", my_list)
if(first_target)
if(!second_target)
second_target = tgui_input_list(usr, "Which piece of data do you want to swap? (2)", "Swap", my_list - first_target)
second_target = tgui_input_list(user, "Which piece of data do you want to swap? (2)", "Swap", my_list - first_target)
if(second_target)
var/first_pos = my_list.Find(first_target)

View File

@@ -4,7 +4,7 @@
// data = 0
/datum/integrated_io/number/ask_for_pin_data(mob/user)
var/new_data = tgui_input_number(usr, "Please type in a number.","[src] number writing")
var/new_data = tgui_input_number(user, "Please type in a number.","[src] number writing")
if(isnum(new_data) && holder.check_interactivity(user) )
to_chat(user, span_notice("You input [new_data] into the pin."))
write_data_to_pin(new_data)

View File

@@ -3,7 +3,7 @@
name = "string pin"
/datum/integrated_io/string/ask_for_pin_data(mob/user)
var/new_data = tgui_input_text(usr, "Please type in a string.","[src] string writing")
var/new_data = tgui_input_text(user, "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) )

View File

@@ -114,7 +114,7 @@
var/accepting_refs = 0
/obj/item/integrated_electronics/debugger/attack_self(mob/user)
var/type_to_use = tgui_input_list(usr, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null"))
var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null"))
if(!CanInteract(user, GLOB.tgui_physical_state))
return
@@ -122,14 +122,14 @@
switch(type_to_use)
if("string")
accepting_refs = 0
new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing", null, MAX_MESSAGE_LEN)
new_data = tgui_input_text(user, "Now type in a string.","[src] string writing", null, MAX_MESSAGE_LEN)
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_notice("You set \the [src]'s memory to \"[new_data]\"."))
if("number")
accepting_refs = 0
new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing", min_value=-INFINITY, round_value=FALSE)
new_data = tgui_input_number(user, "Now type in a number.","[src] number writing", min_value=-INFINITY, round_value=FALSE)
if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state))
data_to_write = new_data
to_chat(user, span_notice("You set \the [src]'s memory to [new_data]."))