Refactored random map generator system and added several terrain generators.

Created a global list to track base turfs for explosions/shuttle moves.
Remaps the asteroid to be a moonlet. Tidies up some references to 'asteroid', removes moonbase from the accessible z level list.
This commit is contained in:
Zuhayr
2015-06-03 04:36:19 +09:30
parent d4327658ab
commit ebe62cefd8
47 changed files with 1453 additions and 1175 deletions

View File

@@ -71,7 +71,7 @@
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
// check if there is something to draw below
if(!controller.down)
src.ChangeTurf(/turf/space)
src.ChangeTurf(get_base_turf(src.z))
return 0
else
floorbelow = locate(src.x, src.y, controller.down_target)

View File

@@ -166,70 +166,6 @@ atom/movable/Move() //Hackish
T.overlays -= below.z_overlays
T.z_overlays -= below.z_overlays
// this is sadly impossible to use right now
// the overlay is always opaque to mouseclicks and thus prevents interactions with everything except the turf
/*if(up)
var/turf/above = locate(T.x, T.y, up_target)
if(above)
var/eligeable = 0
for(var/d in cardinal)
var/turf/mT = get_step(above,d)
if(istype(mT, /turf/space) || istype(mT, /turf/simulated/floor/open))
eligeable = 1
/*if(mT.opacity == 0)
for(var/f in cardinal)
var/turf/nT = get_step(mT,f)
if(istype(nT, /turf/space) || istype(nT, /turf/simulated/floor/open))
eligeable = 1*/
if(istype(above, /turf/space) || istype(above, /turf/simulated/floor/open)) eligeable = 1
if(eligeable == 1)
if(!(istype(above, /turf/space) || istype(above, /turf/simulated/floor/open)))
var/image/t_img = list()
if(new_list < 1) new_list = 1
above.overlays -= above.z_overlays
var/image/temp = image(above, dir=above.dir, layer = 5 + 0.04)
above.overlays += above.z_overlays
temp.alpha = 100
temp.overlays += above.overlays
temp.overlays -= above.z_overlays
t_img += temp
T.overlays += t_img
T.z_overlays += t_img
// get objects
var/image/o_img = list()
for(var/obj/o in above)
// ingore objects that have any form of invisibility
if(o.invisibility) continue
if(new_list < 2) new_list = 2
var/image/temp2 = image(o, dir=o.dir, layer = 5+0.05*o.layer)
temp2.alpha = 100
temp2.overlays += o.overlays
o_img += temp2
// you need to add a list to .overlays or it will not display any because space
T.overlays += o_img
T.z_overlays += o_img
// get mobs
var/image/m_img = list()
for(var/mob/m in above)
// ingore mobs that have any form of invisibility
if(m.invisibility) continue
// only add this tile to fastprocessing if there is a living mob, not a dead one
if(istype(m, /mob/living) && new_list < 3) new_list = 3
var/image/temp2 = image(m, dir=m.dir, layer = 5+0.05*m.layer)
temp2.alpha = 100
temp2.overlays += m.overlays
m_img += temp2
// you need to add a list to .overlays or it will not display any because space
T.overlays += m_img
T.z_overlays += m_img
T.overlays -= above.z_overlays
T.z_overlays -= above.z_overlays*/
L -= T
if(new_list == 1)