mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Ports a large chunk of the map datum system that europa/bay uses.
Links many map-specific details such as the station name, z-level information, and allowed jobs from global vars to map datum vars, which should help us maintain multiple maps at once in the future, which will be needed for the future Southern Cross. Note that a config change will be needed to change GENERATE_ASTEROID to GENERATE_MAP, otherwise no changes should be required to continue normal map usage. To change to a different map, it's suggested to tick the file that ticks all the other needed files, which for the Northern Star is called northern_star.dm.
This commit is contained in:
@@ -139,11 +139,9 @@ var/list/gamemode_cache = list()
|
||||
var/use_loyalty_implants = 0
|
||||
|
||||
var/welder_vision = 1
|
||||
var/generate_asteroid = 0
|
||||
var/generate_map = 0
|
||||
var/no_click_cooldown = 0
|
||||
|
||||
var/asteroid_z_levels = list()
|
||||
|
||||
//Used for modifying movement speed for mobs.
|
||||
//Unversal modifiers
|
||||
var/run_speed = 0
|
||||
@@ -185,12 +183,6 @@ var/list/gamemode_cache = list()
|
||||
var/use_lib_nudge = 0 //Use the C library nudge instead of the python nudge.
|
||||
var/use_overmap = 0
|
||||
|
||||
var/list/station_levels = list(1) // Defines which Z-levels the station exists on.
|
||||
var/list/admin_levels= list(2) // Defines which Z-levels which are for admin functionality, for example including such areas as Central Command and the Syndicate Shuttle
|
||||
var/list/contact_levels = list(1, 5) // Defines which Z-levels which, for example, a Code Red announcement may affect
|
||||
var/list/player_levels = list(1, 3, 4, 5, 6) // Defines all Z-levels a character can typically reach
|
||||
var/list/sealed_levels = list() // Defines levels that do not allow random transit at the edges.
|
||||
|
||||
// Event settings
|
||||
var/expected_round_length = 3 * 60 * 60 * 10 // 3 hours
|
||||
// If the first delay has a custom start time
|
||||
@@ -342,14 +334,8 @@ var/list/gamemode_cache = list()
|
||||
if ("log_runtime")
|
||||
config.log_runtime = 1
|
||||
|
||||
if ("generate_asteroid")
|
||||
config.generate_asteroid = 1
|
||||
|
||||
if ("asteroid_z_levels")
|
||||
config.asteroid_z_levels = splittext(value, ";")
|
||||
//Numbers get stored as strings, so we'll fix that right now.
|
||||
for(var/z_level in config.asteroid_z_levels)
|
||||
z_level = text2num(z_level)
|
||||
if ("generate_map")
|
||||
config.generate_map = 1
|
||||
|
||||
if ("no_click_cooldown")
|
||||
config.no_click_cooldown = 1
|
||||
@@ -657,19 +643,19 @@ var/list/gamemode_cache = list()
|
||||
|
||||
if("use_overmap")
|
||||
config.use_overmap = 1
|
||||
|
||||
/*
|
||||
if("station_levels")
|
||||
config.station_levels = text2numlist(value, ";")
|
||||
using_map.station_levels = text2numlist(value, ";")
|
||||
|
||||
if("admin_levels")
|
||||
config.admin_levels = text2numlist(value, ";")
|
||||
using_map.admin_levels = text2numlist(value, ";")
|
||||
|
||||
if("contact_levels")
|
||||
config.contact_levels = text2numlist(value, ";")
|
||||
using_map.contact_levels = text2numlist(value, ";")
|
||||
|
||||
if("player_levels")
|
||||
config.player_levels = text2numlist(value, ";")
|
||||
|
||||
using_map.player_levels = text2numlist(value, ";")
|
||||
*/
|
||||
if("expected_round_length")
|
||||
config.expected_round_length = MinutesToTicks(text2num(value))
|
||||
|
||||
|
||||
@@ -44,11 +44,12 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
if (!shuttle.location) //at station
|
||||
if (autopilot)
|
||||
set_launch_countdown(SHUTTLE_LEAVETIME) //get ready to return
|
||||
var/estimated_time = round(estimate_launch_time()/60,1)
|
||||
|
||||
if (evac)
|
||||
emergency_shuttle_docked.Announce("The Emergency Shuttle has docked with the station at docks one and two. You have approximately [round(estimate_launch_time()/60,1)] minutes to board the Emergency Shuttle.")
|
||||
emergency_shuttle_docked.Announce(replacetext(replacetext(using_map.emergency_shuttle_docked_message, "%dock_name%", "[using_map.dock_name]"), "%ETD%", "[estimated_time] minute\s"))
|
||||
else
|
||||
priority_announcement.Announce("The scheduled shuttle to the [dock_name] has docked with the station at docks one and two. It will depart in approximately [round(emergency_shuttle.estimate_launch_time()/60,1)] minutes.")
|
||||
priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_docked_message, "%dock_name%", "[using_map.dock_name]"), "%ETD%", "[estimated_time] minute\s"))
|
||||
|
||||
//arm the escape pods
|
||||
if (evac)
|
||||
@@ -75,9 +76,10 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
|
||||
//reset the shuttle transit time if we need to
|
||||
shuttle.move_time = SHUTTLE_TRANSIT_DURATION
|
||||
var/estimated_time = round(estimate_arrival_time()/60,1)
|
||||
|
||||
evac = 1
|
||||
emergency_shuttle_called.Announce("An emergency evacuation shuttle has been called. It will arrive at docks one and two in approximately [round(estimate_arrival_time()/60)] minutes.")
|
||||
emergency_shuttle_called.Announce(replacetext(using_map.emergency_shuttle_called_message, "%ETA%", "[estimated_time] minute\s"))
|
||||
for(var/area/A in world)
|
||||
if(istype(A, /area/hallway))
|
||||
A.readyalert()
|
||||
@@ -90,11 +92,12 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
autopilot = 1
|
||||
set_launch_countdown(get_shuttle_prep_time())
|
||||
auto_recall_time = rand(world.time + 300, launch_time - 300)
|
||||
var/estimated_time = round(estimate_arrival_time()/60,1)
|
||||
|
||||
//reset the shuttle transit time if we need to
|
||||
shuttle.move_time = SHUTTLE_TRANSIT_DURATION
|
||||
|
||||
priority_announcement.Announce("The regularly scheduled shuttle to the [dock_name] will arrive in in approximately [round(estimate_arrival_time()/60)] minutes. Those leaving should proceed to docks one and two.")
|
||||
priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_called_message, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s"))
|
||||
|
||||
//recalls the shuttle
|
||||
/datum/emergency_shuttle_controller/proc/recall()
|
||||
@@ -104,14 +107,14 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
shuttle.cancel_launch(src)
|
||||
|
||||
if (evac)
|
||||
emergency_shuttle_recalled.Announce("The emergency shuttle has been recalled.")
|
||||
emergency_shuttle_recalled.Announce(using_map.emergency_shuttle_recall_message)
|
||||
|
||||
for(var/area/A in world)
|
||||
if(istype(A, /area/hallway))
|
||||
A.readyreset()
|
||||
evac = 0
|
||||
else
|
||||
priority_announcement.Announce("The scheduled transfer shuttle has been cancelled.")
|
||||
priority_announcement.Announce(using_map.shuttle_recall_message)
|
||||
|
||||
/datum/emergency_shuttle_controller/proc/can_call()
|
||||
if (!universe.OnShuttleCall(null))
|
||||
|
||||
Reference in New Issue
Block a user