From 8ef97dbdec712d7f9fc81596f8013b6ed8c767e7 Mon Sep 17 00:00:00 2001 From: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Date: Sat, 18 Mar 2023 00:33:16 -0700 Subject: [PATCH] Allows populating new vv'd lists (#74064) You get an alert, and can continue to enter variables until you hit cancel. Not sure if this is good ux or not, yell at me if not ## Why It's Good For The Game Fikou asked me for it and that guy's pretty cool. Also it's annoying to not be able to feed lists into procs ## Changelog :cl: admin: You can now optionally populate new lists created via vv. hit cancel to stop filling them up /:cl: --- .../admin/view_variables/get_variables.dm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/view_variables/get_variables.dm b/code/modules/admin/view_variables/get_variables.dm index 434d5594619..c59391371df 100644 --- a/code/modules/admin/view_variables/get_variables.dm +++ b/code/modules/admin/view_variables/get_variables.dm @@ -295,8 +295,23 @@ .["value"] = newguy if(VV_NEW_LIST) - .["value"] = list() .["type"] = /list + var/list/value = list() + + var/expectation = alert("Would you like to populate the list", "Populate List?", "Yes", "No") + if(!expectation || expectation == "No") + .["value"] = value + return . + + var/list/insert = null + while(TRUE) + insert = vv_get_value(restricted_classes = list(VV_RESTORE_DEFAULT)) + if(!insert["class"]) + break + value += LIST_VALUE_WRAP_LISTS(insert["value"]) + + + .["value"] = value if(VV_TEXT_LOCATE) var/datum/D