mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-10 07:41:16 +01:00
More standard tgui input conversions (#63464)
This commit is contained in:
@@ -100,7 +100,7 @@
|
||||
drip.vars[slot] = null
|
||||
|
||||
if("rename")
|
||||
var/newname = stripped_input(owner, "What do you want to name this outfit?", OUTFIT_EDITOR_NAME)
|
||||
var/newname = tgui_input_text(owner, "What do you want to name this outfit?", OUTFIT_EDITOR_NAME)
|
||||
if(newname)
|
||||
drip.name = newname
|
||||
if("save")
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if("rename")
|
||||
//Modify the metadata
|
||||
var/old_title = chosen_painting.title
|
||||
var/new_title = stripped_input(user, "New painting title?", "Painting rename", chosen_painting.title)
|
||||
var/new_title = tgui_input_text(user, "New painting title?", "Painting Rename", chosen_painting.title)
|
||||
if(!new_title)
|
||||
return
|
||||
chosen_painting.title = new_title
|
||||
@@ -67,7 +67,7 @@
|
||||
return TRUE
|
||||
if("rename_author")
|
||||
var/old_name = chosen_painting.creator_name
|
||||
var/new_name = stripped_input(user, "New painting author name?", "Painting rename", chosen_painting.creator_name)
|
||||
var/new_name = tgui_input_text(user, "New painting author name?", "Painting Rename", chosen_painting.creator_name)
|
||||
if(!new_name)
|
||||
return
|
||||
chosen_painting.creator_name = new_name
|
||||
@@ -86,7 +86,7 @@
|
||||
log_admin("[key_name(user)] has removed tag [params["tag"]] from persistent painting made by [chosen_painting.creator_ckey] with id [chosen_painting.md5].")
|
||||
return TRUE
|
||||
if("add_tag")
|
||||
var/tag_name = stripped_input(user, "New tag name?", "???")
|
||||
var/tag_name = tgui_input_text(user, "New tag name?", "Add Tag")
|
||||
if(!tag_name)
|
||||
return
|
||||
if(!chosen_painting.tags)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
return
|
||||
var/mob/user = usr
|
||||
if(href_list["edit_label"])
|
||||
var/new_label = stripped_input(user, "Choose a new label.", "Sound Emitter")
|
||||
var/new_label = tgui_input_text(user, "Choose a new label", "Sound Emitter")
|
||||
if(!new_label)
|
||||
return
|
||||
maptext = MAPTEXT(new_label)
|
||||
@@ -90,7 +90,7 @@
|
||||
sound_file = new_file
|
||||
to_chat(user, span_notice("New sound file set to [sound_file]."), confidential = TRUE)
|
||||
if(href_list["edit_volume"])
|
||||
var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num
|
||||
var/new_volume = tgui_input_number(user, "Choose a volume", "Sound Emitter", sound_volume, 100)
|
||||
if(isnull(new_volume))
|
||||
return
|
||||
new_volume = clamp(new_volume, 0, 100)
|
||||
@@ -99,21 +99,21 @@
|
||||
if(href_list["edit_mode"])
|
||||
var/new_mode
|
||||
var/mode_list = list("Local (normal sound)" = SOUND_EMITTER_LOCAL, "Direct (not affected by environment/location)" = SOUND_EMITTER_DIRECT)
|
||||
new_mode = input(user, "Choose a new mode.", "Sound Emitter") as null|anything in mode_list
|
||||
if(!new_mode)
|
||||
new_mode = tgui_input_list(user, "Choose a new mode", "Sound Emitter", mode_list)
|
||||
if(isnull(new_mode))
|
||||
return
|
||||
motus_operandi = mode_list[new_mode]
|
||||
to_chat(user, span_notice("Mode set to [motus_operandi]."), confidential = TRUE)
|
||||
if(href_list["edit_range"])
|
||||
var/new_range
|
||||
var/range_list = list("Radius (all mobs within a radius)" = SOUND_EMITTER_RADIUS, "Z-Level (all mobs on the same z)" = SOUND_EMITTER_ZLEVEL, "Global (all players)" = SOUND_EMITTER_GLOBAL)
|
||||
new_range = input(user, "Choose a new range.", "Sound Emitter") as null|anything in range_list
|
||||
if(!new_range)
|
||||
new_range = tgui_input_list(user, "Choose a new range", "Sound Emitter", range_list)
|
||||
if(isnull(new_range))
|
||||
return
|
||||
emitter_range = range_list[new_range]
|
||||
to_chat(user, span_notice("Range set to [emitter_range]."), confidential = TRUE)
|
||||
if(href_list["edit_radius"])
|
||||
var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num
|
||||
var/new_radius = tgui_input_number(user, "Choose a radius.", "Sound Emitter", sound_volume, 127)
|
||||
if(isnull(new_radius))
|
||||
return
|
||||
new_radius = clamp(new_radius, 0, 127)
|
||||
|
||||
@@ -458,7 +458,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller)
|
||||
if(GLOB.everyone_a_traitor)
|
||||
tgui_alert(usr, "The everyone is a traitor secret has already been triggered")
|
||||
return
|
||||
var/objective = stripped_input(holder, "Enter an objective")
|
||||
var/objective = tgui_input_text(holder, "Enter an objective", "Objective")
|
||||
if(!objective)
|
||||
return
|
||||
GLOB.everyone_a_traitor = new /datum/everyone_is_a_traitor_controller(objective)
|
||||
|
||||
Reference in New Issue
Block a user