ID:1451882
 
(See the best response by Kaiochao.)
Code:
Wall
parent_type = /obj
density = 1

mob
Bump(atom/O)
..()
if(isobj(O))
var/obj/DelObj = O
del DelObj


Problem description:
Despite having a parent type, the wall doesn't seem to return 1 for isobj(O). Is this intended behavior?
If I remember correctly, Wall is it's own type when you define it using parent_type. It inherits the class structure from obj but isn't defined as an obj. That may be what the problem is.
I figured that it'd be that. I'm kinda sad it inherits obj variables but not type.
Best response
thing
parent_type = /obj

mob/Login()
src << isobj(new /thing) // true

I think you're having a different issue here.
I believe for that code to work, you'd have to check the atom's type explicitly. I'm mobile and it's untested code.

mob
Bump(atom/O)
..()
if(O.type == /Wall)
var/obj/DelObj = O
del DelObj
<dm>
I went with defining my own isWall() and isBuilding proc anyway because I plan to have destructible environment anyway. I'm still confused about why, like Kaiochao posted the code didn't work though.
To be fair, I'm not sure who you're using isobj() anyways. istype is just easier to use, in my opinion. It would keep errors like that down.
isobj() is istype(object, /obj) afaik
From a test I just did, isobj() will return true for any object derived from /obj, even if it has a parent_type defined.

oobj
parent_type = /obj

client/New()
..()
var/oobj/o = new
if (isobj(o))
src << "?"


edit: you're allowed to have more than one obj in isobj(). The reference says isobj(Loc1, Loc2, ...)
In response to Makeii
I already did this test. See reply #3.