obj
Plane
icon = 'Plane1.dmi'
density = 0
verb
Fly()
set src in oview(3)
world << "There is no Fuel in the tanks!"
Refuel()
set src in oview(2)
for(var/obj/Fuel/a in usr.contents) //cycle through the contents
if(istype(a)) //if the obj in contents is the type /obj/Fuel, lets reload
world << "You have succesfully Refueled the Plane!" //tell the user
. = 1 //return a 1
break //break (or return)
new /obj/FueledPlane (src.loc)
del (a)
del src
if(!.)//if it wasn't found
world << "There isn't Fuel in your inventory!"
Fuel
icon = 'Fuel.dmi'
verb
Pick_Up()
set src in oview(0)
world << "You found some fuel!"
src.Move (usr)
FueledPlane
icon = 'Plane1.dmi'
verb
Fly()
set src in oview(3)
usr.icon = 'Plane1.dmi'
usr.density = 0
I think my problem is somewhere in the invent search part, the code won't delete my unfueled plane and it won't give me the fueled plane. I don't know what im doing wrong, but I think one of me del codes is messing up the rest of the code. Please help!