mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-22 07:13:08 +00:00
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.
31 lines
950 B
Plaintext
31 lines
950 B
Plaintext
/datum/proc/can_vv_get(var_name)
|
|
return TRUE
|
|
|
|
/// Called when a var is edited with the new value to change to
|
|
/datum/proc/vv_edit_var(var_name, var_value)
|
|
if(var_name == NAMEOF(src, vars))
|
|
return FALSE
|
|
if(!can_vv_get(var_name)) //This if block does not exist in tgstation code
|
|
return FALSE
|
|
vars[var_name] = var_value
|
|
datum_flags |= DF_VAR_EDITED
|
|
return TRUE
|
|
|
|
/**
|
|
* Gets all the dropdown options in the vv menu.
|
|
* When overriding, make sure to call . = ..() first and appent to the result, that way parent items are always at the top and child items are further down.
|
|
* Add seperators by doing VV_DROPDOWN_OPTION("", "---")
|
|
*/
|
|
/datum/proc/vv_get_dropdown()
|
|
SHOULD_CALL_PARENT(TRUE)
|
|
|
|
. = list()
|
|
VV_DROPDOWN_OPTION("", "---")
|
|
VV_DROPDOWN_OPTION(VV_HK_CALLPROC, "Call Proc")
|
|
VV_DROPDOWN_OPTION(VV_HK_MARK, "Mark Object")
|
|
|
|
/datum/proc/vv_get_header()
|
|
. = list()
|
|
if(("name" in vars) && !isatom(src))
|
|
. += "<b>[vars["name"]]</b><br>"
|