mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
Fixes datum verbs
This commit is contained in:
@@ -9,8 +9,9 @@
|
||||
/datum/verbs/proc/GetList()
|
||||
CRASH("Abstract verblist for [type]")
|
||||
|
||||
//modify outlist for each entry in Generate_list
|
||||
/datum/verbs/proc/HandleVerb(list/outlist, atom/verb/verbpath, ...)
|
||||
//do things for each entry in Generate_list
|
||||
//return value sets Generate_list[verbpath]
|
||||
/datum/verbs/proc/HandleVerb(list/entry, atom/verb/verbpath, ...)
|
||||
|
||||
/datum/verbs/New()
|
||||
var/mainlist = GetList()
|
||||
@@ -91,8 +92,7 @@
|
||||
else
|
||||
entry["command"] = replacetext(verbpath.name, " ", "-")
|
||||
|
||||
HandleVerb(arglist(list(entry, verbpath) + args))
|
||||
.[verbpath] = entry
|
||||
.[verbpath] = HandleVerb(arglist(list(entry, verbpath) + args))
|
||||
|
||||
/world/proc/LoadVerbs(verb_type)
|
||||
if(!ispath(verb_type, /datum/verbs) || verb_type == /datum/verbs)
|
||||
|
||||
@@ -16,11 +16,6 @@ GLOBAL_LIST_EMPTY(menulist)
|
||||
/datum/verbs/menu/GetList()
|
||||
return GLOB.menulist
|
||||
|
||||
/datum/verbs/menu/Generate_list()
|
||||
. = ..()
|
||||
for(var/I in .)
|
||||
.[I] = list2params(.[I])
|
||||
|
||||
/datum/verbs/menu/HandleVerb(list/entry, verbpath, client/C)
|
||||
var/datum/verbs/menu/verb_true_parent = GLOB.menulist[verblist[verbpath]]
|
||||
var/true_checkbox = verb_true_parent.checkbox
|
||||
@@ -37,6 +32,7 @@ GLOBAL_LIST_EMPTY(menulist)
|
||||
entry["command"] = ".updatemenuchecked \"[verb_true_parent.type]\" \"[verbpath]\"\n[entry["command"]]"
|
||||
entry["can-check"] = TRUE
|
||||
entry["group"] = "[verb_true_parent.type]"
|
||||
return list2params(entry)
|
||||
|
||||
/datum/verbs/menu/proc/Get_checked(client/C)
|
||||
return C.prefs.menuoptions[type] || default || FALSE
|
||||
|
||||
Reference in New Issue
Block a user