ID:263337
 
Being the one that likes things organised that I am, I made things that are supposed to be objs turfs. So things that partly overlap the turf/area are turfs, with their parent_type set to /obj. Now my first question is, is this a smart thing to do? I'm sure that having multiple turfs on a loc itself is a bad habit, because it's supposed to have only one.

My problem is, that it reads it as a turf. I know this is pretty logical, though...

//The turf beneath the ladder object is /turf/cliffset/base, parent_type unchanged.

turf/cliffset
ladder
icon='cliffset_new.dmi'
parent_type=/obj/
icon_state="ladder"
New()
..()
sleep(10) // it doesn't display any text when I don't sleep(), no clue why.
for(var/turf/cliffset/t in src.loc) world<<t
// this returns "the ladder",

// and when doing "for(var/turf/t in src.loc)" it returns the same.


This is a problem, I have to be able to seperate turfs and objs from each other, but I still want to keep it like this... Now, the question is: Is that possible? If so, how?

O-matic
y dont u just do obj/turf/cliffset o.O
In response to Falacy
Falacy wrote:
y dont u just do obj/turf/cliffset o.O

I like everything to be under one specific path, and not spread around objs and turfs. Some of the cliffset-parts should be turfs, and others should be objs.

EDIT: Ehm, what? /obj/turf/cliffset/? What do you mean?

O-matic
O-matic coded,
<code><font color="gray">// and when doing "for(var/turf/t in src.loc)" it returns the same.</font></code>

That's because it's defined as a turf. You'll have to check <code>parent_type</code> in order to be sure if it's actually an obj.
By default the the 'lower' turfs are simply underlaid on the topmost turf, so having your ladder on your cliffface should result in a single turf - a ladder with cliffface underneath.
It does display, just before you login. <code>spawn(0)</code> to fix.
In response to Hazman
Hazman wrote:
By default the the 'lower' turfs are simply underlaid on the topmost turf, so having your ladder on your cliffface should result in a single turf - a ladder with cliffface underneath.

Ah, that makes sense... Is it possible to seperate both from each other? Because technically, the ladder is an obj.

I insist on keeping such things under one datum, so I guess I will have to create a new one if what I am trying to do now seems to be impossible... Ehm, before I waste another chunk of time changing the path of all turfs and objects: Is this a good idea? Will it have any negative effects?

O-matic
In response to Android Data
Android Data wrote:
O-matic coded,
<code><font color="gray">// and when doing "for(var/turf/t in src.loc)" it returns the same.</font></code>

That's because it's defined as a turf. You'll have to check <code>parent_type</code> in order to be sure if it's actually an obj.

Ehm, its parent_type is defined to /obj... That's what this issue is all about. >.>'

O-matic

In response to O-matic
O-matic wrote:
Ehm, its parent_type is defined to /obj... That's what this issue is all about. >.>'

Asked and answered; there's your problem right there. A turf is not an obj. They are fundamentally different.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
O-matic wrote:
Ehm, its parent_type is defined to /obj... That's what this issue is all about. >.>'

Asked and answered; there's your problem right there. A turf is not an obj. They are fundamentally different.

So, you're saying that a turf is a turf, and will be considered as one, even if its parent_type is set to something else?

O-matic