I am trying to make a system in which a guild leader can control what verbs each other level of guild member has. Currently all possible verbs can be chosen from are under the type /mob/player/guild/verb (but it could really be anything), and I want to be able to pick verbs from that type and add them to lists for each level. All of this durring run time. Once the leader chooses the verb it is added to a list which is saved along with the guild. I haven't been able to make a list of verbs with the below method of picking a verb from a list to add to another list. The verb is not being passed as a verb, but as well nothing.
var/list/DIRverbs = new()
switch(alert(src,"Add or Remove Verbs","DIRECTOR VERBS","Add","Remove","Cancel"))
if("Add")
DIRverbs += input(src,"What Verb Would You Like To Add?","DIRECTOR VERBS",) in typesof(/mob/player/guild/verb)
if("Remove")
DIRverbs -= input(src,"What Verb Would You Like To Remove?","DIRECTOR VERBS",) in DIRverbs
if("Cancel") return
I am sure it is just something simple I have missed. Or is it only possible to store verbs in a mob/clients verb list?
With this method, it will save the verb's type in text form to the verb_list. This way, the verb can be recreated with the new() procedure wherever you want.
I thought it was possible to save verb objects to lists, but I guess not.
Then you can go on to remove the verb_list variable, and store each list to a savefile, or whatever you plan on doing. Then make a procedure like collect_verbs to be called whenever the list is modified, grab all of the guild members online, and update their guild verbs.