mob/Animals
Sheep
icon = 'Magicsheep.dmi'
Level = 1
Exp = 1
MaxHp = 10
Str = 1
Def = 1
proc
addAmount(n as num)
if(!src.stackable)return
src.amount+=n
src.suffix="[src.amount]"
removeAmount(n as num)
if(!src.stackable)return
src.amount-=n
if(src.amount<=0)
del(src)
else
src.suffix="[src.amount]"
var
stackable=TRUE
amount=1
suffix="1"
verb
Harvest()
set src in oview (1)
var/obj/wool/object = locate(text2path("[src.type]")) in usr.contents
if(object)
object.addAmount(src.amount)
else
new/obj/wool(usr)
Problem description:
I'm trying to make a harvest verb that collects wool from sheep and it would stack, so it only takes up one inventory space, but when I tested it out, the wool took up multiple spaces with a suffix of 1, I had to drop the wool and pick it up again so it would stack up. Please help, thanks.