Merge pull request #16836 from Incoming5643/okokfinestopasking

(space) ruins requests and practicalities
This commit is contained in:
Cheridan
2016-04-13 21:16:08 -05:00
25 changed files with 101 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
#List the potential random ruins here. This file is for small things that would appear in lavaland, such as hidden temples or labs.
#Maps must be the full path to them
#Ruins should be 30x30 at max. Anymore than that will break the game.
#List ALL lava ruins here. This file is for small things that would appear in lavaland, like a downed ship or hidden room.
#Maps must be the full path to them. Any map you make but forget to list here may as well not exist as far as the game is concerned.
#Blacklisting ruins takes place at conflig/lavaRuinBlacklist.txt, don't remove anything here unless you're removing the map entirely
#SPECIFYING AN INVALID MAP WILL RESULT IN RUNTIMES ON GAME START
##BIODOMES

View File

@@ -1,6 +1,7 @@
#List the potential random ruins here. This file is for small things that would appear in space, like an asteroid or broken escape pod.
#Maps must be the full path to them
#Ruins should be 40x40 at max. Anymore than that will break the game.
#List ALL space ruins here. This file is for small things that would appear in space, like an asteroid or broken escape pod.
#Maps must be the full path to them. Any map you make but forget to list here may as well not exist as far as the game is concerned.
#Blacklisting ruins takes place in the config folder file spaceRuinBlacklist.txt, don't remove anything here unless you're removing the map entirely
#SPECIFYING AN INVALID MAP WILL RESULT IN RUNTIMES ON GAME START
_maps/RandomRuins/SpaceRuins/way_home.dmm

View File

@@ -86,12 +86,14 @@
preloadRuinTemplates()
/proc/preloadRuinTemplates()
var/list/potentialSpaceRuins = generateMapList(filename = "config/spaceRuinConfig.txt")
var/list/potentialSpaceRuins = generateMapList(filename = "_maps/RandomRuins/SpaceRuins/_maplisting.txt", blacklist = "config/spaceRuinBlacklist.txt")
for(var/ruin in potentialSpaceRuins)
var/datum/map_template/T = new(path = "[ruin]", rename = "[ruin]")
space_ruins_templates[T.name] = T
map_templates[T.name] = T
var/list/potentialLavaRuins = generateMapList(filename = "config/lavaRuinConfig.txt")
var/list/potentialLavaRuins = generateMapList(filename = "_maps/RandomRuins/LavaRuins/_maplisting.txt", blacklist = "config/lavaRuinBlacklist.txt")
for(var/ruin in potentialLavaRuins)
var/datum/map_template/T = new(path = "[ruin]", rename = "[ruin]")
lava_ruins_templates[T.name] = T
lava_ruins_templates[T.name] = T
map_templates[T.name] = T

View File

@@ -29,11 +29,40 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
return
/proc/generateMapList(filename)
/proc/generateMapList(filename, blacklist)
var/list/potentialMaps = list()
var/list/blacklistedMaps = list()
var/list/Lines = file2list(filename)
if(!Lines.len)
return
if(blacklist)
var/list/Blines = file2list(blacklist)
for (var/t in Blines)
if (!t)
continue
t = trim(t)
if (length(t) == 0)
continue
else if (copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
if (pos)
name = lowertext(copytext(t, 1, pos))
else
name = lowertext(t)
if (!name)
continue
blacklistedMaps.Add(t)
for (var/t in Lines)
if (!t)
continue
@@ -58,7 +87,9 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
potentialMaps.Add(t)
return potentialMaps
return (potentialMaps - blacklistedMaps)
/proc/seedRuins(z_level = 1, ruin_number = 0, whitelist = /area/space, list/potentialRuins = space_ruins_templates)
@@ -86,6 +117,7 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
world.log << "Ruins marker placed at ([T.x], [T.y], [T.z])"
var/obj/effect/ruin_loader/R = new /obj/effect/ruin_loader(T)
R.Load(potentialRuins,template)
potentialRuins -= template
ruin_number --
return

View File

@@ -0,0 +1,30 @@
#Listing maps here will blacklist them from generating in lavaland.
#Maps must be the full path to them
#A list of maps valid to blacklist can be found at _maps\RandomRuins\LavaRuins\_maplisting.txt
#SPECIFYING AN INVALID MAP WILL RESULT IN RUNTIMES ON GAME START
##BIODOMES
#_maps/templates/lavaland_surface_biodome_winter.dmm
#_maps/templates/lavaland__biodome_beach.dmm
#_maps/templates/lavaland_biodome_clown_planet.dmm
#_maps/templates/lavaland_surface_cube.dmm
##RESPAWN
#_maps/templates/lavaland_surface_prisoner_crash.dmm
#_maps/templates/lavaland_surface_seed_vault.dmm
#_maps/templates/lavaland_surface_ash_walker1.dmm
##SIN
#_maps/templates/lavaland_surface_envy.dmm
#_maps/templates/lavaland_surface_gluttony.dmm
#_maps/templates/lavaland_surface_greed.dmm
#_maps/templates/lavaland_surface_pride.dmm
#_maps/templates/lavaland_surface_sloth.dmm
##MISC
#_maps/templates/lavaland_surface_automated_trade_outpost.dmm
#_maps/templates/lavaland_surface_ufo_crash.dmm
#_maps/templates/lavaland_surface_ww_vault.dmm
#_maps/templates/lavaland_surface_automated_trade_outpost.dmm
#_maps/templates/lavaland_surface_xeno_nest.dmm
#_maps/templates/lavaland_gym.dmm

View File

@@ -0,0 +1,24 @@
#Listing maps here will blacklist them from generating in space.
#Maps must be the full path to them
#A list of maps valid to blacklist can be found at _maps\RandomRuins\SpaceRuins\_maplisting.txt
#SPECIFYING AN INVALID MAP WILL RESULT IN RUNTIMES ON GAME START
#_maps/RandomRuins/SpaceRuins/way_home.dmm
#_maps/RandomRuins/SpaceRuins/asteroid1.dmm
#_maps/RandomRuins/SpaceRuins/asteroid2.dmm
#_maps/RandomRuins/SpaceRuins/asteroid3.dmm
#_maps/RandomRuins/SpaceRuins/asteroid4.dmm
#_maps/RandomRuins/SpaceRuins/asteroid5.dmm
#_maps/RandomRuins/SpaceRuins/derelict1.dmm
#_maps/RandomRuins/SpaceRuins/derelict2.dmm
#_maps/RandomRuins/SpaceRuins/derelict3.dmm
#_maps/RandomRuins/SpaceRuins/derelict4.dmm
#_maps/RandomRuins/SpaceRuins/derelict5.dmm
#_maps/RandomRuins/SpaceRuins/spacebar.dmm
#_maps/RandomRuins/SpaceRuins/abandonedzoo.dmm
#_maps/RandomRuins/SpaceRuins/deepstorage.dmm
#_maps/RandomRuins/SpaceRuins/emptyshell.dmm
#_maps/RandomRuins/SpaceRuins/gasthelizards.dmm
#_maps/RandomRuins/SpaceRuins/intactemptyship.dmm
#_maps/RandomRuins/SpaceRuins/mechtransport.dmm
#_maps/RandomRuins/SpaceRuins/turretedoutpost.dmm