obj
verb
PickUp()
set category = null
set src in oview(0)
src.Move(usr)
Drop()
set category = null
set src in usr
if(src.suffix == "Equipped")
usr << "\red Unequip the [src] first!"
else
src.Move(usr.loc)
var/sellvalue
proc/usingheal(var/obj/items/J,amount)
var/mob/player/M
M = usr
if (amount > (M.maxHP-M.HP))
amount = (M.maxHP-M.HP)
M.HP += amount
usr << "You used a [J]; <b>[amount] HP restored"
Del(src)
items
potions
icon = 'potions.dmi'
healingpot
name = "Healing Salve"
icon_state = "red"
sellvalue = 25
desc = "<b>Healing Salve</b>: Restores up to 50 HP"
verb/Use()
set category = null
set src in usr
usingheal(src,50)
Problem description:
When I have this in the code, all is well. However, when obj/items/potions/healingpot is placed on the map near the spawn, my mob (as well as local NPC mobs that move randomly) lose the movement state and rather than a smooth transition over the 32 pixel jump, the mobs basically teleport from the initial spot to the next tile over.
Very odd, and I have no idea how to go about fixing this.
Any insight would be greatly appreciated!