mob/player/verb/Claim_This_Object(obj/thing in GetClaimList() )
mob/player/proc/GetClaimList()
var list/retList = new()
for ( var/obj/O in view() )
if ( O.isClaimable )
retList += O
return retList
Problem description:
What I want is for the verb to only show up in the popup menu of certain objects.
I am trying to make a proc that decides which objects are valid for use of a certain verb.
The problem is that the verb still shows up on the right click popup menu of every object in view. Also if I try to use the verb on an object without "isClaimable" being set to 1, I get an error:
Sorry, the following is not valid: Tree.0x20016e2
usage: Claim-This-Object obj
In this case I tried it on a Tree object.
Additionally, I only want this verb to be available to certain mobs, which is why I can just have it be a verb of claimable objects.
Take a look at view() / oview() parameters.
Also if I try to use the verb on an object without "isClaimable" being set to 1, I get an error:
Sorry, the following is not valid: Tree.0x20016e2
usage: Claim-This-Object obj
Seems like the variable has no value. Set it to 0 instead.