Various VV work and fixes (#19288)

Refactored various procs used by VV: Header generation, dropdown menu
generation, moved various things around, some defines.
Fixed VV to be able to edit associative lists.
Fixed VV to be able to make a list ex nihilo on a var.
Removed various dropdown menus that didn't exist anymore and were doing
nothing.
Fixed add verb option to not wipe the already existing verbs of the mob.
Fixed a runtime error on some lists view building that were not handled
correctly.
Fixed an issue with build mode not having the correct permissions for
devs.
Fixed an issue with editing a list referenced by a key in another list
via the edit referenced object option.
Added DF_VAR_EDITED flag.
This commit is contained in:
Fluffy
2024-09-23 19:26:17 +00:00
committed by GitHub
parent 426c961e14
commit 7cc7778131
11 changed files with 212 additions and 112 deletions
+11 -2
View File
@@ -165,7 +165,13 @@ var/list/VVdynamic_lock = list(
/client/proc/mod_list(var/list/L, atom/O, original_name, objectvar)
if(!check_rights(R_VAREDIT|R_DEV)) return
if(!istype(L,/list)) to_chat(src, "Not a List.")
if(!islist(L))
//May the omnissiah forgive me for this
if(tgui_alert(usr, "Not a list, make it a list?", "Make list", list("Yes", "No")) == "Yes")
O.vars[objectvar] = list()
L = O.vars[objectvar]
else
return
if(L.len > 1000)
var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
@@ -314,7 +320,10 @@ var/list/VVdynamic_lock = list(
L[L.Find(variable)] = variable
if("edit referenced object")
modify_variables(variable)
if(islist(L?[variable]))
mod_list(L[variable], O, original_name, objectvar)
else
modify_variables(variable)
if("DELETE FROM LIST")
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: REMOVED=[html_encode("[variable]")]"