mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 14:44:05 +01:00
Initial space ruins commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
"a" = (/turf/space,/area/space)
|
||||
"b" = (/turf/simulated/mineral/random,/area/ruin/unpowered/no_grav/way_home)
|
||||
"c" = (/turf/simulated/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav/way_home)
|
||||
"d" = (/obj/structure/signpost{name = "salvation"},/turf/simulated/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav/way_home)
|
||||
|
||||
(1,1,1) = {"
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
aaaaaaaaaaaaaabaaaaaaaaaaaaaaa
|
||||
aaaaaaaaaaaaabbbaaaaaaaaaaaaaa
|
||||
aaaaaaaaaabbbbbbbbbaaaaaaaaaaa
|
||||
aaaaaaaaaaabbbbbbbbaaaaaaaaaaa
|
||||
aaaaaaaaaabbbbbbbbaaaaaaaaaaaa
|
||||
aaaaaaaaabbbbbbbbbaaaaaaaaaaaa
|
||||
aaaaaaaaabbbbbbbbbbaaaaaaaaaaa
|
||||
aaaaaaaabbbbbbbbbbbbaaaaaaaaaa
|
||||
aaaaaaabbbbbbbbcbbbaaaaaaaaaaa
|
||||
aaaaaaabbbbbbbcccaaaaaaaaaaaaa
|
||||
aaaaaabbbbbbbbccaaaaaaaaaaaaaa
|
||||
aaaaaabbbbbbcccaaaaaaaaaaaaaaa
|
||||
aaaaaaabbbcccccaaaaaaaaaaaaaaa
|
||||
aaaaaaabbaacccccaaaaaaaaaaaaaa
|
||||
aaaaaaaaaaaaaccccaaaaaaaaaaaaa
|
||||
aaaaaaaaaaaaaccdccaaaaaaaaaaaa
|
||||
aaaaaaaaaaaaaccccccaaaaaaaaaaa
|
||||
aaaaaaaaaaaaaaccccccaaaaaaaaaa
|
||||
aaaaaaaaaaaaaacccbccaaaaaaaaaa
|
||||
aaaaaaaaaaaaaaaccbbccaaaaaaaaa
|
||||
aaaaaaaaaaaaaaacbbbbbaaaaaaaaa
|
||||
aaaaaaaaaaaaaaacbbbbbbaaaaaaaa
|
||||
aabbaaaaaaaaaaaabbbbbbbaaaaaaa
|
||||
aabbbaaaaaaaaaabbbbbbbbbaaaaaa
|
||||
aaabaaaaaaaaaabbaaabbbabaaaaaa
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
"}
|
||||
@@ -168,6 +168,7 @@
|
||||
var/list/overflow_whitelist = list() //whitelist for overflow
|
||||
|
||||
var/disable_away_missions = 0 // disable away missions
|
||||
var/disable_space_ruins = 0 //disable space ruins
|
||||
|
||||
var/ooc_allowed = 1
|
||||
var/looc_allowed = 1
|
||||
@@ -546,6 +547,9 @@
|
||||
if("disable_away_missions")
|
||||
config.disable_away_missions = 1
|
||||
|
||||
if("disable_space_ruins")
|
||||
config.disable_space_ruins = 1
|
||||
|
||||
if("disable_lobby_music")
|
||||
config.disable_lobby_music = 1
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ datum/controller/game_controller/proc/setup()
|
||||
preloadTemplates()
|
||||
if(!config.disable_away_missions)
|
||||
createRandomZlevel()
|
||||
if(!config.disable_space_ruins)
|
||||
seedRuins()
|
||||
|
||||
setup_objects()
|
||||
setupgenetics()
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
/obj/effect/landmark/corpse
|
||||
name = "Unknown"
|
||||
var/mobname = "Unknown" //Unused now but it'd fuck up maps to remove it now
|
||||
var/mob_species = null //Set to make a mob of another race, currently used only in ruins
|
||||
var/corpseuniform = null //Set this to an object path to have the slot filled with said object on the corpse.
|
||||
var/corpsesuit = null
|
||||
var/corpseshoes = null
|
||||
@@ -37,6 +38,8 @@
|
||||
M.real_name = src.name
|
||||
M.death(1) //Kills the new mob
|
||||
M.timeofdeath = timeofdeath
|
||||
if(src.mob_species)
|
||||
M.set_species(src.mob_species)
|
||||
if(src.corpseuniform)
|
||||
M.equip_to_slot_or_del(new src.corpseuniform(M), slot_w_uniform)
|
||||
if(src.corpsesuit)
|
||||
@@ -285,3 +288,10 @@
|
||||
corpseid = 1
|
||||
corpseidjob = "Commander"
|
||||
corpseidaccess = "Captain"
|
||||
|
||||
/obj/effect/landmark/corpse/abductor //Connected to ruins, for some reason?
|
||||
name = "abductor"
|
||||
mobname = "???"
|
||||
mob_species = /datum/species/abductor
|
||||
corpseuniform = /obj/item/clothing/under/color/grey
|
||||
corpseshoes = /obj/item/clothing/shoes/combat
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
//Random ruins, thanks to KorPhaeron from /tg/ station
|
||||
#define RANDOM_UPPER_X 220
|
||||
#define RANDOM_UPPER_Y 220
|
||||
#define RANDOM_LOWER_X 30
|
||||
#define RANDOM_LOWER_Y 30
|
||||
|
||||
var/global/list/potentialRandomZlevels = generateMapList(filename = "config/awaymissionconfig.txt")
|
||||
//var/global/list/potentialLavaRuins = generateMapList(filename = "config/lavaRuinConfig.txt") //Maybe some other time ;)
|
||||
//If we ever get lavaland, remember to create config/lavaRuinConfig.txt and add maps to _maps/map_files/RandomRuins/LavaRuins
|
||||
var/global/list/potentialSpaceRuins = generateMapList(filename = "config/spaceRuinConfig.txt")
|
||||
|
||||
/proc/late_setup_level(turfs, smoothTurfs)
|
||||
if(!smoothTurfs)
|
||||
smoothTurfs = turfs
|
||||
@@ -18,62 +29,124 @@
|
||||
smooth_icon(A)
|
||||
|
||||
/proc/createRandomZlevel()
|
||||
if(awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
if(awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
var/list/potentialRandomZlevels = list()
|
||||
log_startup_progress("Searching for away missions...")
|
||||
var/list/Lines
|
||||
if(fexists("config/away_mission_config.txt"))
|
||||
Lines = file2list("config/away_mission_config.txt")
|
||||
else
|
||||
Lines = file2list("config/example/away_mission_config.txt")
|
||||
if(potentialRandomZlevels && potentialRandomZlevels.len)
|
||||
var/watch = start_watch()
|
||||
log_startup_progress("<span class='boldannounce'>Loading away mission...</span>")
|
||||
|
||||
if(!Lines.len) return
|
||||
for (var/t in Lines)
|
||||
if (!t)
|
||||
continue
|
||||
var/map = pick(potentialRandomZlevels)
|
||||
var/file = file(map)
|
||||
if(isfile(file))
|
||||
maploader.load_map(file)
|
||||
late_setup_level(block(locate(1, 1, world.maxz), locate(world.maxx, world.maxy, world.maxz)))
|
||||
log_to_dd(" Away mission loaded: [map]")
|
||||
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
continue
|
||||
else if (copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
//map_transition_config.Add(AWAY_MISSION_LIST) //Maybe I'm just dumb and we have some special proc for this, so leaving this here, just in case
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/name = null
|
||||
// var/value = null
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if (L.name != "awaystart")
|
||||
continue
|
||||
awaydestinations.Add(L)
|
||||
|
||||
if (pos)
|
||||
name = lowertext(copytext(t, 1, pos))
|
||||
// value = copytext(t, pos + 1)
|
||||
else
|
||||
name = lowertext(t)
|
||||
log_startup_progress(" Away mission loaded in [stop_watch(watch)]s.")
|
||||
|
||||
if (!name)
|
||||
continue
|
||||
|
||||
potentialRandomZlevels.Add(t)
|
||||
else
|
||||
log_startup_progress(" No away missions found.")
|
||||
return
|
||||
|
||||
|
||||
if(potentialRandomZlevels.len)
|
||||
var/watch = start_watch()
|
||||
log_startup_progress("Loading away mission...")
|
||||
/proc/generateMapList(filename)
|
||||
var/list/potentialMaps = list()
|
||||
var/list/Lines
|
||||
if(filename == "config/away_mission_config.txt") //so log_to_dd doesn't runtime, I know it's sketchy
|
||||
if(fexists("config/away_mission_config.txt"))
|
||||
Lines = file2list("config/away_mission_config.txt")
|
||||
else
|
||||
Lines = file2list("config/example/away_mission_config.txt")
|
||||
else
|
||||
Lines = file2list(filename)
|
||||
if(!Lines.len) return
|
||||
for (var/t in Lines)
|
||||
if (!t)
|
||||
continue
|
||||
|
||||
var/map = pick(potentialRandomZlevels)
|
||||
var/file = file(map)
|
||||
if(isfile(file))
|
||||
maploader.load_map(file, do_sleep = 0)
|
||||
late_setup_level(block(locate(1, 1, world.maxz), locate(world.maxx, world.maxy, world.maxz)))
|
||||
log_to_dd(" Away mission loaded: [map]")
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
continue
|
||||
else if (copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if (L.name != "awaystart")
|
||||
continue
|
||||
awaydestinations.Add(L)
|
||||
var/pos = findtext(t, " ")
|
||||
var/name = null
|
||||
|
||||
log_startup_progress(" Away mission loaded in [stop_watch(watch)]s.")
|
||||
if (pos)
|
||||
name = lowertext(copytext(t, 1, pos))
|
||||
else
|
||||
name = lowertext(t)
|
||||
|
||||
else
|
||||
log_startup_progress(" No away missions found.")
|
||||
return
|
||||
if (!name)
|
||||
continue
|
||||
|
||||
potentialMaps.Add(t)
|
||||
|
||||
return potentialMaps
|
||||
|
||||
/proc/seedRuins(z_level = 7, ruin_number = 0, whitelist = /area/space, list/potentialRuins = potentialSpaceRuins)
|
||||
if(potentialRuins)
|
||||
ruin_number = min(ruin_number, potentialRuins.len)
|
||||
|
||||
while(ruin_number)
|
||||
var/sanity = 0
|
||||
var/valid = FALSE
|
||||
while(!valid)
|
||||
valid = TRUE
|
||||
sanity++
|
||||
if(sanity > 100)
|
||||
ruin_number--
|
||||
break
|
||||
var/turf/T = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), z_level)
|
||||
|
||||
for(var/turf/check in range(T, 15))
|
||||
var/area/new_area = get_area(check)
|
||||
if(!(istype(new_area, whitelist)))
|
||||
valid = FALSE
|
||||
break
|
||||
|
||||
if(valid)
|
||||
log_to_dd(" 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, -15, -15)
|
||||
ruin_number --
|
||||
|
||||
return
|
||||
|
||||
/obj/effect/ruin_loader
|
||||
name = "random ruin"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "syndballoon"
|
||||
invisibility = 0
|
||||
|
||||
/obj/effect/ruin_loader/proc/Load(list/potentialRuins = potentialSpaceRuins, x_offset = 0, y_offset = 0)
|
||||
if(potentialRuins.len)
|
||||
var/watch = start_watch()
|
||||
log_startup_progress(" Loading ruins...")
|
||||
|
||||
var/map = pick(potentialRuins)
|
||||
var/file = file(map)
|
||||
if(isfile(file))
|
||||
maploader.load_map(file, src.x + x_offset, src.y + y_offset, src.z)
|
||||
log_to_dd(" [map] loaded at [src.x + x_offset],[src.y + y_offset],[src.z]")
|
||||
potentialRuins -= map //Don't want to load the same one twice
|
||||
log_startup_progress(" Ruins loaded in [stop_watch(watch)]s.")
|
||||
else
|
||||
log_startup_progress(" No ruins found.")
|
||||
return
|
||||
|
||||
qdel(src)
|
||||
|
||||
#undef RANDOM_UPPER_X
|
||||
#undef RANDOM_UPPER_Y
|
||||
#undef RANDOM_LOWER_X
|
||||
#undef RANDOM_LOWER_Y
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
//Thanks to KorPhaeron of /tg/ station
|
||||
//Parent types
|
||||
|
||||
/area/ruin/
|
||||
name = "\improper Unexplored Location"
|
||||
icon_state = "away"
|
||||
|
||||
/area/ruin/unpowered
|
||||
always_unpowered = 0
|
||||
|
||||
/area/ruin/unpowered/no_grav
|
||||
has_gravity = 0
|
||||
|
||||
/area/ruin/powered
|
||||
requires_power = 0
|
||||
|
||||
//Areas
|
||||
|
||||
/area/ruin/unpowered/no_grav/way_home
|
||||
name = "\improper Salvation"
|
||||
icon_state = "away"
|
||||
@@ -24,7 +24,7 @@ JOBS_HAVE_MINIMAL_ACCESS
|
||||
## log OOC channel
|
||||
LOG_OOC
|
||||
|
||||
## log client Say
|
||||
## log client Say
|
||||
LOG_SAY
|
||||
|
||||
## log admin actions
|
||||
@@ -67,7 +67,7 @@ LOG_RUNTIME
|
||||
KICK_INACTIVE
|
||||
|
||||
## probablities for game modes chosen in "secret" and "random" modes
|
||||
##
|
||||
##
|
||||
## default probablity is 1, increase to make that mode more likely to be picked
|
||||
## set to 0 to disable that mode
|
||||
PROBABILITY EXTENDED 2
|
||||
@@ -195,7 +195,7 @@ LOAD_JOBS_FROM_TXT
|
||||
## Remove the # mark infront of this to forbid admins from posssessing the singularity.
|
||||
#FORBID_SINGULO_POSSESSION
|
||||
|
||||
## Remove the # to show a popup 'reply to' window to every non-admin that recieves an adminPM.
|
||||
## Remove the # to show a popup 'reply to' window to every non-admin that recieves an adminPM.
|
||||
## The intention is to make adminPMs more visible. (although I fnd popups annoying so this defaults to off)
|
||||
#POPUP_ADMIN_PM
|
||||
|
||||
@@ -260,7 +260,7 @@ GHOST_INTERACTION
|
||||
## Default is "python" on Windows, "/usr/bin/env python2" on UNIX.
|
||||
#PYTHON_PATH pythonw
|
||||
|
||||
## Defines which Z-levels the station exists on.
|
||||
## Defines which Z-levels the station exists on.
|
||||
STATION_LEVELS 1
|
||||
|
||||
## Defines which Z-levels are used for admin functionality, such as Central Command and the Syndicate Shuttle
|
||||
@@ -304,6 +304,9 @@ PLAYER_REROUTE_CAP 0
|
||||
## Disable the loading of away missions
|
||||
#DISABLE_AWAY_MISSIONS
|
||||
|
||||
## Disable the loading of space ruins
|
||||
#DISABLE_SPACE_RUINS
|
||||
|
||||
## Uncomment to disable the OOC/LOOC channel by default.
|
||||
#DISABLE_OOC
|
||||
|
||||
@@ -317,4 +320,4 @@ PLAYER_REROUTE_CAP 0
|
||||
#DISABLE_LOBBY_MUSIC
|
||||
|
||||
## Uncomment this if you want to disable the popup alert for people on the same CID
|
||||
#DISABLE_CID_WARN_POPUP
|
||||
#DISABLE_CID_WARN_POPUP
|
||||
|
||||
@@ -1944,6 +1944,7 @@
|
||||
#include "code\modules\research\xenoarchaeology\tools\tools_pickaxe.dm"
|
||||
#include "code\modules\research\xenobiology\xenobio_camera.dm"
|
||||
#include "code\modules\research\xenobiology\xenobiology.dm"
|
||||
#include "code\modules\ruins\ruin_areas.dm"
|
||||
#include "code\modules\scripting\Errors.dm"
|
||||
#include "code\modules\scripting\Options.dm"
|
||||
#include "code\modules\scripting\AST\AST Nodes.dm"
|
||||
|
||||
Reference in New Issue
Block a user