mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
VV refactors 2 - Actually not indefinitely WIP (#45217)
About The Pull Request The thing other than ruining maps that I was working on Refactors VV to use a more standard way of doing topic dropdown options rather than a huge if/else chain Marking datums is now a right click option Moves a few files around too/few procs Why It's Good For The Game Makes it easier to add more VV dropdown options in the future, and moving href list keys to defines make misspelling them harder. Changelog cl add: Oh yeah also added a "return value of proccall" option for VV var editing. refactor: View Variables has been refactored. It should now be easier to make VV dropdown options. /cl
This commit is contained in:
@@ -395,17 +395,13 @@
|
||||
|
||||
/datum/spacevine_controller/vv_get_dropdown()
|
||||
. = ..()
|
||||
. += "---"
|
||||
.["Delete Vines"] = "?_src_=[REF(src)];[HrefToken()];purge_vines=1"
|
||||
VV_DROPDOWN_OPTION(VV_HK_SPACEVINE_PURGE, "Delete Vines")
|
||||
|
||||
/datum/spacevine_controller/Topic(href, href_list)
|
||||
if(..() || !check_rights(R_ADMIN, FALSE) || !usr.client.holder.CheckAdminHref(href, href_list))
|
||||
return
|
||||
|
||||
if(href_list["purge_vines"])
|
||||
if(alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", "Yes", "No") != "Yes")
|
||||
return
|
||||
DeleteVines()
|
||||
/datum/spacevine_controller/vv_do_topic(href_list)
|
||||
. = ..()
|
||||
if(href_list[VV_HK_SPACEVINE_PURGE])
|
||||
if(alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", "Yes", "No") == "Yes")
|
||||
DeleteVines()
|
||||
|
||||
/datum/spacevine_controller/proc/DeleteVines() //this is kill
|
||||
QDEL_LIST(vines) //this will also qdel us
|
||||
|
||||
Reference in New Issue
Block a user