OpenDream
OpenDream copied to clipboard
Creating an area with a loc doesnt reuse the existing instance
OpenDream
Byond
Notes:
0xb seems to be for map created
loc doesnt seem to matter (maybe z level dependent)
Sample Code
/mob/verb/CreateAreaInstance()
var/area/B = new /area/A(loc)
var/area/C = new /area/A()
usr << ref(B)
usr << ref(C)
Interesting note if the area exists it errors out
with
/mob/verb/ReuseAreaInstance()
var/turf/A = get_step(loc, 0)
var/area/B = get_area(loc)
usr << "A"
B.contents -= A
usr << "B"
var/area/C = new /area/C(loc)
usr << C
C.contents += A
usr << "C"
usr << ref(get_area(loc))