ID:1527020
 
Code:
turf/grass
name = "Grass"
icon_state = "grass"
desc = "Lush green wavy grass!"
var/use = 0
icon = 'grass.dmi'
verb/Eat()
if(usr.ChkUse())
set src in view(0)
usr << "\blue You pull grass out of the ground and eat it!"
view() << "\blue [usr] must be crazy! They hungrily pull tufts of grass out of the ground and stuff it in their mouth!"
verb/Lick()
set src in view(0)
usr << "\blue You lick the grass!"
view() << "\blue [usr] licks the grass! What is wrong with them?"


Problem description:
I am trying to make it that so when you eat grass, dirt appears. I have tried this with turf/grass/Del() and just writing it into the Eat verb. It always returns some sort of loc error, and I have tried using locate() even for some reason.
To replace a turf with another type of turf, use the "new" keyword to create a turf, with the original turf as the initial loc.

new dirt_type (src)
thanks