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
+12 -7
View File
@@ -39,11 +39,16 @@ GLOBAL_LIST_EMPTY(objectives)
//Shared by few objective types
/datum/objective/proc/admin_simple_target_pick(mob/admin)
var/list/possible_targets = list("Free objective")
var/def_value
for(var/datum/mind/possible_target in SSticker.minds)
if ((possible_target != src) && ishuman(possible_target.current))
possible_targets += possible_target.current
var/mob/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_targets)
if(target && target.current)
def_value = target.current
var/mob/new_target = input(admin,"Select target:", "Objective target", def_value) as null|anything in possible_targets
if (!new_target)
return
@@ -600,12 +605,12 @@ GLOBAL_LIST_EMPTY(possible_items)
/datum/objective/steal/admin_edit(mob/admin)
var/list/possible_items_all = GLOB.possible_items+"custom"
var/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_items_all)
var/new_target = input(admin,"Select target:", "Objective target", steal_target) as null|anything in possible_items_all
if (!new_target)
return
if (new_target == "custom") //Can set custom items.
var/custom_path = tgui_input_text(admin,"Search for target item type:","Type")
var/custom_path = input(admin,"Search for target item type:","Type") as null|text
if (!custom_path)
return
var/obj/item/custom_target = pick_closest_path(custom_path, make_types_fancy(subtypesof(/obj/item)))
@@ -722,7 +727,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return checking.researched_nodes.len >= target_amount
/datum/objective/download/admin_edit(mob/admin)
var/count = tgui_input_num(admin,"How many nodes ?","Nodes",target_amount)
var/count = input(admin,"How many nodes ?","Nodes",target_amount) as num|null
if(count)
target_amount = count
update_explanation_text()
@@ -768,7 +773,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return captured_amount >= target_amount
/datum/objective/capture/admin_edit(mob/admin)
var/count = tgui_input_num(admin,"How many mobs to capture ?","capture",target_amount)
var/count = input(admin,"How many mobs to capture ?","capture",target_amount) as num|null
if(count)
target_amount = count
update_explanation_text()
@@ -800,7 +805,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
explanation_text = "Extract [target_amount] compatible genome\s."
/datum/objective/absorb/admin_edit(mob/admin)
var/count = tgui_input_num(admin,"How many people to absorb?","absorb",target_amount)
var/count = input(admin,"How many people to absorb?","absorb",target_amount) as num|null
if(count)
target_amount = count
update_explanation_text()
@@ -890,7 +895,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/destroy/admin_edit(mob/admin)
var/list/possible_targets = active_ais(1)
if(possible_targets.len)
var/mob/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_targets)
var/mob/new_target = input(admin,"Select target:", "Objective target") as null|anything in possible_targets
target = new_target.mind
else
to_chat(admin, "No active AIs with minds")