(The buy Verb)
mob
verb
Buy(var/obj/passive/A)
set hidden=1
var/cost=A.PCost
var/Choice=alert(usr,"Would you like to buy [A.name]: [A.desc]: [cost]","",text) in list("Yes","No")
switch(Choice)
if("Yes")
if(usr.passivep>=cost)
alert(usr,"You have purchased [A.name]")
(Click Proc)
client
Click(A,B,C)
if(C=="Passive.grid")
if(istype(A,/obj/passive/))
usr.Buy(A)
..()
(What makes the list)
mob/verb
MakeList()
set hidden=1
if(src.client)
var/list/A=list()
var/row= 1, col=0, max_col=3
for(var/V in typesof(/obj/passive))
var/obj/passive/F = new V
if(F.name=="passive") break
if(findtext("[F.name]",,1,0) in A) break
A+=F
col ++
if(col>max_col)
row ++
col=1
src<<output(F,"grid:[col],[row]")
Problem description:
So I can generate the list fine. It appears on the interface properly and so on. However when I click on it attempting to buy the passive it does northing, I see no alert pop up on my screen or anything. Been messing around with it sometime and figured I should ask the community. Thank you for any help in advance!