turf
base
New(loc)
var/icon/ic = image(loc)
..()
src.underlays += ic
turf
base
New(loc)
src.underlays += loc
..()
Any ideas?
Dream Maker has a map editor feature which allows you to overlay turfs on top of each other. I have been trying to replicate this with code but I can't really figure it out...
turf turf Any ideas? |
Jan 25 2012, 6:39 am
|
|
Ever thought of making a new turf?
|
Only one turf can exist at any given location.
I am trying to take two turfs fit into one location like the map editor does it (technically it takes the old turf, places it as an underlay to the new turf). This is described somewhere in the reference, but there's no way (that I know of) to do it with code. |
By the time New() is called, the new turf has already been placed on the map, replacing the previous turf. You'll have to write a global process to insert it.
proc Note that this example doesn't handle complex layering very well, especially float layering. So long as the layer is defined (or overlays aren't used), it should be fine, though. You could also put the old turf's overlays into the new turf's overlays (right now they go into underlays), if that works for your application (ie you want the old overlays to be above the inserted turf). |