mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-05 23:13:06 +00:00
Merge branch 'master' of https://github.com/VOREStation/VOREStation
# Conflicts: # code/game/machinery/computer/communications.dm # code/modules/mob/living/carbon/human/species/station/station_vr.dm # config/custom_items.txt # icons/misc/title_vr.dmi # icons/mob/human_races/r_def_xenochimera.dmi # maps/RandomZLevels/fileList.txt # vorestation.dme
This commit is contained in:
@@ -38,34 +38,18 @@ datum/controller/game_controller/proc/setup()
|
||||
SetupXenoarch()
|
||||
|
||||
transfer_controller = new
|
||||
admin_notice("<span class='danger'>Initializations complete.</span>", R_DEBUG)
|
||||
|
||||
#if UNIT_TEST
|
||||
#define CHECK_SLEEP_MASTER // For unit tests we don't care about a smooth lobby screen experience. We care about speed.
|
||||
#else
|
||||
#define CHECK_SLEEP_MASTER if(++initialized_objects > 500) { initialized_objects=0;sleep(world.tick_lag); }
|
||||
#endif
|
||||
|
||||
datum/controller/game_controller/proc/setup_objects()
|
||||
admin_notice("<span class='danger'>Initializing objects</span>", R_DEBUG)
|
||||
sleep(-1)
|
||||
for(var/atom/movable/object in world)
|
||||
if(isnull(object.gcDestroyed))
|
||||
object.initialize()
|
||||
|
||||
admin_notice("<span class='danger'>Initializing areas</span>", R_DEBUG)
|
||||
sleep(-1)
|
||||
for(var/area/area in all_areas)
|
||||
area.initialize()
|
||||
|
||||
admin_notice("<span class='danger'>Initializing pipe networks</span>", R_DEBUG)
|
||||
sleep(-1)
|
||||
for(var/obj/machinery/atmospherics/machine in machines)
|
||||
machine.build_network()
|
||||
|
||||
admin_notice("<span class='danger'>Initializing atmos machinery.</span>", R_DEBUG)
|
||||
sleep(-1)
|
||||
for(var/obj/machinery/atmospherics/unary/U in machines)
|
||||
if(istype(U, /obj/machinery/atmospherics/unary/vent_pump))
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/T = U
|
||||
T.broadcast_status()
|
||||
else if(istype(U, /obj/machinery/atmospherics/unary/vent_scrubber))
|
||||
var/obj/machinery/atmospherics/unary/vent_scrubber/T = U
|
||||
T.broadcast_status()
|
||||
#if !UNIT_TEST
|
||||
var/initialized_objects = 0
|
||||
#endif
|
||||
|
||||
// Set up antagonists.
|
||||
populate_antag_type_list()
|
||||
@@ -73,12 +57,50 @@ datum/controller/game_controller/proc/setup_objects()
|
||||
//Set up spawn points.
|
||||
populate_spawn_points()
|
||||
|
||||
admin_notice("<span class='danger'>Initializing Floor Decals</span>", R_DEBUG)
|
||||
var/list/turfs_with_decals = list()
|
||||
for(var/obj/effect/floor_decal/D in world)
|
||||
var/T = D.add_to_turf_decals()
|
||||
if(T) turfs_with_decals |= T
|
||||
CHECK_SLEEP_MASTER
|
||||
for(var/item in turfs_with_decals)
|
||||
var/turf/T = item
|
||||
if(T.decals) T.apply_decals()
|
||||
CHECK_SLEEP_MASTER
|
||||
floor_decals_initialized = TRUE
|
||||
sleep(1)
|
||||
|
||||
admin_notice("<span class='danger'>Initializing objects</span>", R_DEBUG)
|
||||
for(var/obj/object in world)
|
||||
if(isnull(object.gcDestroyed))
|
||||
object.initialize()
|
||||
CHECK_SLEEP_MASTER
|
||||
sleep(1)
|
||||
|
||||
admin_notice("<span class='danger'>Initializing areas</span>", R_DEBUG)
|
||||
for(var/area/area in all_areas)
|
||||
area.initialize()
|
||||
CHECK_SLEEP_MASTER
|
||||
sleep(1)
|
||||
|
||||
admin_notice("<span class='danger'>Initializing pipe networks</span>", R_DEBUG)
|
||||
for(var/obj/machinery/atmospherics/machine in machines)
|
||||
machine.build_network()
|
||||
CHECK_SLEEP_MASTER
|
||||
|
||||
admin_notice("<span class='danger'>Initializing atmos machinery.</span>", R_DEBUG)
|
||||
for(var/obj/machinery/atmospherics/unary/U in machines)
|
||||
if(istype(U, /obj/machinery/atmospherics/unary/vent_pump))
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/T = U
|
||||
T.broadcast_status()
|
||||
else if(istype(U, /obj/machinery/atmospherics/unary/vent_scrubber))
|
||||
var/obj/machinery/atmospherics/unary/vent_scrubber/T = U
|
||||
T.broadcast_status()
|
||||
CHECK_SLEEP_MASTER
|
||||
|
||||
admin_notice("<span class='danger'>Initializing turbolifts</span>", R_DEBUG)
|
||||
for(var/thing in turbolifts)
|
||||
if(!deleted(thing))
|
||||
var/obj/turbolift_map_holder/lift = thing
|
||||
lift.initialize()
|
||||
sleep(-1)
|
||||
|
||||
admin_notice("<span class='danger'>Initializations complete.</span>", R_DEBUG)
|
||||
sleep(-1)
|
||||
CHECK_SLEEP_MASTER
|
||||
|
||||
210
code/controllers/shuttle_controller_vr.dm
Normal file
210
code/controllers/shuttle_controller_vr.dm
Normal file
@@ -0,0 +1,210 @@
|
||||
|
||||
var/global/datum/shuttle_controller/shuttle_controller
|
||||
|
||||
|
||||
/datum/shuttle_controller
|
||||
var/list/shuttles //maps shuttle tags to shuttle datums, so that they can be looked up.
|
||||
var/list/process_shuttles //simple list of shuttles, for processing
|
||||
|
||||
/datum/shuttle_controller/proc/process()
|
||||
//process ferry shuttles
|
||||
for (var/datum/shuttle/ferry/shuttle in process_shuttles)
|
||||
if (shuttle.process_state)
|
||||
shuttle.process()
|
||||
|
||||
|
||||
//This is called by gameticker after all the machines and radio frequencies have been properly initialized
|
||||
/datum/shuttle_controller/proc/setup_shuttle_docks()
|
||||
for(var/shuttle_tag in shuttles)
|
||||
var/datum/shuttle/shuttle = shuttles[shuttle_tag]
|
||||
shuttle.init_docking_controllers()
|
||||
shuttle.dock() //makes all shuttles docked to something at round start go into the docked state
|
||||
|
||||
for(var/obj/machinery/embedded_controller/C in machines)
|
||||
if(istype(C.program, /datum/computer/file/embedded_program/docking))
|
||||
C.program.tag = null //clear the tags, 'cause we don't need 'em anymore
|
||||
|
||||
/datum/shuttle_controller/New()
|
||||
shuttles = list()
|
||||
process_shuttles = list()
|
||||
|
||||
var/datum/shuttle/ferry/shuttle
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Escape shuttle and pods
|
||||
shuttle = new/datum/shuttle/ferry/emergency()
|
||||
shuttle.location = 1 // At offsite
|
||||
shuttle.warmup_time = 10
|
||||
shuttle.area_offsite = locate(/area/shuttle/escape/centcom)
|
||||
shuttle.area_station = locate(/area/shuttle/escape/station)
|
||||
shuttle.area_transition = locate(/area/shuttle/escape/transit)
|
||||
shuttle.docking_controller_tag = "escape_shuttle"
|
||||
shuttle.dock_target_station = "escape_dock"
|
||||
shuttle.dock_target_offsite = "centcom_dock"
|
||||
shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN
|
||||
shuttles["Escape"] = shuttle
|
||||
process_shuttles += shuttle
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
shuttle = new/datum/shuttle/ferry/escape_pod()
|
||||
shuttle.location = 0 // At station
|
||||
shuttle.warmup_time = 0
|
||||
shuttle.area_station = locate(/area/shuttle/large_escape_pod1/station)
|
||||
shuttle.area_offsite = locate(/area/shuttle/large_escape_pod1/centcom)
|
||||
shuttle.area_transition = locate(/area/shuttle/large_escape_pod1/transit)
|
||||
shuttle.docking_controller_tag = "large_escape_pod_1"
|
||||
shuttle.dock_target_station = "large_escape_pod_1_berth"
|
||||
shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
|
||||
process_shuttles += shuttle
|
||||
shuttles["Large Escape Pod 1"] = shuttle
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
shuttle = new/datum/shuttle/ferry/escape_pod()
|
||||
shuttle.location = 0 // At station
|
||||
shuttle.warmup_time = 0
|
||||
shuttle.area_station = locate(/area/shuttle/large_escape_pod2/station)
|
||||
shuttle.area_offsite = locate(/area/shuttle/large_escape_pod2/centcom)
|
||||
shuttle.area_transition = locate(/area/shuttle/large_escape_pod2/transit)
|
||||
shuttle.docking_controller_tag = "large_escape_pod_2"
|
||||
shuttle.dock_target_station = "large_escape_pod_2_berth"
|
||||
shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
|
||||
process_shuttles += shuttle
|
||||
shuttles["Large Escape Pod 2"] = shuttle
|
||||
|
||||
//give the emergency shuttle controller it's shuttles
|
||||
emergency_shuttle.shuttle = shuttles["Escape"]
|
||||
emergency_shuttle.escape_pods = list(
|
||||
shuttles["Large Escape Pod 1"],
|
||||
shuttles["Large Escape Pod 2"],
|
||||
)
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Supply shuttle
|
||||
shuttle = new/datum/shuttle/ferry/supply()
|
||||
shuttle.location = 1
|
||||
shuttle.warmup_time = 10
|
||||
shuttle.area_offsite = locate(/area/supply/dock)
|
||||
shuttle.area_station = locate(/area/supply/station)
|
||||
shuttle.docking_controller_tag = "supply_shuttle"
|
||||
shuttle.dock_target_station = "cargo_bay"
|
||||
shuttles["Supply"] = shuttle
|
||||
process_shuttles += shuttle
|
||||
|
||||
supply_controller.shuttle = shuttle
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Trade Ship
|
||||
shuttle = new()
|
||||
shuttle.location = 1
|
||||
shuttle.warmup_time = 10 //want some warmup time so people can cancel.
|
||||
shuttle.area_offsite = locate(/area/shuttle/trade/centcom)
|
||||
shuttle.area_station = locate(/area/shuttle/trade/station)
|
||||
shuttle.docking_controller_tag = "trade_shuttle"
|
||||
shuttle.dock_target_station = "trade_shuttle_dock_airlock"
|
||||
shuttle.dock_target_offsite = "trade_shuttle_bay"
|
||||
shuttles["Trade"] = shuttle
|
||||
process_shuttles += shuttle
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Away Mission Shuttle
|
||||
var/datum/shuttle/multi_shuttle/AM = new/datum/shuttle/multi_shuttle()
|
||||
AM.legit = 1
|
||||
AM.origin = locate(/area/shuttle/awaymission/home)
|
||||
AM.start_location = "NSS Adephagia (AM)"
|
||||
|
||||
AM.destinations = list(
|
||||
"Old Engineering Base (AM)" = locate(/area/shuttle/awaymission/oldengbase)
|
||||
)
|
||||
|
||||
AM.docking_controller_tag = "awaymission_shuttle"
|
||||
AM.destination_dock_targets = list(
|
||||
"NSS Adephagia (AM)" = "d1a2_dock_airlock"
|
||||
)
|
||||
|
||||
var/area/awaym_dest = locate(/area/shuttle/awaymission/away)
|
||||
if(awaym_dest.contents.len) //Otherwise this is an empty imaginary area
|
||||
AM.destinations["Unknown Location [rand(1000,9999)]"] = awaym_dest
|
||||
|
||||
AM.announcer = "Automated Traffic Control"
|
||||
//These seem backwards because they are written from the perspective of the merc and vox ships
|
||||
AM.departure_message = "Attention. The away mission vessel is approaching the colony."
|
||||
AM.arrival_message = "Attention. The away mission vessel is now leaving from the colony."
|
||||
AM.interim = locate(/area/shuttle/awaymission/warp)
|
||||
|
||||
AM.move_time = 60
|
||||
AM.warmup_time = 8
|
||||
shuttles["AwayMission"] = AM
|
||||
|
||||
|
||||
// TODO - Not implemented yet on new map
|
||||
///////////////////////////////////////////////
|
||||
//VOREStation Add - Belter Shuttle
|
||||
// shuttle = new/datum/shuttle/ferry()
|
||||
// shuttle.location = 0
|
||||
// shuttle.warmup_time = 6
|
||||
// shuttle.area_station = locate(/area/shuttle/belter/station)
|
||||
// shuttle.area_offsite = locate(/area/shuttle/belter/belt/zone1)
|
||||
// shuttle.area_transition = locate(/area/shuttle/belter/transit)
|
||||
// shuttle.docking_controller_tag = "belter_docking"
|
||||
// shuttle.dock_target_station = "belter_nodocking" //Fake tags to prevent the shuttle from opening doors.
|
||||
// shuttle.dock_target_offsite = "belter_nodocking"
|
||||
// shuttle.transit_direction = EAST
|
||||
// shuttle.move_time = 60 + rand(10,40)
|
||||
// process_shuttles += shuttle
|
||||
// shuttles["Belter"] = shuttle
|
||||
//VOREStation Add End - Belter Shuttle
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Tether Shuttle
|
||||
var/datum/shuttle/ferry/tether_backup/TB = new()
|
||||
TB.location = 1 // At offsite
|
||||
TB.warmup_time = 5
|
||||
TB.move_time = 45
|
||||
TB.area_offsite = locate(/area/shuttle/tether/surface)
|
||||
TB.area_station = locate(/area/shuttle/tether/station)
|
||||
TB.area_transition = locate(/area/shuttle/tether/transit)
|
||||
TB.crash_areas = list(locate(/area/shuttle/tether/crash1), locate(/area/shuttle/tether/crash2))
|
||||
TB.docking_controller_tag = "tether_shuttle"
|
||||
TB.dock_target_station = "tether_dock_airlock"
|
||||
TB.dock_target_offsite = "tether_pad_airlock"
|
||||
shuttles["Tether Backup"] = TB
|
||||
process_shuttles += TB
|
||||
|
||||
for(var/obj/structure/shuttle/engine/propulsion/E in TB.area_offsite)
|
||||
TB.engines += E
|
||||
for(var/obj/machinery/computer/shuttle_control/tether_backup/comp in TB.area_offsite)
|
||||
TB.computer = comp
|
||||
break
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Antag Space "Proto Shuttle" Shuttle
|
||||
AM = new/datum/shuttle/multi_shuttle()
|
||||
AM.docking_controller_tag = "antag_space_shuttle"
|
||||
AM.start_location = "Home Base"
|
||||
AM.origin = locate(/area/shuttle/antag_space/base)
|
||||
AM.interim = locate(/area/shuttle/antag_space/transit)
|
||||
AM.destinations = list(
|
||||
"Nearby" = locate(/area/shuttle/antag_space/north),
|
||||
"Docks" = locate(/area/shuttle/antag_space/docks)
|
||||
)
|
||||
AM.destination_dock_targets = list("Home Base" = "antag_space_dock")
|
||||
AM.move_time = 60
|
||||
AM.warmup_time = 8
|
||||
shuttles["Proto"] = AM
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Antag Surface "Land Crawler" Shuttle
|
||||
AM = new/datum/shuttle/multi_shuttle()
|
||||
AM.docking_controller_tag = "antag_ground_shuttle"
|
||||
AM.start_location = "Home Base"
|
||||
AM.origin = locate(/area/shuttle/antag_ground/base)
|
||||
AM.interim = locate(/area/shuttle/antag_ground/transit)
|
||||
AM.destinations = list(
|
||||
"Solar Array" = locate(/area/shuttle/antag_ground/solars),
|
||||
"Mining Outpost" = locate(/area/shuttle/antag_ground/mining)
|
||||
)
|
||||
AM.destination_dock_targets = list("Home Base" = "antag_ground_dock")
|
||||
AM.move_time = 60
|
||||
AM.warmup_time = 8
|
||||
shuttles["Land Crawler"] = AM
|
||||
Reference in New Issue
Block a user