Tried creating something different with administration being its own datum. When using the code below I'd of expected it to check the datum's level, however in reality it checks the undefined variable "/mob/var/level".
Attempting to use: admin.level of course would return an undefined variable at compile time since it is not associated to the mob until runtime.
And finally, using owner.admin.level also throws a runtime error, because owner is the datum's variable, and attempting to check it when the verb is added to the mob's verblist recreates the error defined at the top, with owner being the culprit.
Numbered Steps to Reproduce Problem:
Code Snippet (if applicable) to Reproduce Problem:
admin
var
mob/owner
level = 1
list/verbs = list()
New(a)
owner = a
grantPowers()
proc/grantPowers()
if(level>=1) verbs+=list(/admin/verb/Announce)
//if(level>=2) verbs+=list()
owner.verbs+=verbs
verb
Announce(t as text)
if(level==2)
world<<t
return
else
world<<"\[Announcement by [src]\] [t]"
mob
var/admin/admin
Login()
admin = new(src)
..()
Expected Results:
verb/Announce to attempt to check the datum admin's level, even after being added to the mob's verblist, instead of the verblist changing the verb parent path to the current mob.
Actual Results:
runtime error: undefined variable /mob/var/level