ID:1885391
 
(See the best response by Flick.)
Code:
mob
proc
Die()
usr << "Died"
Live()
usr << "Alive"
verb
Verb_Test()
usr.verbs += /mob/proc/Die


Problem description:

While I've already figured out how to give someone access to a proc for use as a verb, I'm trying to figure out how to make it so that same person is able to gain multiple procs in the same line of code. I want to gain the Die and Live procs as verbs with the same "usr.verbs +=" line of code.
I'm attempting to create a list of techniques in the proc list to prevent players from using them unless they are directly added to their verbs. I've tried doing it some other ways, but this one is by far superior to everything else I've tried.
Then why not put it into a separate class and adding it from there? Like this:
mob
player
verb
addVerbs()
verbs += /mob/holder/verbs

holder
verb
Punch()
Kick()
Dance()

Keep in mind that this is still a less-than-optimal method of handling verbs, not to mention the fact that raw verbs are sloppy to begin with, but this is technically what you're looking for.

The player has no access to holder's verbs, but you can still freely add them from the class to give them that access, none-the-less.
typesof() is what you're looking for. Give all the procs the same parent, add them through that parent
In response to Lugia319
The problem is all children inherit the parent's procs and verbs regardless. You have to keep them stored in a place where they're not automatically inherited if you don't want them by default.
Kats wrote:
You're trying to add procs as verbs, which isn't how that works. Procs can't be placed in the verbs list and they're already present within the procs list, so it's fairly redundant. What are you trying to do that requires this?
This is entirely incorrect; procs can be added as verbs and there is no procs list.
In response to Kaiochao
Kaiochao wrote:
Kats wrote:
You're trying to add procs as verbs, which isn't how that works. Procs can't be placed in the verbs list and they're already present within the procs list, so it's fairly redundant. What are you trying to do that requires this?
This is entirely incorrect; procs can be added as verbs and there is no procs list.

Always thought there was a procs to compliment verbs. I guess I've been out of it for too long. I've absolutely never had any use to use the verbs list.

In that case, I guess you could just add the proc directly to the verbs list, but, doesn't exactly change the fact that it's not very clean.
Best response
I'm pretty sure you can add a list of procs to the verb list:
mob
proc
Die()
usr << "Died"
Live()
usr << "Alive"
verb
Verb_Test()
usr.verbs += list(/mob/proc/Die, /mob/proc/Live)


Haven't messed with verb lists in years and I can't test at the moment. Give that a shot.
mob/GM/proc
proc1()
proc2()
proc3()

mob/verb/GetVerbs()
usr.verbs += typesof(/mob/GM/proc)


I can't remember DM syntax off the top of my head but that should be reasonably close to what I meant.
Haven't messed with verb lists in years and I can't test at the moment. Give that a shot.

Procs and verbs are fundamentally the same thing. Verb settings work just fine on procs, you just need to add them to the verbs list.