mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 05:38:15 +01:00
[MIRROR] Encode changes (#11301)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
5e6a4639d0
commit
4e2361f8df
@@ -183,7 +183,7 @@
|
||||
if(!check_interactivity(M))
|
||||
return
|
||||
|
||||
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name this?", "Rename", src.name, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name this?", "Rename", src.name, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(src && input)
|
||||
to_chat(M, span_notice("The machine now has a label reading '[input]'."))
|
||||
name = input
|
||||
|
||||
@@ -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(M, "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, encode = FALSE), 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
|
||||
|
||||
@@ -155,7 +155,6 @@ list[](
|
||||
switch(type_to_use)
|
||||
if("string")
|
||||
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
|
||||
|
||||
@@ -103,8 +103,7 @@
|
||||
power_draw_per_use = 4
|
||||
|
||||
/obj/item/integrated_circuit/input/textpad/ask_for_input(mob/user)
|
||||
var/new_input = tgui_input_text(user, "Enter some words, please.","Number pad", get_pin_data(IC_OUTPUT, 1),MAX_KEYPAD_INPUT_LEN, encode=FALSE)
|
||||
new_input = sanitize(new_input,MAX_KEYPAD_INPUT_LEN) // Slightly increase the size of the character limit.
|
||||
var/new_input = tgui_input_text(user, "Enter some words, please.", "Text pad", get_pin_data(IC_OUTPUT, 1), MAX_KEYPAD_INPUT_LEN)
|
||||
if(istext(new_input) && CanInteract(user, GLOB.tgui_physical_state))
|
||||
set_pin_data(IC_OUTPUT, 1, new_input)
|
||||
push_data()
|
||||
|
||||
@@ -96,14 +96,13 @@
|
||||
switch(type_to_use)
|
||||
if("string")
|
||||
accepting_refs = 0
|
||||
new_data = tgui_input_text(user, "Now type in a string.","[src] string writing", MAX_NAME_LEN)
|
||||
new_data = sanitize(new_data,MAX_NAME_LEN)
|
||||
new_data = tgui_input_text(user, "Now type in a string.","[src] string writing","", MAX_NAME_LEN)
|
||||
if(istext(new_data) && CanInteract(user, GLOB.tgui_physical_state))
|
||||
O.data = new_data
|
||||
to_chat(user, span_notice("You set \the [src]'s memory to [O.display_data(O.data)]."))
|
||||
if("number")
|
||||
accepting_refs = 0
|
||||
new_data = tgui_input_number(user, "Now type in a number.","[src] number writing", MAX_NAME_LEN)
|
||||
new_data = tgui_input_number(user, "Now type in a number.","[src] number writing", 0)
|
||||
if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state))
|
||||
O.data = new_data
|
||||
to_chat(user, span_notice("You set \the [src]'s memory to [O.display_data(O.data)]."))
|
||||
|
||||
Reference in New Issue
Block a user