Datum Function
newdatum var name = "derp" proc testname() world << nameproc test() var/newdatum/nd = new/newdatum() nd.testname()
datum atom area turf movable obj mob
atom area // A turf // T movable object // O mob // M
atom movablearea //A parent_type = /atomturf //T parent_type = /atomobj //O parent_type = /atom/movablemob //M parent_type = /atom/movable
You will need a reference to an initialized datum.
mobs, objs, turfs, etc. are all datums.
This is how BYOND defines its class tree: