mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Converts over the missing TGUI input lists (#23859)
* Converts over the missing TGUI input lists * last fixes * num revert
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
. = ..()
|
||||
if(can_buckle && has_buckled_mobs())
|
||||
if(length(buckled_mobs) > 1)
|
||||
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs
|
||||
var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?", "Unbuckle Who?", buckled_mobs)
|
||||
if(user_unbuckle_mob(unbuckled,user))
|
||||
return TRUE
|
||||
else
|
||||
@@ -33,8 +33,8 @@
|
||||
. = ..()
|
||||
if(can_buckle && has_buckled_mobs() && Adjacent(user)) // attack_robot is called on all ranges, so the Adjacent check is needed
|
||||
if(length(buckled_mobs) > 1)
|
||||
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs
|
||||
if(user_unbuckle_mob(unbuckled,user))
|
||||
var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?", "Unbuckle Who?", buckled_mobs)
|
||||
if(user_unbuckle_mob(unbuckled, user))
|
||||
return TRUE
|
||||
else
|
||||
if(user_unbuckle_mob(buckled_mobs[1], user))
|
||||
|
||||
@@ -306,8 +306,8 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user as mob)
|
||||
var/choice = input(user,"Spraycan options") in list("Toggle Cap","Change Drawing","Change Color")
|
||||
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user)
|
||||
var/choice = tgui_input_list(user, "Do you want to...", "Spraycan Options", list("Toggle Cap","Change Drawing", "Change Color"))
|
||||
switch(choice)
|
||||
if("Toggle Cap")
|
||||
to_chat(user, "<span class='notice'>You [capped ? "remove" : "replace"] the cap of [src].</span>")
|
||||
|
||||
@@ -234,10 +234,11 @@
|
||||
|
||||
var/list/show_flag = list("EXIT" = null) + sortList(flag)
|
||||
|
||||
var/input_flag = input(user, "Choose a flag to disguise as.", "Choose a flag.") in show_flag
|
||||
|
||||
if(user && (src in user.contents))
|
||||
var/input_flag = tgui_input_list(user, "Choose a flag to disguise this as.", "Choose a flag.", show_flag)
|
||||
if(!input_flag)
|
||||
return
|
||||
|
||||
if(user && (src in user.GetAllContents()))
|
||||
var/obj/item/flag/chosen_flag = flag[input_flag]
|
||||
|
||||
if(chosen_flag && !used)
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
if("Show")
|
||||
return ..()
|
||||
if("Edit")
|
||||
switch(input(user,"What would you like to edit on \the [src]?") in list("Name", "Photo", "Appearance", "Sex", "Age", "Occupation", "Money Account", "Blood Type", "DNA Hash", "Fingerprint Hash", "Reset Access", "Delete Card Information"))
|
||||
switch(input(user, "What would you like to edit on \the [src]?", "Agent ID", list("Name", "Photo", "Appearance", "Sex", "Age", "Occupation", "Money Account", "Blood Type", "DNA Hash", "Fingerprint Hash", "Reset Access", "Delete Card Information")))
|
||||
if("Name")
|
||||
var/new_name = reject_bad_name(input(user,"What name would you like to put on this card?","Agent Card Name", ishuman(user) ? user.real_name : user.name), TRUE)
|
||||
if(!Adjacent(user))
|
||||
@@ -413,7 +413,7 @@
|
||||
RebuildHTML()
|
||||
|
||||
if("Appearance")
|
||||
var/list/appearances = list(
|
||||
var/static/list/appearances = list(
|
||||
"data",
|
||||
"id",
|
||||
"gold",
|
||||
@@ -464,7 +464,7 @@
|
||||
"ERT_janitorial",
|
||||
"ERT_paranormal",
|
||||
)
|
||||
var/choice = input(user, "Select the appearance for this card.", "Agent Card Appearance") in appearances
|
||||
var/choice = tgui_input_list(user, "Select the appearance for this card.", "Agent Card Appearance", appearances)
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
if(!choice)
|
||||
@@ -508,7 +508,7 @@
|
||||
RebuildHTML()
|
||||
|
||||
if("Occupation")
|
||||
var/list/departments = list(
|
||||
var/static/list/departments = list(
|
||||
"Assistant" = null,
|
||||
"Engineering" = GLOB.engineering_positions,
|
||||
"Medical" = GLOB.medical_positions,
|
||||
@@ -520,13 +520,13 @@
|
||||
"Custom" = null,
|
||||
)
|
||||
|
||||
var/department = input(user, "What job would you like to put on this card?\nChoose a department or a custom job title.\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in departments
|
||||
var/department = tgui_input_list(user, "What job would you like to put on this card?\nChoose a department or a custom job title.\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", departments)
|
||||
var/new_job = "Assistant"
|
||||
|
||||
if(department == "Custom")
|
||||
new_job = sanitize(stripped_input(user,"Choose a custom job title:","Agent Card Occupation", "Assistant", MAX_MESSAGE_LEN))
|
||||
else if(department != "Assistant" && !isnull(departments[department]))
|
||||
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in departments[department]
|
||||
new_job = tgui_input_list(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", departments[department])
|
||||
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
|
||||
@@ -62,14 +62,12 @@
|
||||
/obj/item/sign/screwdriver_act(mob/living/user, obj/item/I)
|
||||
if(!isturf(user.loc)) // Why does this use user? This should just be loc.
|
||||
return
|
||||
. = TRUE // These return values gotta be true or we stab the sign
|
||||
var/direction = tgui_input_list(user, "Which direction will this sign be moved?", "Select direction,", list("North", "East", "South", "West", "Cancel"))
|
||||
if(direction == "Cancel" || QDELETED(src))
|
||||
return
|
||||
|
||||
var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel")
|
||||
if(direction == "Cancel")
|
||||
return TRUE // These gotta be true or we stab the sign
|
||||
if(QDELETED(src))
|
||||
return TRUE // Unsure about this, but stabbing something that doesnt exist seems like a bad idea
|
||||
|
||||
var/obj/structure/sign/S = new(user.loc) //This is really awkward to use user.loc
|
||||
var/obj/structure/sign/S = new(get_turf(user))
|
||||
switch(direction)
|
||||
if("North")
|
||||
S.pixel_y = 32
|
||||
@@ -80,13 +78,12 @@
|
||||
if("West")
|
||||
S.pixel_x = -32
|
||||
else
|
||||
return TRUE // We dont want to stab it or place it, so we return
|
||||
return
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = sign_state
|
||||
to_chat(user, "<span class='notice'>You fasten [S] with your [I].</span>")
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/sign/double/map
|
||||
name = "station map"
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/statue/welder_act(mob/user, obj/item/I)
|
||||
if(anchored)
|
||||
return
|
||||
@@ -39,7 +38,6 @@
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
deconstruct(TRUE)
|
||||
|
||||
|
||||
/obj/structure/statue/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
anchored = TRUE
|
||||
if("Rotate")
|
||||
var/list/dir_choices = list("North" = NORTH, "East" = EAST, "South" = SOUTH, "West" = WEST)
|
||||
var/selected = input(user,"Select a direction for the connector.", "Connector Direction") in dir_choices
|
||||
var/selected = tgui_input_list(user, "Select a direction for the connector.", "Connector Direction", dir_choices)
|
||||
if(!selected)
|
||||
return
|
||||
dir = dir_choices[selected]
|
||||
update_icon() //is this necessary? probably not
|
||||
|
||||
@@ -572,7 +574,9 @@
|
||||
anchored = TRUE
|
||||
if("Rotate")
|
||||
var/list/dir_choices = list("North" = NORTH, "East" = EAST, "South" = SOUTH, "West" = WEST)
|
||||
var/selected = input(user, "Select a direction for the connector.", "Connector Direction") in dir_choices
|
||||
var/selected = tgui_input_list(user, "Select a direction for the connector.", "Connector Direction", dir_choices)
|
||||
if(!selected)
|
||||
return
|
||||
dir = dir_choices[selected]
|
||||
update_icon() //is this necessary? probably not
|
||||
|
||||
|
||||
Reference in New Issue
Block a user