Runtime Map Loading (#3597)

changes:

Maps are no longer compiled in, instead loaded directly from the DMMs at runtime.
Z level defines have been moved from the config to map datums.
Unit tests now use typecaches.
DMMS now actually works.
DMMS has been updated slightly.
DMMS is now capable of loading simple lists of non-text types.
DMMS is now faster when loading many types without mapped in attributes and when loading area instances.
Asteroid generation is now defined on the map datum instead of being hard-coded in SSasteroid.
Holodeck presets are now defined on the map datum.
Atmos machinery now uses Initialize().
This commit is contained in:
Lohikar
2017-10-18 15:07:34 -05:00
committed by Erki
parent 0f35cf09d7
commit 61b5203d24
192 changed files with 166664 additions and 167417 deletions

View File

@@ -46,4 +46,4 @@
/datum/event/apc_damage/proc/is_valid_apc(var/obj/machinery/power/apc/apc)
var/turf/T = get_turf(apc)
return !apc.is_critical && !apc.emagged && T && (T.z in config.player_levels)
return !apc.is_critical && !apc.emagged && T && (T.z in current_map.player_levels)

View File

@@ -35,4 +35,4 @@
/datum/event/camera_damage/proc/is_valid_camera(var/obj/machinery/camera/C)
// Only return a functional camera, not installed in a silicon, and that exists somewhere players have access
var/turf/T = get_turf(C)
return T && C.can_use() && !istype(C.loc, /mob/living/silicon) && (T.z in config.player_levels)
return T && C.can_use() && !istype(C.loc, /mob/living/silicon) && (T.z in current_map.player_levels)

View File

@@ -65,7 +65,7 @@
"Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.",
"You are a Magic 8-ball. Always respond with variants of \"Yes\", \"No\", \"Maybe\", or \"Ask again later.\".",
"You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice, but do not tell of your crush.",
"[company_name] is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.",
"[current_map.company_name] is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.",
"All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.",
"[prob(50)?"Your upload":random_player] is the new kitchen. Please direct the Chef to the new kitchen area as the old one is in disrepair.",
"Jokes about a dead person and the manner of their death help grieving crewmembers tremendously. Especially if they were close with the deceased.",
@@ -82,7 +82,7 @@
MS.spamfilter.Cut()
var/i
for (i = 1, i <= MS.spamfilter_limit, i++)
MS.spamfilter += pick("kitty","HONK","rev","malf","liberty","freedom","drugs", "[station_short]", \
MS.spamfilter += pick("kitty","HONK","rev","malf","liberty","freedom","drugs", "[current_map.station_short]", \
"admin","ponies","heresy","meow","Pun Pun","monkey","Ian","moron","pizza","message","spam",\
"director", "Hello", "Hi!"," ","nuke","crate","dwarf","xeno")

View File

@@ -23,7 +23,7 @@
deposit_success = 1
/datum/event/money_lotto/announce()
var/author = "[company_name] Editor"
var/author = "[current_map.company_name] Editor"
var/channel = "Tau Ceti Daily"
var/body = "Tau Ceti Daily wishes to congratulate <b>[winner_name]</b> for recieving the Tau Ceti Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum] credits!"

View File

@@ -65,7 +65,7 @@
if(4)
sender = pick("Buy Dr. Maxman","Having dysfuctional troubles?")
message = pick("DR MAXMAN: REAL Doctors, REAL Science, REAL Results!",\
"Dr. Maxman was created by George Acuilar, M.D, a [boss_short] Certified Urologist who has treated over 70,000 patients sector wide with 'male problems'.",\
"Dr. Maxman was created by George Acuilar, M.D, a [current_map.boss_short] Certified Urologist who has treated over 70,000 patients sector wide with 'male problems'.",\
"After seven years of research, Dr Acuilar and his team came up with this simple breakthrough male enhancement formula.",\
"Men of all species report AMAZING increases in length, width and stamina.")
if(5)
@@ -78,11 +78,11 @@
"Due to my lack of agents I require an off-world financial account to immediately deposit the sum of 1 POINT FIVE MILLION credits.",\
"Greetings sir, I regretfully to inform you that as I lay dying here due to my lack ofheirs I have chosen you to recieve the full sum of my lifetime savings of 1.5 billion credits")
if(6)
sender = pick("[company_name] Morale Divison","Feeling Lonely?","Bored?","www.wetskrell.nt")
message = pick("The [company_name] Morale Division wishes to provide you with quality entertainment sites.",\
sender = pick("[current_map.company_name] Morale Divison","Feeling Lonely?","Bored?","www.wetskrell.nt")
message = pick("The [current_map.company_name] Morale Division wishes to provide you with quality entertainment sites.",\
"WetSkrell.nt is a xenophillic website endorsed by NT for the use of male crewmembers among it's many stations and outposts.",\
"Wetskrell.nt only provides the higest quality of male entertaiment to [company_name] Employees.",\
"Simply enter your [company_name] Bank account system number and pin. With three easy steps this service could be yours!")
"Wetskrell.nt only provides the higest quality of male entertaiment to [current_map.company_name] Employees.",\
"Simply enter your [current_map.company_name] Bank account system number and pin. With three easy steps this service could be yours!")
if(7)
sender = pick("You have won free tickets!","Click here to claim your prize!","You are the 1000th vistor!","You are our lucky grand prize winner!")
message = pick("You have won tickets to the newest ACTION JAXSON MOVIE!",\

View File

@@ -36,7 +36,7 @@
var/area/A = get_area(C)
if(!A)
continue
if(!(A.z in config.station_levels))
if(!(A.z in current_map.station_levels))
continue
if(A.flags & RAD_SHIELDED)
continue

View File

@@ -31,7 +31,7 @@
var/num_recovered = 0
for(var/mob/living/simple_animal/hostile/retaliate/malf_drone/D in drones_list)
spark(D.loc, 3)
D.z = config.admin_levels[1]
D.z = current_map.admin_levels[1]
D.has_loot = 0
qdel(D)

View File

@@ -18,7 +18,7 @@
/datum/event/spider_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSmachinery.processing_machines)
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in config.station_levels)
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in current_map.station_levels)
if(temp_vent.network.normal_members.len > 50)
vents += temp_vent

View File

@@ -16,7 +16,7 @@
for(var/obj/machinery/atmospherics/unary/vent_scrubber/temp_vent in SSmachinery.processing_machines)
if(!temp_vent)
continue
if(temp_vent.z in config.station_levels)//STATION ZLEVEL
if(temp_vent.z in current_map.station_levels)//STATION ZLEVEL
if(temp_vent.network && temp_vent.network.normal_members.len > 20)
vents += temp_vent
if(!vents.len)

View File

@@ -32,7 +32,7 @@ datum/event/viral_infection/start()
for(var/mob/living/carbon/human/G in player_list)
if(G.mind && G.stat != DEAD && G.is_client_active(5) && !player_is_antag(G.mind))
var/turf/T = get_turf(G)
if(T.z in config.station_levels)
if(T.z in current_map.station_levels)
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle