Merge remote-tracking branch 'upstream/master' into familyport
This commit is contained in:
@@ -151,7 +151,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engineerin
|
||||
if(!place.requires_power || (place.area_flags & NOTELEPORT) || (place.area_flags & HIDDEN_AREA))
|
||||
continue // No expanding powerless rooms etc
|
||||
areas[place.name] = place
|
||||
var/area_choice = input(creator, "Choose an area to expand or make a new area.", "Area Expansion") as null|anything in areas
|
||||
var/area_choice = tgui_input_list(creator, "Choose an area to expand or make a new area.", "Area Expansion", areas)
|
||||
area_choice = areas[area_choice]
|
||||
|
||||
if(!area_choice)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
S["real_name"] >> name
|
||||
if(name)
|
||||
characters[name] = i
|
||||
var/chosen_name = input(C, "Which character do you wish to use as your appearance.") as anything in characters
|
||||
var/chosen_name = tgui_input_list(C, "Which character do you wish to use as your appearance.", "", characters)
|
||||
if(chosen_name)
|
||||
if(C.prefs.last_custom_holoform > world.time - CUSTOM_HOLOFORM_DELAY)
|
||||
to_chat(C.mob, "<span class='boldwarning'>You are attempting to set your custom holoform too fast!</span>")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
if(path != root)
|
||||
choices.Insert(1,"/")
|
||||
|
||||
var/choice = input(src,"Choose a file to access:","Download",null) as null|anything in choices
|
||||
var/choice = tgui_input_list(src,"Choose a file to access:","Download", choices)
|
||||
switch(choice)
|
||||
if(null)
|
||||
return
|
||||
|
||||
@@ -75,11 +75,11 @@
|
||||
|
||||
/proc/choose_reagent_id(mob/user)
|
||||
var/chosen_id
|
||||
switch(alert(user, "Choose a method.", "Add Reagents", "Search", "Choose from a list", "I'm feeling lucky"))
|
||||
switch(tgui_alert(user, "Choose a method.", "Add Reagents", list("Search", "Choose from a list", "I'm feeling lucky")))
|
||||
if("Search")
|
||||
var/valid_id
|
||||
while(!valid_id)
|
||||
chosen_id = input(user, "Enter the ID of the reagent you want to add.", "Search reagents") as null|text
|
||||
chosen_id = tgui_input_text(user, "Enter the ID of the reagent you want to add.", "Search reagents")
|
||||
if(isnull(chosen_id)) //Get me out of here!
|
||||
break
|
||||
if(!ispath(text2path(chosen_id)))
|
||||
@@ -91,7 +91,7 @@
|
||||
if(!valid_id)
|
||||
to_chat(user, "<span class='warning'>A reagent with that ID doesn't exist!</span>")
|
||||
if("Choose from a list")
|
||||
chosen_id = input(user, "Choose a reagent to add.", "Choose a reagent.") as null|anything in subtypesof(/datum/reagent)
|
||||
chosen_id = tgui_input_list(user, "Choose a reagent to add.", "Choose a reagent.", subtypesof(/datum/reagent))
|
||||
if("I'm feeling lucky")
|
||||
chosen_id = pick(subtypesof(/datum/reagent))
|
||||
return chosen_id
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/proc/sanitize_name(t,list/repl_chars = null)
|
||||
if(t == "space" || t == "floor" || t == "wall" || t == "r-wall" || t == "monkey" || t == "unknown" || t == "inactive ai") //prevents these common metagamey names
|
||||
alert("Invalid name.")
|
||||
tgui_alert(usr, "Invalid name.")
|
||||
return ""
|
||||
return sanitize(t)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
// Used to get a properly sanitized input, of max_length
|
||||
// no_trim is self explanatory but it prevents the input from being trimed if you intend to parse newlines or whitespace.
|
||||
/proc/stripped_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
|
||||
var/name = input(user, message, title, default) as text|null
|
||||
var/name = tgui_input_text(user, message, title, default)
|
||||
if(no_trim)
|
||||
return copytext(html_encode(name), 1, max_length)
|
||||
else
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
// Used to get a properly sanitized multiline input, of max_length
|
||||
/proc/stripped_multiline_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
|
||||
var/name = input(user, message, title, default) as message|null
|
||||
var/name = tgui_input_message(user, message, title, default)
|
||||
if(isnull(name)) // Return null if canceled.
|
||||
return null
|
||||
if(no_trim)
|
||||
@@ -113,7 +113,7 @@
|
||||
* stripped_multiline_input but reflects to the user instead if it's too big and returns null.
|
||||
*/
|
||||
/proc/stripped_multiline_input_or_reflect(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
|
||||
var/name = input(user, message, title, default) as message|null
|
||||
var/name = tgui_input_message(user, message, title, default)
|
||||
if(isnull(name)) // Return null if canceled.
|
||||
return null
|
||||
if(length(name) > max_length)
|
||||
|
||||
@@ -249,7 +249,7 @@ Turf and target are separate in case you want to teleport some distance from a t
|
||||
var/list/borgs = active_free_borgs()
|
||||
if(borgs.len)
|
||||
if(user)
|
||||
. = input(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs[1]) in borgs
|
||||
. = tgui_input_list(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs)
|
||||
else
|
||||
. = pick(borgs)
|
||||
return .
|
||||
@@ -258,7 +258,7 @@ Turf and target are separate in case you want to teleport some distance from a t
|
||||
var/list/ais = active_ais()
|
||||
if(ais.len)
|
||||
if(user)
|
||||
. = input(user,"AI signals detected:", "AI Selection", ais[1]) in ais
|
||||
. = tgui_input_list(user,"AI signals detected:", "AI Selection", ais)
|
||||
else
|
||||
. = pick(ais)
|
||||
return .
|
||||
@@ -1075,7 +1075,7 @@ B --><-- A
|
||||
|
||||
/proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
|
||||
if (value == FALSE) //nothing should be calling us with a number, so this is safe
|
||||
value = input("Enter type to find (blank for all, cancel to cancel)", "Search for type") as null|text
|
||||
value = tgui_input_text(usr, "Enter type to find (blank for all, cancel to cancel)", "Search for type")
|
||||
if (isnull(value))
|
||||
return
|
||||
value = trim(value)
|
||||
@@ -1089,7 +1089,7 @@ B --><-- A
|
||||
if(matches.len==1)
|
||||
chosen = matches[1]
|
||||
else
|
||||
chosen = input("Select a type", "Pick Type", matches[1]) as null|anything in matches
|
||||
chosen = tgui_input_list(usr, "Select a type", "Pick Type", matches)
|
||||
if(!chosen)
|
||||
return
|
||||
chosen = matches[chosen]
|
||||
|
||||
Reference in New Issue
Block a user