Revert "TGUI alerts, lists, inputs"

This commit is contained in:
Letter N
2021-10-28 12:17:29 +08:00
committed by GitHub
parent 853ff1d8ad
commit bcdf96f274
362 changed files with 1149 additions and 1570 deletions
+3 -3
View File
@@ -17,16 +17,16 @@
to_chat(c, "<span class='notice'>***********************************************************</span>")
/datum/buildmode_mode/advanced/change_settings(client/c)
var/target_path = tgui_input_text(c, "Enter typepath:", "Typepath", "/obj/structure/closet")
var/target_path = input(c, "Enter typepath:", "Typepath", "/obj/structure/closet")
objholder = text2path(target_path)
if(!ispath(objholder))
objholder = pick_closest_path(target_path)
if(!objholder)
tgui_alert(c, "No path was selected")
alert("No path was selected")
return
else if(ispath(objholder, /area))
objholder = null
tgui_alert(c, "That path is not allowed.")
alert("That path is not allowed.")
return
/datum/buildmode_mode/advanced/handle_click(client/c, params, obj/object)
+2 -2
View File
@@ -28,10 +28,10 @@
to_chat(c, "<span class='notice'>***********************************************************</span>")
/datum/buildmode_mode/area_edit/change_settings(client/c)
var/target_path = tgui_input_text(c, "Enter typepath:", "Typepath", "/area")
var/target_path = input(c, "Enter typepath:", "Typepath", "/area")
var/areatype = text2path(target_path)
if(ispath(areatype,/area))
var/areaname = tgui_input_text(c, "Enter area name:", "Area name", "Area")
var/areaname = input(c, "Enter area name:", "Area name", "Area")
if(!areaname || !length(areaname))
return
storedarea = new areatype
+5 -5
View File
@@ -14,19 +14,19 @@
to_chat(c, "<span class='notice'>***********************************************************</span>")
/datum/buildmode_mode/boom/change_settings(client/c)
devastation = tgui_input_num(c, "Range of total devastation. -1 to none", text("Input"))
devastation = input(c, "Range of total devastation. -1 to none", text("Input")) as num|null
if(devastation == null)
devastation = -1
heavy = tgui_input_num(c, "Range of heavy impact. -1 to none", text("Input"))
heavy = input(c, "Range of heavy impact. -1 to none", text("Input")) as num|null
if(heavy == null)
heavy = -1
light = tgui_input_num(c, "Range of light impact. -1 to none", text("Input"))
light = input(c, "Range of light impact. -1 to none", text("Input")) as num|null
if(light == null)
light = -1
flash = tgui_input_num(c, "Range of flash. -1 to none", text("Input"))
flash = input(c, "Range of flash. -1 to none", text("Input")) as num|null
if(flash == null)
flash = -1
flames = tgui_input_num(c, "Range of flames. -1 to none", text("Input"))
flames = input(c, "Range of flames. -1 to none", text("Input")) as num|null
if(flames == null)
flames = -1
+4 -4
View File
@@ -1,6 +1,6 @@
/datum/buildmode_mode/fill
key = "fill"
use_corner_selection = TRUE
var/objholder = null
@@ -12,16 +12,16 @@
to_chat(c, "<span class='notice'>***********************************************************</span>")
/datum/buildmode_mode/fill/change_settings(client/c)
var/target_path = tgui_input_text(c, "Enter typepath:" ,"Typepath","/obj/structure/closet")
var/target_path = input(c, "Enter typepath:" ,"Typepath","/obj/structure/closet")
objholder = text2path(target_path)
if(!ispath(objholder))
objholder = pick_closest_path(target_path)
if(!objholder)
tgui_alert(c, "No path has been selected.")
alert("No path has been selected.")
return
else if(ispath(objholder, /area))
objholder = null
tgui_alert(c, "Area paths are not supported for this mode, use the area edit mode instead.")
alert("Area paths are not supported for this mode, use the area edit mode instead.")
return
deselect_region()
+2 -2
View File
@@ -16,7 +16,7 @@
for(var/path in gen_paths)
var/datum/mapGenerator/MP = path
options[initial(MP.buildmode_name)] = path
var/type = tgui_input_list(c,"Select Generator Type","Type", options)
var/type = input(c,"Select Generator Type","Type") as null|anything in options
if(!type)
return
@@ -42,7 +42,7 @@
return
G.defineRegion(cornerA, cornerB, 1)
highlight_region(G.map)
var/confirm = tgui_alert(c, "Are you sure you want run the map generator?", "Run generator", list("Yes", "No"))
var/confirm = alert("Are you sure you want run the map generator?", "Run generator", "Yes", "No")
if(confirm == "Yes")
G.generate()
log_admin("Build Mode: [key_name(c)] ran the map generator '[G.buildmode_name]' in the region from [AREACOORD(cornerA)] to [AREACOORD(cornerB)]")
@@ -22,8 +22,8 @@
valueholder = null
/datum/buildmode_mode/varedit/change_settings(client/c)
varholder = tgui_input_text(c, "Enter variable name:" ,"Name", "name")
varholder = input(c, "Enter variable name:" ,"Name", "name")
if(!vv_varname_lockcheck(varholder))
return