mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-10 07:41:16 +01:00
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
72 lines
2.7 KiB
Plaintext
72 lines
2.7 KiB
Plaintext
/datum/proc/CanProcCall(procname)
|
|
return TRUE
|
|
|
|
/// Items in this list will not show up in VV
|
|
GLOBAL_LIST_INIT(vv_var_blacklist, list(
|
|
"faction" = TRUE,
|
|
))
|
|
/datum/proc/can_vv_get(var_name)
|
|
if(var_name == NAMEOF(src, vars))
|
|
return FALSE
|
|
if(var_name in GLOB.vv_var_blacklist)
|
|
return FALSE
|
|
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
|
|
vars[var_name] = var_value
|
|
datum_flags |= DF_VAR_EDITED
|
|
return TRUE
|
|
|
|
/datum/proc/vv_get_var(var_name)
|
|
switch(var_name)
|
|
if (NAMEOF(src, vars))
|
|
return debug_variable(var_name, list(), 0, src)
|
|
return debug_variable(var_name, vars[var_name], 0, src)
|
|
|
|
/datum/proc/can_vv_mark()
|
|
return TRUE
|
|
|
|
/**
|
|
* Gets all the dropdown options in the vv menu.
|
|
* When overriding, make sure to call . = ..() first and append to the result, that way parent items are always at the top and child items are further down.
|
|
* Add separators by doing VV_DROPDOWN_OPTION("", "---")
|
|
*/
|
|
/datum/proc/vv_get_dropdown()
|
|
SHOULD_CALL_PARENT(TRUE)
|
|
|
|
. = list()
|
|
VV_DROPDOWN_OPTION(VV_HK_CALLPROC, "Call Proc")
|
|
VV_DROPDOWN_OPTION(VV_HK_MARK, "Mark Object")
|
|
VV_DROPDOWN_OPTION(VV_HK_TAG, "Tag Datum")
|
|
VV_DROPDOWN_OPTION(VV_HK_DELETE, "Delete")
|
|
VV_DROPDOWN_OPTION(VV_HK_EXPOSE, "Show VV To Player")
|
|
VV_DROPDOWN_OPTION(VV_HK_ADDCOMPONENT, "Add Component/Element")
|
|
VV_DROPDOWN_OPTION(VV_HK_REMOVECOMPONENT, "Remove Component/Element")
|
|
VV_DROPDOWN_OPTION(VV_HK_MASS_REMOVECOMPONENT, "Mass Remove Component/Element")
|
|
VV_DROPDOWN_OPTION(VV_HK_MODIFY_TRAITS, "Modify Traits")
|
|
|
|
/**
|
|
* This proc is only called if everything topic-wise is verified. The only verifications that should happen here is things like permission checks!
|
|
* href_list is a reference, modifying it in these procs WILL change the rest of the proc in topic.dm of admin/view_variables!
|
|
* This proc is for "high level" actions like admin heal/set species/etc/etc. The low level debugging things should go in admin/view_variables/topic_basic.dm in case this runtimes.
|
|
*/
|
|
/datum/proc/vv_do_topic(list/href_list)
|
|
if(!usr || !usr.client || !usr.client.holder || !check_rights(R_VAREDIT))
|
|
return FALSE //This is VV, not to be called by anything else.
|
|
if(SEND_SIGNAL(src, COMSIG_VV_TOPIC, usr, href_list) & COMPONENT_VV_HANDLED)
|
|
return FALSE
|
|
if(href_list[VV_HK_MODIFY_TRAITS])
|
|
usr.client.holder.modify_traits(src)
|
|
if(href_list[VV_HK_DEBUG_APPEARANCE]) // On base datum as it is shared by atoms and mutable_appearance/image VVs
|
|
usr.client.holder.appearance_debug.set_target(src)
|
|
usr.client.holder.appearance_debug.ui_interact(usr)
|
|
return TRUE
|
|
|
|
/datum/proc/vv_get_header()
|
|
. = list()
|
|
if(("name" in vars) && !isatom(src))
|
|
. += "<b>[vars["name"]]</b><br>"
|