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
@@ -6,7 +6,7 @@
if(!SSdbcore.IsConnected())
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
return
var/memotask = tgui_input_list(usr,"Choose task.","Memo", list("Show","Write","Edit","Remove"))
var/memotask = input(usr,"Choose task.","Memo") in list("Show","Write","Edit","Remove")
if(!memotask)
return
mentor_memo_output(memotask)
@@ -43,7 +43,7 @@
return
qdel(query_memocheck)
var/memotext = tgui_input_message(src,"Write your Memo","Memo")
var/memotext = input(src,"Write your Memo","Memo") as message
if(!memotext)
return
var/datum/db_query/query_memoadd = SSdbcore.NewQuery({"
@@ -73,7 +73,7 @@
if(!memolist.len)
to_chat(src, "No memos found in database.")
return
var/target_ckey = tgui_input_list(src, "Select whose memo to edit", "Select memo", memolist)
var/target_ckey = input(src, "Select whose memo to edit", "Select memo") as null|anything in memolist
if(!target_ckey)
return
var/datum/db_query/query_memofind = SSdbcore.NewQuery({"
@@ -87,7 +87,7 @@
if(query_memofind.NextRow())
var/old_memo = query_memofind.item[1]
qdel(query_memofind)
var/new_memo = tgui_input_message(src, "Input new memo", "New Memo", "[old_memo]")
var/new_memo = input("Input new memo", "New Memo", "[old_memo]", null) as message
if(!new_memo)
return
var/edit_text = "Edited by [ckey] on [SQLtime()] from<br>[old_memo]<br>to<br>[new_memo]<hr>"
@@ -146,7 +146,7 @@
if(!memolist.len)
to_chat(src, "No memos found in database.")
return
var/target_ckey = tgui_input_list(src, "Select whose mentor memo to delete", "Select mentor memo", memolist)
var/target_ckey = input(src, "Select whose mentor memo to delete", "Select mentor memo") as null|anything in memolist
if(!target_ckey)
return
var/datum/db_query/query_memodel = SSdbcore.NewQuery({"
@@ -10,7 +10,7 @@
targets["[T]"] = T
var/list/sorted = sortList(targets)
var/target = tgui_input_list(src,"To whom shall we send a message?","Mentor PM",sorted)
var/target = input(src,"To whom shall we send a message?","Mentor PM",null) in sorted|null
cmd_mentor_pm(targets[target],null)
SSblackbox.record_feedback("tally", "Mentor_verb", 1, "APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -36,7 +36,7 @@
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = tgui_input_text(src,"Message:", "Private message")
msg = input(src,"Message:", "Private message") as text|null
if(!msg)
if (is_mentor(whom))
@@ -98,7 +98,7 @@
wound_bonus = 15
sharpness = SHARP_EDGED
wound_falloff_tile = 0
///ammo casings (CASELESS AMMO CASINGS WOOOOOOOO)///
/obj/item/ammo_casing/caseless/flechetteap
@@ -239,7 +239,7 @@
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(tgui_alert(user, "Are you sure you want to recolor your gun?", "Confirm Repaint", list("Yes", "No")) == "Yes")
if(alert("Are you sure you want to recolor your gun?", "Confirm Repaint", "Yes", "No") == "Yes")
var/body_color_input = input(usr,"","Choose Shroud Color",body_color) as color|null
if(body_color_input)
body_color = sanitize_hexcolor(body_color_input, desired_format=6, include_crunch=1)
@@ -33,7 +33,7 @@
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(tgui_alert(user, "Are you sure you want to repaint your gun?", "Confirm Repaint", list("Yes", "No")) == "Yes")
if(alert("Are you sure you want to repaint your gun?", "Confirm Repaint", "Yes", "No") == "Yes")
var/body_color_input = input(usr,"","Choose Body Color",body_color) as color|null
if(body_color_input)
body_color = sanitize_hexcolor(body_color_input, desired_format=6, include_crunch=1)