ID:1108344
 
(See the best response by DarkCampainger.)
Hey everyone, I'm in the process of organizing an amassing of tiles into DM, and I've thought to organizing them into tilesets for the editor.

Example being;

EarthGrassland
Grass
Grass1... etc
Desert
blah
Edges
blah


I'm thinking to define certain types for behavior, and using parent_type for inheritance.

Example being edges, there's certain types of behavior I've defined for them, but not all edges will be defined under that type this way.

Can I not do..

parent_type = /obj/Buildable/Edges


and inherit the edge behavior? I believe thats right after reading the reference.

Also, does this explicity change the type var?
Example: The EarthGrassland Edge up there would have a type value of /obj/Buildable/Edges?

Thanks for anyone who clears this up (Im kinda' lazy.. I could just test it.)
Best response
Setting parent_type will set which type it directly inherits variables and procedures from. It will not affect its actual type path (which is the point).

So yes, it will work as you expect. Your edge will have a type of /EarthGrassland/Grass/Edge (for example) but will actually inherit properties from /obj/Buildable/Edges.
Alright, thanks for the affirmations DarkCampainger.