Adds a system for random explorable space sites (#6320)

This commit is contained in:
Alberyk
2019-05-05 23:37:03 +02:00
committed by Werner
parent 8c63702b3f
commit 6393c26326
50 changed files with 553563 additions and 1360 deletions
@@ -41,7 +41,7 @@
var/list/files = flist(map_directory)
var/start_time = world.time
var/dungeons_placed = 0
var/static/dmm_suite/maploader = new
var/dmm_suite/maploader = new
var/dungeon_chance = config.dungeon_chance
@@ -77,3 +77,74 @@
log_ss("map_finalization","Loaded [dungeons_placed] asteroid dungeons in [(world.time - start_time)/10] seconds.")
qdel(maploader)
/proc/create_space_ruin(var/X, var/Y, var/Z)
var/map_directory = "maps/space_ruins/"
var/list/files = flist(map_directory)
var/start_time = world.time
var/static/dmm_suite/maploader = new
if(length(files) <= 0)
log_ss("map_finalization","There are no space ruin map.")
return
var/chosen_ruin = pick(files)
if(!dd_hassuffix(chosen_ruin,".dmm"))
files -= chosen_ruin
log_ss("map_finalization","ALERT: [chosen_ruin] is not a .dmm file! Skipping!")
var/map_file = file("[map_directory][chosen_ruin]")
if(isfile(map_file))
log_ss("map_finalization","Loading space ruin '[chosen_ruin]' at coordinates [X], [Y], [Z].")
maploader.load_map(map_file,X,Y,Z)
else
log_ss("map_finalization","ERROR: Something weird happened with the file: [chosen_ruin].")
log_ss("map_finalization","Loaded [chosen_ruin] space ruin in [(world.time - start_time)/10] seconds.")
create_space_ruin_report("chosen_ruin")
qdel(maploader)
/proc/create_space_ruin_report(var/ruin_name)
var/ruintext = "<center><img src = ntlogo.png><BR><h2><BR><B>Icarus Reading Report</h2></B></FONT size><HR></center>"
ruintext += "<B><font face='Courier New'>The Icarus sensors located a away site with the possible characteristics:</font></B><br>"
switch(ruin_name)
if("crashed_freighter")
ruintext += "Lifeform signals.<br>"
if("derelict" || "nt_cloneship")
ruintext += "NanoTrasen infrastructure.<br>"
if("pra_blockade_runner")
ruintext += "Large biomass signals.<br>"
if("sol_frigate")
ruintext += "Warp signal.<br>"
else
ruintext += "Unrecognizable signals.<br>"
if(prob(20))
ruintext += "Mineral concentration.<br>"
if(prob(20))
ruintext += "Bluespace signals.<br>"
if(prob(20))
ruintext += "Artificial intelligence signals.<br>"
ruintext += "<HR>"
ruintext += "<B><font face='Courier New'>This reading has been detected within shuttle range of the [current_map.station_name] and deemed safe for survey by [current_map.company_name] personnel. \
The designated research director, or a captain level decision may determine the goal of any missions to this site. On-site command is deferred to any nearby command staff.</font></B><br>"
for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "Space Ruin Paper")
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(C))
P.name = "Icarus reading report"
P.info = ruintext
P.update_icon()