Fixes templates/ruins not updating area list

This commit is contained in:
CitadelStationBot
2017-04-27 17:02:33 -05:00
parent 1334608d23
commit a0c1f979dc
7 changed files with 21 additions and 8 deletions

View File

@@ -582,7 +582,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
return 0 return 0
//Repopulates sortedAreas list //Repopulates sortedAreas list
/proc/SortAreas() /proc/repopulate_sorted_areas()
GLOB.sortedAreas = list() GLOB.sortedAreas = list()
for(var/area/A in world) for(var/area/A in world)

View File

@@ -18,6 +18,8 @@ SUBSYSTEM_DEF(mapping)
var/list/shuttle_templates = list() var/list/shuttle_templates = list()
var/list/shelter_templates = list() var/list/shelter_templates = list()
var/loading_ruins = FALSE
/datum/controller/subsystem/mapping/PreInit() /datum/controller/subsystem/mapping/PreInit()
if(!config) if(!config)
#ifdef FORCE_MAP #ifdef FORCE_MAP
@@ -32,13 +34,13 @@ SUBSYSTEM_DEF(mapping)
if(config.defaulted) if(config.defaulted)
to_chat(world, "<span class='boldannounce'>Unable to load next map config, defaulting to Box Station</span>") to_chat(world, "<span class='boldannounce'>Unable to load next map config, defaulting to Box Station</span>")
loadWorld() loadWorld()
SortAreas() repopulate_sorted_areas()
process_teleport_locs() //Sets up the wizard teleport locations process_teleport_locs() //Sets up the wizard teleport locations
preloadTemplates() preloadTemplates()
// Pick a random away mission. // Pick a random away mission.
createRandomZlevel() createRandomZlevel()
// Generate mining. // Generate mining.
loading_ruins = TRUE
var/mining_type = config.minetype var/mining_type = config.minetype
if (mining_type == "lavaland") if (mining_type == "lavaland")
seedRuins(list(5), global.config.lavaland_budget, /area/lavaland/surface/outdoors, lava_ruins_templates) seedRuins(list(5), global.config.lavaland_budget, /area/lavaland/surface/outdoors, lava_ruins_templates)
@@ -54,7 +56,8 @@ SUBSYSTEM_DEF(mapping)
space_zlevels += i space_zlevels += i
seedRuins(space_zlevels, global.config.space_budget, /area/space, space_ruins_templates) seedRuins(space_zlevels, global.config.space_budget, /area/space, space_ruins_templates)
loading_ruins = FALSE
repopulate_sorted_areas()
// Set up Z-level transistions. // Set up Z-level transistions.
setup_map_transitions() setup_map_transitions()
..() ..()

View File

@@ -42,6 +42,7 @@
var/has_gravity = 0 var/has_gravity = 0
var/noteleport = 0 //Are you forbidden from teleporting to the area? (centcomm, mobs, wizard, hand teleporter) var/noteleport = 0 //Are you forbidden from teleporting to the area? (centcomm, mobs, wizard, hand teleporter)
var/hidden = FALSE //Hides area from player Teleport function.
var/safe = 0 //Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers var/safe = 0 //Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers
var/no_air = null var/no_air = null

View File

@@ -3,6 +3,7 @@
icon_state = "Holodeck" icon_state = "Holodeck"
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
flags = 0 flags = 0
hidden = TRUE
var/obj/machinery/computer/holodeck/linked var/obj/machinery/computer/holodeck/linked
var/restricted = 0 // if true, program goes on emag list var/restricted = 0 // if true, program goes on emag list

View File

@@ -4,6 +4,7 @@
name = "\improper Unexplored Location" name = "\improper Unexplored Location"
icon_state = "away" icon_state = "away"
has_gravity = 1 has_gravity = 1
hidden = TRUE
/area/ruin/unpowered /area/ruin/unpowered

View File

@@ -51,7 +51,7 @@
return FALSE return FALSE
smooth_zlevel(world.maxz) smooth_zlevel(world.maxz)
SortAreas() repopulate_sorted_areas()
//initialize things that are normally initialized after map load //initialize things that are normally initialized after map load
initTemplateBounds(bounds) initTemplateBounds(bounds)
@@ -74,6 +74,9 @@
//initialize things that are normally initialized after map load //initialize things that are normally initialized after map load
initTemplateBounds(bounds) initTemplateBounds(bounds)
if(!SSmapping.loading_ruins) //Will be done manually during mapping ss init
repopulate_sorted_areas()
log_game("[name] loaded at at [T.x],[T.y],[T.z]") log_game("[name] loaded at at [T.x],[T.y],[T.z]")
return TRUE return TRUE

View File

@@ -355,9 +355,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!isobserver(usr)) if(!isobserver(usr))
to_chat(usr, "Not when you're not dead!") to_chat(usr, "Not when you're not dead!")
return return
var/A var/list/filtered = list()
A = input("Area to jump to", "BOOYEA", A) as null|anything in GLOB.sortedAreas for(var/V in GLOB.sortedAreas)
var/area/thearea = A var/area/A = V
if(!A.hidden)
filtered += A
var/area/thearea = input("Area to jump to", "BOOYEA") as null|anything in filtered
if(!thearea) if(!thearea)
return return