From 5dd1d625ccf3ebba2c40e273c7d29396c9816afa Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Mon, 20 Apr 2020 21:41:22 -0400 Subject: [PATCH] Makes unbuckled shuttle movement more exciting --- code/modules/shuttles/shuttle.dm | 4 ++++ code/modules/shuttles/shuttles_vr.dm | 22 ++++++++++++++++++++++ maps/tether/tether_shuttle_defs.dm | 11 +++++++++++ maps/tether/tether_shuttles.dm | 4 ++++ 4 files changed, 41 insertions(+) diff --git a/code/modules/shuttles/shuttle.dm b/code/modules/shuttles/shuttle.dm index dd8e9ec3f38..7e393c99d1f 100644 --- a/code/modules/shuttles/shuttle.dm +++ b/code/modules/shuttles/shuttle.dm @@ -331,6 +331,10 @@ //M.throw_at_random(FALSE, 4, 1) if(istype(M, /mob/living/carbon)) M.Weaken(3) + //VOREStation Add + if(move_direction) + throw_a_mob(M,move_direction) + //VOREStation Add End // We only need to rebuild powernets for our cables. No need to check machines because they are on top of cables. for(var/obj/structure/cable/C in A) powernets |= C.powernet diff --git a/code/modules/shuttles/shuttles_vr.dm b/code/modules/shuttles/shuttles_vr.dm index bc643d38381..7582e37ae7e 100644 --- a/code/modules/shuttles/shuttles_vr.dm +++ b/code/modules/shuttles/shuttles_vr.dm @@ -1,3 +1,25 @@ +/datum/shuttle + var/move_direction //Null is legacy behavior, otherwise people are thrown in the opposite direction + +/datum/shuttle/proc/throw_a_mob(var/mob/living/carbon/M, direction) + direction = turn(direction, 180) + var/atom/target + switch(direction) + if(NORTH) + var/y = (M.y + world.view) > world.maxy ? world.maxy : M.y + world.view + target = locate(M.x, y, M.z) + if(SOUTH) + var/y = (M.y - world.view) < 1 ? 1 : M.y - world.view + target = locate(M.x, y, M.z) + if(EAST) + var/x = (M.x + world.view) > world.maxx ? world.maxx : M.x + world.view + target = locate(x, M.y, M.z) + if(WEST) + var/x = (M.x - world.view) < 1 ? 1 : M.x - world.view + target = locate(x, M.y, M.z) + if(target) + M.throw_at(target, world.view, 1) + /obj/machinery/computer/shuttle_control/multi/admin name = "centcom shuttle control console" req_access = list(access_cent_general) diff --git a/maps/tether/tether_shuttle_defs.dm b/maps/tether/tether_shuttle_defs.dm index 77e198fb53f..29489eea93c 100644 --- a/maps/tether/tether_shuttle_defs.dm +++ b/maps/tether/tether_shuttle_defs.dm @@ -9,6 +9,7 @@ landmark_station = "escape_station" landmark_transition = "escape_transit" move_time = SHUTTLE_TRANSIT_DURATION_RETURN + move_direction = NORTH ////////////////////////////////////////////////////////////// /datum/shuttle/autodock/ferry/escape_pod/large_escape_pod1 @@ -21,6 +22,7 @@ landmark_transition = "escapepod1_transit" docking_controller_tag = "large_escape_pod_1" move_time = SHUTTLE_TRANSIT_DURATION_RETURN + move_direction = EAST ////////////////////////////////////////////////////////////// // Supply shuttle @@ -33,6 +35,7 @@ landmark_station = "supply_station" docking_controller_tag = "supply_shuttle" flags = SHUTTLE_FLAGS_PROCESS|SHUTTLE_FLAGS_SUPPLY + move_direction = NORTH ////////////////////////////////////////////////////////////// // Trade Ship @@ -51,6 +54,7 @@ "beach_nw" ) defer_initialisation = TRUE + move_direction = WEST ////////////////////////////////////////////////////////////// // Tether Shuttle @@ -65,6 +69,7 @@ shuttle_area = /area/shuttle/tether //crash_areas = list(/area/shuttle/tether/crash1, /area/shuttle/tether/crash2) docking_controller_tag = "tether_shuttle" + move_direction = NORTH ////////////////////////////////////////////////////////////// // Mercenary Shuttle @@ -92,6 +97,7 @@ arrival_message = "Attention. An unregistered vessel is approaching Virgo-3B." departure_message = "Attention. A unregistered vessel is now leaving Virgo-3B." defer_initialisation = TRUE + move_direction = WEST ////////////////////////////////////////////////////////////// // Ninja Shuttle @@ -122,6 +128,7 @@ arrival_message = "Attention. An unregistered vessel is approaching Virgo-3B." departure_message = "Attention. A unregistered vessel is now leaving Virgo-3B." defer_initialisation = TRUE + move_direction = NORTH ////////////////////////////////////////////////////////////// // Skipjack @@ -152,6 +159,7 @@ arrival_message = "Attention. An unregistered vessel is approaching Virgo-3B." departure_message = "Attention. A unregistered vessel is now leaving Virgo-3B." defer_initialisation = TRUE + move_direction = NORTH ////////////////////////////////////////////////////////////// // ERT Shuttle @@ -182,6 +190,7 @@ arrival_message = "Attention. An NT support vessel is approaching Virgo-3B." departure_message = "Attention. A NT support vessel is now leaving Virgo-3B." defer_initialisation = TRUE + move_direction = WEST ////////////////////////////////////////////////////////////// // RogueMiner "Belter: Shuttle @@ -196,6 +205,7 @@ landmark_offsite = "belter_zone1" landmark_transition = "belter_transit" docking_controller_tag = "belter_docking" + move_direction = EAST /datum/shuttle/autodock/ferry/belter/New() move_time = move_time + rand(-5 SECONDS, 5 SECONDS) @@ -212,3 +222,4 @@ landmark_station = "mining_station" landmark_offsite = "mining_outpost" docking_controller_tag = "mining_docking" + move_direction = NORTH diff --git a/maps/tether/tether_shuttles.dm b/maps/tether/tether_shuttles.dm index 02373761caf..8d5ad08d249 100644 --- a/maps/tether/tether_shuttles.dm +++ b/maps/tether/tether_shuttles.dm @@ -46,6 +46,7 @@ var/tag_door_offsite = "escape_shuttle_hatch_offsite" var/frequency = 1380 // Why this frequency? BECAUSE! Thats what someone decided once. var/datum/radio_frequency/radio_connection + move_direction = NORTH /datum/shuttle/autodock/ferry/emergency/New() radio_connection = radio_controller.add_object(src, frequency, null) @@ -194,6 +195,7 @@ docking_controller_tag = "expshuttle_docker" shuttle_area = list(/area/shuttle/excursion/cockpit, /area/shuttle/excursion/general, /area/shuttle/excursion/cargo) fuel_consumption = 3 + move_direction = NORTH // The 'ship' of the excursion shuttle /obj/effect/overmap/visitable/ship/landable/excursion @@ -218,6 +220,7 @@ docking_controller_tag = "tourbus_docker" shuttle_area = list(/area/shuttle/tourbus/cockpit, /area/shuttle/tourbus/general, /area/shuttle/tourbus/engines) fuel_consumption = 1 + move_direction = NORTH // The 'ship' of the excursion shuttle /obj/effect/overmap/visitable/ship/landable/tourbus @@ -242,6 +245,7 @@ docking_controller_tag = "medivac_docker" shuttle_area = list(/area/shuttle/medivac/cockpit, /area/shuttle/medivac/general, /area/shuttle/medivac/engines) fuel_consumption = 1 + move_direction = EAST // The 'ship' of the excursion shuttle /obj/effect/overmap/visitable/ship/landable/medivac