mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #8874 from Rykka-Stormheart/shep-dev-fix-mirror
Fixes incoming PR, removes now-duplicated code
This commit is contained in:
@@ -205,18 +205,6 @@ var/list/gamemode_cache = list()
|
||||
|
||||
var/static/enter_allowed = 1
|
||||
|
||||
<<<<<<< HEAD
|
||||
var/static/use_irc_bot = 0
|
||||
var/static/use_node_bot = 0
|
||||
var/static/irc_bot_port = 0
|
||||
var/static/irc_bot_host = ""
|
||||
var/static/irc_bot_export = 0 // whether the IRC bot in use is a Bot32 (or similar) instance; Bot32 uses world.Export() instead of nudge.py/libnudge
|
||||
var/static/main_irc = ""
|
||||
var/static/admin_irc = ""
|
||||
var/static/python_path = "" //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix
|
||||
var/static/use_lib_nudge = 0 //Use the C library nudge instead of the python nudge.
|
||||
var/static/use_overmap = 0
|
||||
=======
|
||||
var/use_irc_bot = 0
|
||||
var/use_node_bot = 0
|
||||
var/irc_bot_port = 0
|
||||
@@ -229,7 +217,6 @@ var/list/gamemode_cache = list()
|
||||
var/use_overmap = 0
|
||||
|
||||
var/static/list/engine_map // Comma separated list of engines to choose from. Blank means fully random.
|
||||
>>>>>>> 3e4bf4a... Merge pull request #7574 from Rykka-Stormheart/shep-dev-engine-randomization
|
||||
|
||||
// Event settings
|
||||
var/static/expected_round_length = 3 * 60 * 60 * 10 // 3 hours
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
//
|
||||
|
||||
/datum/configuration
|
||||
var/static/list/engine_map // Comma separated list of engines to choose from. Blank means fully random.
|
||||
var/static/time_off = FALSE
|
||||
var/static/pto_job_change = FALSE
|
||||
var/static/limit_interns = -1 //Unlimited by default
|
||||
@@ -42,8 +41,6 @@
|
||||
config.chat_webhook_url = value
|
||||
if ("chat_webhook_key")
|
||||
config.chat_webhook_key = value
|
||||
if ("engine_map")
|
||||
config.engine_map = splittext(value, ",")
|
||||
if ("fax_export_dir")
|
||||
config.fax_export_dir = value
|
||||
if ("items_survive_digestion")
|
||||
|
||||
@@ -25,12 +25,12 @@ SUBSYSTEM_DEF(mapping)
|
||||
using_map.perform_map_generation()
|
||||
|
||||
loadEngine()
|
||||
// preloadShelterTemplates() // Re-enable this later once shelter capsules are ported upstream
|
||||
preloadShelterTemplates() // VOREStation EDIT: Re-enable Shelter Capsules
|
||||
// Mining generation probably should be here too
|
||||
// TODO - Other stuff related to maps and areas could be moved here too. Look at /tg
|
||||
// Lateload Code related to Expedition areas.
|
||||
// if(using_map)
|
||||
// loadLateMaps()
|
||||
if(using_map) // VOREStation Edit: Re-enable this.
|
||||
loadLateMaps()
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/load_map_templates()
|
||||
@@ -74,8 +74,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
// Actually load it
|
||||
chosen_type.load(T)
|
||||
|
||||
// Commenting out lateload at the moment, this will need to be enabled once Polaris adds lateload maps (Expedition areas offmap)
|
||||
/*
|
||||
// VOREStation Edit Start: Enable This
|
||||
/datum/controller/subsystem/mapping/proc/loadLateMaps()
|
||||
var/list/deffo_load = using_map.lateload_z_levels
|
||||
var/list/maybe_load = using_map.lateload_single_pick
|
||||
@@ -117,7 +116,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/datum/map_template/shelter/S = new shelter_type()
|
||||
|
||||
shelter_templates[S.shelter_id] = S
|
||||
*/
|
||||
// VOREStation Edit End: Re-enable this
|
||||
|
||||
/datum/controller/subsystem/mapping/stat_entry(msg)
|
||||
if (!Debug2)
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
//
|
||||
// Mapping subsystem handles initialization of random map elements at server start
|
||||
// On VOREStation that means loading our random roundstart engine!
|
||||
//
|
||||
SUBSYSTEM_DEF(mapping)
|
||||
name = "Mapping"
|
||||
init_order = INIT_ORDER_MAPPING
|
||||
flags = SS_NO_FIRE
|
||||
|
||||
var/list/map_templates = list()
|
||||
var/dmm_suite/maploader = null
|
||||
var/obj/effect/landmark/engine_loader/engine_loader
|
||||
var/list/shelter_templates = list()
|
||||
|
||||
/datum/controller/subsystem/mapping/Recover()
|
||||
flags |= SS_NO_INIT // Make extra sure we don't initialize twice.
|
||||
shelter_templates = SSmapping.shelter_templates
|
||||
|
||||
/datum/controller/subsystem/mapping/Initialize(timeofday)
|
||||
if(subsystem_initialized)
|
||||
return
|
||||
world.max_z_changed() // This is to set up the player z-level list, maxz hasn't actually changed (probably)
|
||||
maploader = new()
|
||||
load_map_templates()
|
||||
|
||||
if(config.generate_map)
|
||||
// Map-gen is still very specific to the map, however putting it here should ensure it loads in the correct order.
|
||||
using_map.perform_map_generation()
|
||||
|
||||
loadEngine()
|
||||
preloadShelterTemplates()
|
||||
// Mining generation probably should be here too
|
||||
// TODO - Other stuff related to maps and areas could be moved here too. Look at /tg
|
||||
if(using_map)
|
||||
loadLateMaps()
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/load_map_templates()
|
||||
for(var/T in subtypesof(/datum/map_template))
|
||||
var/datum/map_template/template = T
|
||||
if(!(initial(template.mappath))) // If it's missing the actual path its probably a base type or being used for inheritence.
|
||||
continue
|
||||
template = new T()
|
||||
map_templates[template.name] = template
|
||||
return TRUE
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/loadEngine()
|
||||
if(!engine_loader)
|
||||
return // Seems this map doesn't need an engine loaded.
|
||||
|
||||
var/turf/T = get_turf(engine_loader)
|
||||
if(!isturf(T))
|
||||
to_world_log("[log_info_line(engine_loader)] not on a turf! Cannot place engine template.")
|
||||
return
|
||||
|
||||
// Choose an engine type
|
||||
var/datum/map_template/engine/chosen_type = null
|
||||
if (LAZYLEN(config.engine_map))
|
||||
var/chosen_name = pick(config.engine_map)
|
||||
chosen_type = map_templates[chosen_name]
|
||||
if(!istype(chosen_type))
|
||||
error("Configured engine map [chosen_name] is not a valid engine map name!")
|
||||
if(!istype(chosen_type))
|
||||
var/list/engine_types = list()
|
||||
for(var/map in map_templates)
|
||||
var/datum/map_template/engine/MT = map_templates[map]
|
||||
if(istype(MT))
|
||||
engine_types += MT
|
||||
chosen_type = pick(engine_types)
|
||||
to_world_log("Chose Engine Map: [chosen_type.name]")
|
||||
admin_notice("<span class='danger'>Chose Engine Map: [chosen_type.name]</span>", R_DEBUG)
|
||||
|
||||
// Annihilate movable atoms
|
||||
engine_loader.annihilate_bounds()
|
||||
//CHECK_TICK //Don't let anything else happen for now
|
||||
// Actually load it
|
||||
chosen_type.load(T)
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/loadLateMaps()
|
||||
var/list/deffo_load = using_map.lateload_z_levels
|
||||
var/list/maybe_load = using_map.lateload_single_pick
|
||||
|
||||
for(var/list/maplist in deffo_load)
|
||||
if(!islist(maplist))
|
||||
error("Lateload Z level [maplist] is not a list! Must be in a list!")
|
||||
continue
|
||||
for(var/mapname in maplist)
|
||||
var/datum/map_template/MT = map_templates[mapname]
|
||||
if(!istype(MT))
|
||||
error("Lateload Z level \"[mapname]\" is not a valid map!")
|
||||
continue
|
||||
MT.load_new_z(centered = FALSE)
|
||||
CHECK_TICK
|
||||
|
||||
if(LAZYLEN(maybe_load))
|
||||
var/picklist = pick(maybe_load)
|
||||
|
||||
if(!picklist) //No lateload maps at all
|
||||
return
|
||||
|
||||
if(!islist(picklist)) //So you can have a 'chain' of z-levels that make up one away mission
|
||||
error("Randompick Z level [picklist] is not a list! Must be in a list!")
|
||||
return
|
||||
|
||||
for(var/map in picklist)
|
||||
var/datum/map_template/MT = map_templates[map]
|
||||
if(!istype(MT))
|
||||
error("Randompick Z level \"[map]\" is not a valid map!")
|
||||
else
|
||||
MT.load_new_z(centered = FALSE)
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/preloadShelterTemplates()
|
||||
for(var/item in subtypesof(/datum/map_template/shelter))
|
||||
var/datum/map_template/shelter/shelter_type = item
|
||||
if(!(initial(shelter_type.mappath)))
|
||||
continue
|
||||
var/datum/map_template/shelter/S = new shelter_type()
|
||||
|
||||
shelter_templates[S.shelter_id] = S
|
||||
|
||||
/datum/controller/subsystem/mapping/stat_entry(msg)
|
||||
if (!Debug2)
|
||||
return // Only show up in stat panel if debugging is enabled.
|
||||
. = ..()
|
||||
@@ -1,32 +0,0 @@
|
||||
// Landmark for where to load in the engine on permament map.
|
||||
// Map-specific engine subtypes are in maps/submaps/engine_submaps_vr/mapfolder/engine.dmm
|
||||
// If you're adding a new map, add your folder as mapname, and then copy the _engine_submaps.dm from one of the other folders to the new one, and make your submaps!
|
||||
/obj/effect/landmark/engine_loader
|
||||
name = "Engine Loader"
|
||||
var/clean_turfs // A list of lists, where each list is (x, )
|
||||
|
||||
/obj/effect/landmark/engine_loader/New()
|
||||
if(SSmapping.engine_loader)
|
||||
warning("Duplicate engine_loader landmarks: [log_info_line(src)] and [log_info_line(SSmapping.engine_loader)]")
|
||||
delete_me = TRUE
|
||||
SSmapping.engine_loader = src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/engine_loader/proc/get_turfs_to_clean()
|
||||
. = list()
|
||||
if(clean_turfs)
|
||||
for(var/list/coords in clean_turfs)
|
||||
. += block(locate(coords[1], coords[2], src.z), locate(coords[3], coords[4], src.z))
|
||||
|
||||
/obj/effect/landmark/engine_loader/proc/annihilate_bounds()
|
||||
var/deleted_atoms = 0
|
||||
admin_notice("<span class='danger'>Annihilating objects in engine loading locatation.</span>", R_DEBUG)
|
||||
var/list/turfs_to_clean = get_turfs_to_clean()
|
||||
if(turfs_to_clean.len)
|
||||
for(var/x in 1 to 2) // Requires two passes to get everything.
|
||||
for(var/turf/T in turfs_to_clean)
|
||||
for(var/atom/movable/AM in T)
|
||||
++deleted_atoms
|
||||
qdel(AM)
|
||||
admin_notice("<span class='danger'>Annihilated [deleted_atoms] objects.</span>", R_DEBUG)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
//
|
||||
// For engine_singulo
|
||||
//
|
||||
|
||||
/area/submap/pa_room
|
||||
name = "Particle Accelerator Room"
|
||||
@@ -253,7 +253,7 @@
|
||||
#include "code\controllers\subsystems\job.dm"
|
||||
#include "code\controllers\subsystems\lighting.dm"
|
||||
#include "code\controllers\subsystems\machines.dm"
|
||||
#include "code\controllers\subsystems\mapping_vr.dm"
|
||||
#include "code\controllers\subsystems\mapping.dm"
|
||||
#include "code\controllers\subsystems\mobs.dm"
|
||||
#include "code\controllers\subsystems\nanoui.dm"
|
||||
#include "code\controllers\subsystems\nightshift.dm"
|
||||
@@ -3714,16 +3714,10 @@
|
||||
#include "maps\southern_cross\loadout\loadout_suit.dm"
|
||||
#include "maps\southern_cross\loadout\loadout_uniform.dm"
|
||||
#include "maps\submaps\_helpers.dm"
|
||||
<<<<<<< HEAD:vorestation.dme
|
||||
#include "maps\submaps\_readme.dm"
|
||||
#include "maps\submaps\engine_submaps_vr\engine.dm"
|
||||
#include "maps\submaps\engine_submaps_vr\engine_areas.dm"
|
||||
#include "maps\submaps\engine_submaps_vr\tether\_engine_submaps.dm"
|
||||
=======
|
||||
#include "maps\submaps\engine_submaps\engine.dm"
|
||||
#include "maps\submaps\engine_submaps\engine_areas.dm"
|
||||
#include "maps\submaps\engine_submaps\southern_cross\_engine_submaps.dm"
|
||||
>>>>>>> 3e4bf4a... Merge pull request #7574 from Rykka-Stormheart/shep-dev-engine-randomization:polaris.dme
|
||||
#include "maps\submaps\engine_submaps_vr\tether\_engine_submaps.dm"
|
||||
#include "maps\submaps\space_submaps\space.dm"
|
||||
#include "maps\submaps\space_submaps\debrisfield\debrisfield.dm"
|
||||
#include "maps\submaps\surface_submaps\mountains\mountains.dm"
|
||||
|
||||
Reference in New Issue
Block a user