name = "Dark Mark"
icon = 'geoglyphs.dmi'
layer = MOB_LAYER -1
condor/icon_state = "condor"
var/xl = 0
var/yl = 0
Z = new objtype(locate(cx+xl,cy+yl,cz))
Z.icon_state = "[ico_state] [xl],[yl]"
Z.name = "[newname] Geoglyph"
yl = 0
xl += 1
M.ObjGrid += Z
//for(var/turf/T in view(30,usr)) if(T.z == z) T.overlays += /obj/geoglyph/shade
for(var/obj/geoglyph/G in usr.ObjGrid) del G
When i press Make Geoglyph its almost instant as it appears on the map. However when i press Del Geoglyph Dream Seeker seems to pause for quite a few seconds before it finally vanishs.
I added the objects to a list connected to the mob (ObjGrid), to avoid it having to sweep the world for those objects and hopefully saving some processing time/lag etc.
I'm not sure why it takes longer to delete the objects than it does to create them. Any thoughts? I'm a little concerned how the removal is going to affect the world on a live server.
Additionally, ive noticed what when i hit Close on the Dream Seeker window (while one of these is placed down on the map) then it takes its sweet time to close! About 3-5 seconds. Where as, closing it in all other circumstances its instant. Some issue with the code? I'm not really sure what though i think its about as good as it can be for the purpose of drawing a rather large 928x928 pixel image on a game map in real-time.