diff --git a/code/controllers/globals.dm b/code/controllers/globals.dm index bacaa59f8f..6b7c0b4137 100644 --- a/code/controllers/globals.dm +++ b/code/controllers/globals.dm @@ -36,7 +36,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars) if(!statclick) statclick = new/obj/effect/statclick/debug(null, "Initializing...", src) - stat("GLOB:", "Button Removed Due To Crashing") //VOREStation Edit + stat("GLOB:", statclick.update("Edit")) /datum/controller/global_vars/vv_edit_var(var_name, var_value) if(gvars_datum_protected_varlist[var_name]) diff --git a/code/modules/admin/view_variables/view_variables.dm b/code/modules/admin/view_variables/view_variables.dm index cd05296959..0a2e303712 100644 --- a/code/modules/admin/view_variables/view_variables.dm +++ b/code/modules/admin/view_variables/view_variables.dm @@ -15,269 +15,271 @@ if (!islist && !istype(D)) return - var/title = "" - var/refid = "\ref[D]" - var/icon/sprite - var/hash + //VOREStation Edit Start - the rest of this proc in a spawn + spawn(0) + var/title = "" + var/refid = "\ref[D]" + var/icon/sprite + var/hash - var/type = /list - if (!islist) - type = D.type + var/type = /list + if (!islist) + type = D.type - if(istype(D, /atom)) - var/atom/AT = D - if(AT.icon && AT.icon_state) - sprite = new /icon(AT.icon, AT.icon_state) - hash = md5(AT.icon) - hash = md5(hash + AT.icon_state) - src << browse_rsc(sprite, "vv[hash].png") + if(istype(D, /atom)) + var/atom/AT = D + if(AT.icon && AT.icon_state) + sprite = new /icon(AT.icon, AT.icon_state) + hash = md5(AT.icon) + hash = md5(hash + AT.icon_state) + src << browse_rsc(sprite, "vv[hash].png") - title = "[D] (\ref[D]) = [type]" - var/formatted_type = replacetext("[type]", "/", "/") + title = "[D] (\ref[D]) = [type]" + var/formatted_type = replacetext("[type]", "/", "/") - var/sprite_text - if(sprite) - sprite_text = "" - var/list/header = islist(D)? list("/list") : D.vv_get_header() + var/sprite_text + if(sprite) + sprite_text = "" + var/list/header = islist(D)? list("/list") : D.vv_get_header() - var/marked - if(holder && holder.marked_datum && holder.marked_datum == D) - marked = VV_MSG_MARKED - var/varedited_line = "" - if(!islist && (D.datum_flags & DF_VAR_EDITED)) - varedited_line = VV_MSG_EDITED - var/deleted_line - if(!islist && D.gc_destroyed) - deleted_line = VV_MSG_DELETED + var/marked + if(holder && holder.marked_datum && holder.marked_datum == D) + marked = VV_MSG_MARKED + var/varedited_line = "" + if(!islist && (D.datum_flags & DF_VAR_EDITED)) + varedited_line = VV_MSG_EDITED + var/deleted_line + if(!islist && D.gc_destroyed) + deleted_line = VV_MSG_DELETED - var/list/dropdownoptions = list() - var/autoconvert_dropdown = FALSE - if (islist) - dropdownoptions = list( - "---", - "Add Item" = "?_src_=vars;[HrefToken()];[VV_HK_LIST_ADD]=TRUE;target=[refid]", - "Remove Nulls" = "?_src_=vars;[HrefToken()];[VV_HK_LIST_ERASE_NULLS]=TRUE;target=[refid]", - "Remove Dupes" = "?_src_=vars;[HrefToken()];[VV_HK_LIST_ERASE_DUPES]=TRUE;target=[refid]", - "Set len" = "?_src_=vars;[HrefToken()];[VV_HK_LIST_SET_LENGTH]=TRUE;target=[refid]", - "Shuffle" = "?_src_=vars;[HrefToken()];[VV_HK_LIST_SHUFFLE]=TRUE;target=[refid]", - // "Show VV To Player" = "?_src_=vars;[HrefToken()];[VV_HK_EXPOSE]=TRUE;target=[refid]" // TODO - Not yet implemented for lists - ) - autoconvert_dropdown = TRUE - else - dropdownoptions = D.vv_get_dropdown() - var/list/dropdownoptions_html = list() - if(autoconvert_dropdown) - for (var/name in dropdownoptions) - var/link = dropdownoptions[name] - if (link) - dropdownoptions_html += "" - else - dropdownoptions_html += "" - else - dropdownoptions_html = dropdownoptions + D.get_view_variables_options() + var/list/dropdownoptions = list() + var/autoconvert_dropdown = FALSE + if (islist) + dropdownoptions = list( + "---", + "Add Item" = "?_src_=vars;[HrefToken()];[VV_HK_LIST_ADD]=TRUE;target=[refid]", + "Remove Nulls" = "?_src_=vars;[HrefToken()];[VV_HK_LIST_ERASE_NULLS]=TRUE;target=[refid]", + "Remove Dupes" = "?_src_=vars;[HrefToken()];[VV_HK_LIST_ERASE_DUPES]=TRUE;target=[refid]", + "Set len" = "?_src_=vars;[HrefToken()];[VV_HK_LIST_SET_LENGTH]=TRUE;target=[refid]", + "Shuffle" = "?_src_=vars;[HrefToken()];[VV_HK_LIST_SHUFFLE]=TRUE;target=[refid]", + // "Show VV To Player" = "?_src_=vars;[HrefToken()];[VV_HK_EXPOSE]=TRUE;target=[refid]" // TODO - Not yet implemented for lists + ) + autoconvert_dropdown = TRUE + else + dropdownoptions = D.vv_get_dropdown() + var/list/dropdownoptions_html = list() + if(autoconvert_dropdown) + for (var/name in dropdownoptions) + var/link = dropdownoptions[name] + if (link) + dropdownoptions_html += "" + else + dropdownoptions_html += "" + else + dropdownoptions_html = dropdownoptions + D.get_view_variables_options() - var/list/names = list() - if (!islist) - names = D.get_variables() - sleep(1)//For some reason, without this sleep, VVing will cause client to disconnect on certain objects. + var/list/names = list() + if (!islist) + names = D.get_variables() + //sleep(1)//For some reason, without this sleep, VVing will cause client to disconnect on certain objects. //VOREStation edit - commented out, replaced with spawn(0) above - var/list/variable_html = list() - if (islist) - var/list/L = D - for (var/i in 1 to L.len) - var/key = L[i] - var/value - if (IS_NORMAL_LIST(L) && IS_VALID_ASSOC_KEY(key)) - value = L[key] - variable_html += debug_variable(i, value, 0, D) - else + var/list/variable_html = list() + if (islist) + var/list/L = D + for (var/i in 1 to L.len) + var/key = L[i] + var/value + if (IS_NORMAL_LIST(L) && IS_VALID_ASSOC_KEY(key)) + value = L[key] + variable_html += debug_variable(i, value, 0, D) + else - names = sortList(names) - for (var/V in names) - if(D.can_vv_get(V)) - variable_html += D.vv_get_var(V) + names = sortList(names) + for (var/V in names) + if(D.can_vv_get(V)) + variable_html += D.vv_get_var(V) - var/html = {" - - - [title] - - - - -
+ +
+ + + + + +
+ + + + +
+ [sprite_text] +
+ [header.Join()] +
+
+
+ [formatted_type] + [marked] + [varedited_line] + [deleted_line] +
+
+
+ Refresh +
+ +
+
+
+
+
+ + E - Edit, tries to determine the variable type by itself.
+ C - Change, asks you for the var type first.
+ M - Mass modify: changes this variable for all objects of this type.
+
+
- -
- - - - -
- [sprite_text] -
- [header.Join()] -
-
+
- [formatted_type] - [marked] - [varedited_line] - [deleted_line] + Search:
-
- Refresh -
- -
-
+
+
-
-
- - E - Edit, tries to determine the variable type by itself.
- C - Change, asks you for the var type first.
- M - Mass modify: changes this variable for all objects of this type.
-
-
- - - - - -
-
- Search: -
-
- -
-
-
    - [variable_html.Join()] -
- - - -"} - src << browse(html, "window=variables[refid];size=475x650") +
+
    + [variable_html.Join()] +
+ + + + "} + src << browse(html, "window=variables[refid];size=475x650") //VOREStation edit end /client/proc/vv_update_display(datum/D, span, content) src << output("[span]:[content]", "variables\ref[D].browser:replace_span")