@@ -90,25 +90,20 @@
|
||||
/datum/map_template/proc/load_new_z(orientation = SOUTH, list/ztraits = src.ztraits || list(ZTRAIT_AWAY = TRUE), centered = TRUE)
|
||||
var/x = centered? max(round((world.maxx - width) / 2), 1) : 1
|
||||
var/y = centered? max(round((world.maxy - height) / 2), 1) : 1
|
||||
message_admins("d1")
|
||||
|
||||
var/datum/space_level/level = SSmapping.add_new_zlevel(name, ztraits)
|
||||
message_admins("d2")
|
||||
var/datum/parsed_map/parsed = load_map(file(mappath), x, y, level.z_value, no_changeturf=(SSatoms.initialized == INITIALIZATION_INSSATOMS), placeOnTop = TRUE, orientation = orientation)
|
||||
message_admins("d3")
|
||||
var/list/bounds = parsed.bounds
|
||||
if(!bounds)
|
||||
return FALSE
|
||||
|
||||
repopulate_sorted_areas()
|
||||
message_admins("d4")
|
||||
|
||||
//initialize things that are normally initialized after map load
|
||||
parsed.initTemplateBounds()
|
||||
message_admins("d5")
|
||||
smooth_zlevel(world.maxz)
|
||||
message_admins("d6")
|
||||
log_game("Z-level [name] loaded at [x],[y],[world.maxz]")
|
||||
on_map_loaded(world.maxz, parsed.bounds)
|
||||
message_admins("d7")
|
||||
|
||||
return level
|
||||
|
||||
|
||||
@@ -17,20 +17,14 @@
|
||||
z_list += S
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/add_new_zlevel(name, traits = list(), z_type = /datum/space_level)
|
||||
message_admins("d1_1")
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_NEW_Z, args)
|
||||
var/new_z = z_list.len + 1
|
||||
if(world.maxz < new_z)
|
||||
message_admins("d1_2")
|
||||
if (world.maxz < new_z)
|
||||
world.incrementMaxZ()
|
||||
message_admins("d1_3")
|
||||
//CHECK_TICK
|
||||
CHECK_TICK
|
||||
// TODO: sleep here if the Z level needs to be cleared
|
||||
message_admins("d1_4")
|
||||
var/datum/space_level/S = new z_type(new_z, name, traits)
|
||||
message_admins("d1_5")
|
||||
z_list += S
|
||||
message_admins("d1_6")
|
||||
return S
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/get_level(z)
|
||||
|
||||
Reference in New Issue
Block a user