From 410fdbf90c44c74276be234a2ec8437dd26c913b Mon Sep 17 00:00:00 2001 From: Steelpoint Date: Fri, 10 Jan 2025 18:50:57 +0800 Subject: [PATCH 01/10] barebasiccommit --- maps/map_files/USS_Almayer/USS_Almayer.dmm | 8 +--- maps/map_files/generic/Admin_level.dmm | 56 ++++++++++------------ maps/shuttles/requisition_elevator.dmm | 43 +++++++++++++++++ 3 files changed, 70 insertions(+), 37 deletions(-) create mode 100644 maps/shuttles/requisition_elevator.dmm diff --git a/maps/map_files/USS_Almayer/USS_Almayer.dmm b/maps/map_files/USS_Almayer/USS_Almayer.dmm index c7a2814cfb02..eefba8aaeb51 100644 --- a/maps/map_files/USS_Almayer/USS_Almayer.dmm +++ b/maps/map_files/USS_Almayer/USS_Almayer.dmm @@ -9651,7 +9651,7 @@ /area/almayer/squads/req) "bpR" = ( /turf/open/floor/almayer/empty/requisitions, -/area/supply/station/uscm) +/area/almayer/squads/req) "bpS" = ( /obj/structure/machinery/door/poddoor/railing{ dir = 8; @@ -9954,10 +9954,6 @@ }, /turf/open/floor/almayer/cargo_arrow/west, /area/almayer/squads/req) -"bsK" = ( -/obj/effect/landmark/supply_elevator, -/turf/open/floor/almayer/empty/requisitions, -/area/supply/station/uscm) "bsL" = ( /obj/structure/machinery/door/poddoor/railing{ dir = 8; @@ -111535,7 +111531,7 @@ pjG boA bpR bpR -bsK +bpR bpR bpR bxh diff --git a/maps/map_files/generic/Admin_level.dmm b/maps/map_files/generic/Admin_level.dmm index 6b91933208d8..af484c1dd386 100644 --- a/maps/map_files/generic/Admin_level.dmm +++ b/maps/map_files/generic/Admin_level.dmm @@ -135,9 +135,6 @@ name = "reinforced hull" }, /area/centcom/living) -"dw" = ( -/turf/open/floor/almayer/test_floor5, -/area/supply/dock/uscm) "dy" = ( /turf/open/floor/wood, /area/centcom/living) @@ -157,9 +154,6 @@ }, /turf/open/space/transit/east/shuttlespace_ew7, /area/space) -"ej" = ( -/turf/open/floor/plating/bare_catwalk, -/area/supply/dock/uscm) "ev" = ( /turf/open/floor/carpet/edge/northwest, /area/centcom/living) @@ -11223,11 +11217,11 @@ aa aC aa fn -ej -ej -ej -ej -ej +as +as +as +as +as fn aa fn @@ -11375,11 +11369,11 @@ aa aC aa fn -ej -dw -ej -dw -ej +as +as +as +as +as fn aa fn @@ -11527,11 +11521,11 @@ aa aC aa fn -ej -ej -ej -ej -ej +as +as +as +as +as fn aa fn @@ -11679,11 +11673,11 @@ aa aC aa fn -ej -dw -ej -dw -ej +as +as +as +as +as fn aa fn @@ -11831,11 +11825,11 @@ aa aC aa fn -ej -ej -ej -ej -ej +as +as +as +as +as fn aa fn diff --git a/maps/shuttles/requisition_elevator.dmm b/maps/shuttles/requisition_elevator.dmm new file mode 100644 index 000000000000..f2412f028f24 --- /dev/null +++ b/maps/shuttles/requisition_elevator.dmm @@ -0,0 +1,43 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/open/floor/plating/bare_catwalk, +/area/supply/dock/uscm) +"s" = ( +/turf/open/floor/almayer/test_floor5, +/area/supply/dock/uscm) + +(1,1,1) = {" +a +a +a +a +a +"} +(2,1,1) = {" +a +s +a +s +a +"} +(3,1,1) = {" +a +a +a +a +a +"} +(4,1,1) = {" +a +s +a +s +a +"} +(5,1,1) = {" +a +a +a +a +a +"} From a9c040457eeaa8a2aa1775f3f7134aa883572dd2 Mon Sep 17 00:00:00 2001 From: Steelpoint Date: Fri, 10 Jan 2025 19:21:56 +0800 Subject: [PATCH 02/10] secondroundchanges --- code/__DEFINES/shuttles.dm | 2 ++ code/game/turfs/transit.dm | 4 ++++ code/modules/shuttle/shuttles/dropship.dm | 24 ++++++++++++++++++++++ maps/map_files/USS_Almayer/USS_Almayer.dmm | 6 +++++- maps/map_files/generic/Admin_level.dmm | 6 +++++- maps/shuttles/requisition_elevator.dmm | 6 +++++- 6 files changed, 45 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/shuttles.dm b/code/__DEFINES/shuttles.dm index ab9d0f1bffde..79fa826f9ba9 100644 --- a/code/__DEFINES/shuttles.dm +++ b/code/__DEFINES/shuttles.dm @@ -117,6 +117,8 @@ #define DROPSHIP_MORANA "dropship_morana" #define DROPSHIP_DEVANA "dropship_devana" +#define ELEVATOR_REQ_USCM "elevator_req_uscm" + #define ALMAYER_DROPSHIP_LZ1 "almayer-hangar-lz1" #define ALMAYER_DROPSHIP_LZ2 "almayer-hangar-lz2" diff --git a/code/game/turfs/transit.dm b/code/game/turfs/transit.dm index 682bedc2cee6..d5fcef4bc14d 100644 --- a/code/game/turfs/transit.dm +++ b/code/game/turfs/transit.dm @@ -276,6 +276,10 @@ shuttle_tag = DROPSHIP_DEVANA dir = SOUTH +/turf/open/space/transit/dropship/req + shuttle_tag = ELEVATOR_REQ_USCM + dir = SOUTH + /turf/open/space/transit/south dir = SOUTH diff --git a/code/modules/shuttle/shuttles/dropship.dm b/code/modules/shuttle/shuttles/dropship.dm index 6a4053ce5464..8622afdcebfc 100644 --- a/code/modules/shuttle/shuttles/dropship.dm +++ b/code/modules/shuttle/shuttles/dropship.dm @@ -155,6 +155,14 @@ /obj/docking_port/mobile/marine_dropship/devana/get_transit_path_type() return /turf/open/space/transit/dropship/devana +/obj/docking_port/mobile/marine_dropship/req_uscm + name = "Elevator ASRS" + id = ELEVATOR_REQ_USCM + preferred_direction = SOUTH // If you are changing this, please update the dir of the path below as well + +/obj/docking_port/mobile/marine_dropship/req_uscm/get_transit_path_type() + return /turf/open/space/transit/dropship/req + /obj/docking_port/mobile/marine_dropship/check() . = ..() @@ -318,6 +326,18 @@ auto_open = TRUE roundstart_template = /datum/map_template/shuttle/morana +/obj/docking_port/stationary/marine_dropship/req_uscm + name = "Requisition Bay ASRS" + id = ELEVATOR_REQ_USCM + auto_open = TRUE +// roundstart_template = /datum/map_template/shuttle/requisition_elevator + +/obj/docking_port/stationary/marine_dropship/req_uscm_admin + name = "Requisition Bay Admin Zone" + id = ELEVATOR_REQ_USCM + auto_open = TRUE + roundstart_template = /datum/map_template/shuttle/requisition_elevator + /obj/docking_port/stationary/marine_dropship/crash_site auto_open = TRUE @@ -367,4 +387,8 @@ name = "Devana" shuttle_id = DROPSHIP_DEVANA +/datum/map_template/shuttle/requisition_elevator + name = "Elevator ASRS" + shuttle_id = ELEVATOR_REQ_USCM + diff --git a/maps/map_files/USS_Almayer/USS_Almayer.dmm b/maps/map_files/USS_Almayer/USS_Almayer.dmm index eefba8aaeb51..ddeee46f39af 100644 --- a/maps/map_files/USS_Almayer/USS_Almayer.dmm +++ b/maps/map_files/USS_Almayer/USS_Almayer.dmm @@ -191,6 +191,10 @@ }, /turf/open/floor/almayer/red/north, /area/almayer/shipboard/brig/processing) +"aaB" = ( +/obj/docking_port/stationary/marine_dropship/req_uscm, +/turf/open/floor/almayer/empty/requisitions, +/area/almayer/squads/req) "aaC" = ( /obj/structure/lattice, /turf/open/space/basic, @@ -111531,7 +111535,7 @@ pjG boA bpR bpR -bpR +aaB bpR bpR bxh diff --git a/maps/map_files/generic/Admin_level.dmm b/maps/map_files/generic/Admin_level.dmm index af484c1dd386..167e109c6ffb 100644 --- a/maps/map_files/generic/Admin_level.dmm +++ b/maps/map_files/generic/Admin_level.dmm @@ -18,6 +18,10 @@ /obj/docking_port/stationary/vehicle_elevator/adminlevel, /turf/open/space/basic, /area/space) +"af" = ( +/obj/docking_port/stationary/marine_dropship/req_uscm_admin, +/turf/open/space/basic, +/area/space) "ag" = ( /obj/structure/window/framed/almayer/hull, /obj/structure/machinery/door/poddoor/almayer/open{ @@ -11523,7 +11527,7 @@ aa fn as as -as +af as as fn diff --git a/maps/shuttles/requisition_elevator.dmm b/maps/shuttles/requisition_elevator.dmm index f2412f028f24..51845c560184 100644 --- a/maps/shuttles/requisition_elevator.dmm +++ b/maps/shuttles/requisition_elevator.dmm @@ -2,6 +2,10 @@ "a" = ( /turf/open/floor/plating/bare_catwalk, /area/supply/dock/uscm) +"b" = ( +/obj/docking_port/mobile/marine_dropship/req_uscm, +/turf/open/floor/plating/bare_catwalk, +/area/supply/dock/uscm) "s" = ( /turf/open/floor/almayer/test_floor5, /area/supply/dock/uscm) @@ -23,7 +27,7 @@ a (3,1,1) = {" a a -a +b a a "} From 32d1504db02438158c1c13a9107fa71f14417491 Mon Sep 17 00:00:00 2001 From: Steelpoint Date: Fri, 10 Jan 2025 19:28:29 +0800 Subject: [PATCH 03/10] elevatorwork --- code/modules/shuttle/shuttles/dropship.dm | 6 +++--- .../{requisition_elevator.dmm => elevator_req_uscm.dmm} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename maps/shuttles/{requisition_elevator.dmm => elevator_req_uscm.dmm} (100%) diff --git a/code/modules/shuttle/shuttles/dropship.dm b/code/modules/shuttle/shuttles/dropship.dm index 8622afdcebfc..2a3d14219398 100644 --- a/code/modules/shuttle/shuttles/dropship.dm +++ b/code/modules/shuttle/shuttles/dropship.dm @@ -330,13 +330,13 @@ name = "Requisition Bay ASRS" id = ELEVATOR_REQ_USCM auto_open = TRUE -// roundstart_template = /datum/map_template/shuttle/requisition_elevator +// roundstart_template = /datum/map_template/shuttle/elevator_req_uscm /obj/docking_port/stationary/marine_dropship/req_uscm_admin name = "Requisition Bay Admin Zone" id = ELEVATOR_REQ_USCM auto_open = TRUE - roundstart_template = /datum/map_template/shuttle/requisition_elevator + roundstart_template = /datum/map_template/shuttle/elevator_req_uscm /obj/docking_port/stationary/marine_dropship/crash_site auto_open = TRUE @@ -387,7 +387,7 @@ name = "Devana" shuttle_id = DROPSHIP_DEVANA -/datum/map_template/shuttle/requisition_elevator +/datum/map_template/shuttle/elevator_req_uscm name = "Elevator ASRS" shuttle_id = ELEVATOR_REQ_USCM diff --git a/maps/shuttles/requisition_elevator.dmm b/maps/shuttles/elevator_req_uscm.dmm similarity index 100% rename from maps/shuttles/requisition_elevator.dmm rename to maps/shuttles/elevator_req_uscm.dmm From cacef746692386c53a074575a86c3e24434fdcbd Mon Sep 17 00:00:00 2001 From: Steelpoint Date: Fri, 10 Jan 2025 20:06:57 +0800 Subject: [PATCH 04/10] morefixreq --- code/game/area/Sulaco.dm | 8 ++++++++ maps/shuttles/elevator_req_uscm.dmm | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/code/game/area/Sulaco.dm b/code/game/area/Sulaco.dm index 54e55b8581c7..79003ce33835 100644 --- a/code/game/area/Sulaco.dm +++ b/code/game/area/Sulaco.dm @@ -262,6 +262,14 @@ name = "\improper Devana Landing Zone" icon_state = "away2" +//// + +/area/shuttle/elevator_req_uscm + name = "Requisition ASRS" + icon_state = "shuttle" + base_muffle = MUFFLE_HIGH + base_lighting_alpha = 255 + //DISTRESS SHUTTLES /area/shuttle/distress diff --git a/maps/shuttles/elevator_req_uscm.dmm b/maps/shuttles/elevator_req_uscm.dmm index 51845c560184..763a0bba3bf0 100644 --- a/maps/shuttles/elevator_req_uscm.dmm +++ b/maps/shuttles/elevator_req_uscm.dmm @@ -1,14 +1,14 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( /turf/open/floor/plating/bare_catwalk, -/area/supply/dock/uscm) +/area/shuttle/elevator_req_uscm) "b" = ( /obj/docking_port/mobile/marine_dropship/req_uscm, /turf/open/floor/plating/bare_catwalk, -/area/supply/dock/uscm) +/area/shuttle/elevator_req_uscm) "s" = ( /turf/open/floor/almayer/test_floor5, -/area/supply/dock/uscm) +/area/shuttle/elevator_req_uscm) (1,1,1) = {" a From 0f53c79d5e1508512a9f9f8f8e5c8242ba050001 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 10 Jan 2025 13:57:02 +0100 Subject: [PATCH 05/10] DO NOT MERGE --- code/game/supplyshuttle.dm | 7 ++++++- code/modules/shuttle/shuttles/dropship.dm | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 5c3f0e8e121a..0f6d930ab352 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -122,6 +122,9 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) /// What the user currently has in their cart var/current_order = list() + //The new shuttle system + var/obj/docking_port/stationary/marine_dropship/supply_shuttle + /obj/structure/machinery/computer/supply/Initialize() . = ..() switch(faction) @@ -746,6 +749,8 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) var/obj/item/paper/manifest/manifest_to_print = /obj/item/paper/manifest var/obj/structure/machinery/computer/supply/asrs/bound_supply_computer_list + var/obj/docking_port/stationary/marine_dropship/new_shuttle + var/list/all_supply_groups = list( "Operations", "Weapons", @@ -939,7 +944,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) //Buyin /datum/controller/supply/proc/buy() - var/area/area_shuttle = shuttle?.get_location_area() + var/area/area_shuttle = shuttle_new?.get_location_area() if(!area_shuttle || !length(shoppinglist)) return diff --git a/code/modules/shuttle/shuttles/dropship.dm b/code/modules/shuttle/shuttles/dropship.dm index 2a3d14219398..0bf675d87309 100644 --- a/code/modules/shuttle/shuttles/dropship.dm +++ b/code/modules/shuttle/shuttles/dropship.dm @@ -160,6 +160,10 @@ id = ELEVATOR_REQ_USCM preferred_direction = SOUTH // If you are changing this, please update the dir of the path below as well +/obj/docking_port/mobile/marine_dropship/req_uscm/Initialize(mapload) + . = ..() + GLOB.supply_controller.new_shuttle = src + /obj/docking_port/mobile/marine_dropship/req_uscm/get_transit_path_type() return /turf/open/space/transit/dropship/req From fc2b9c56d8354f821f2d2830eeb4e4f23fc9dc08 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 10 Jan 2025 15:25:06 +0100 Subject: [PATCH 06/10] ehm --- code/__DEFINES/shuttles.dm | 1 + code/game/supplyshuttle.dm | 8 +++----- code/modules/shuttle/shuttles/dropship.dm | 11 ++++++++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/code/__DEFINES/shuttles.dm b/code/__DEFINES/shuttles.dm index 79fa826f9ba9..dafc1633214b 100644 --- a/code/__DEFINES/shuttles.dm +++ b/code/__DEFINES/shuttles.dm @@ -118,6 +118,7 @@ #define DROPSHIP_DEVANA "dropship_devana" #define ELEVATOR_REQ_USCM "elevator_req_uscm" +#define ELEVATOR_REQ_USCM_ADMIN "elevator_req_uscm_admin" #define ALMAYER_DROPSHIP_LZ1 "almayer-hangar-lz1" #define ALMAYER_DROPSHIP_LZ2 "almayer-hangar-lz2" diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 0f6d930ab352..7675ef6f5eb6 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -122,9 +122,6 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) /// What the user currently has in their cart var/current_order = list() - //The new shuttle system - var/obj/docking_port/stationary/marine_dropship/supply_shuttle - /obj/structure/machinery/computer/supply/Initialize() . = ..() switch(faction) @@ -749,7 +746,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) var/obj/item/paper/manifest/manifest_to_print = /obj/item/paper/manifest var/obj/structure/machinery/computer/supply/asrs/bound_supply_computer_list - var/obj/docking_port/stationary/marine_dropship/new_shuttle + var/obj/docking_port/mobile/marine_dropship/req_uscm/new_shuttle var/list/all_supply_groups = list( "Operations", @@ -944,7 +941,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) //Buyin /datum/controller/supply/proc/buy() - var/area/area_shuttle = shuttle_new?.get_location_area() + var/area/area_shuttle = new_shuttle.shuttle_areas[1] if(!area_shuttle || !length(shoppinglist)) return @@ -1212,6 +1209,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) return TRUE shuttle.launch(src) + linked_supply_controller.new_shuttle.swap_station() return TRUE if("force_launch") diff --git a/code/modules/shuttle/shuttles/dropship.dm b/code/modules/shuttle/shuttles/dropship.dm index 0bf675d87309..646174dad4d5 100644 --- a/code/modules/shuttle/shuttles/dropship.dm +++ b/code/modules/shuttle/shuttles/dropship.dm @@ -159,6 +159,8 @@ name = "Elevator ASRS" id = ELEVATOR_REQ_USCM preferred_direction = SOUTH // If you are changing this, please update the dir of the path below as well + automated_hangar_id = ELEVATOR_REQ_USCM + automated_lz_id = ELEVATOR_REQ_USCM_ADMIN /obj/docking_port/mobile/marine_dropship/req_uscm/Initialize(mapload) . = ..() @@ -167,6 +169,13 @@ /obj/docking_port/mobile/marine_dropship/req_uscm/get_transit_path_type() return /turf/open/space/transit/dropship/req +/obj/docking_port/mobile/marine_dropship/req_uscm/proc/swap_station() + var/obj/docking_port/stationary/dockedAt = get_docked() + if(dockedAt.id == automated_hangar_id) + SSshuttle.moveShuttle(id, automated_lz_id, TRUE) + else + SSshuttle.moveShuttle(id, automated_hangar_id, TRUE) + /obj/docking_port/mobile/marine_dropship/check() . = ..() @@ -338,7 +347,7 @@ /obj/docking_port/stationary/marine_dropship/req_uscm_admin name = "Requisition Bay Admin Zone" - id = ELEVATOR_REQ_USCM + id = ELEVATOR_REQ_USCM_ADMIN auto_open = TRUE roundstart_template = /datum/map_template/shuttle/elevator_req_uscm From 466f5cf7e7f144511c93d2f9cddcdf3afa0a47cc Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 10 Jan 2025 15:46:25 +0100 Subject: [PATCH 07/10] basic swaping --- code/modules/shuttle/shuttles/dropship.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/shuttle/shuttles/dropship.dm b/code/modules/shuttle/shuttles/dropship.dm index 646174dad4d5..1b0e30a0ee44 100644 --- a/code/modules/shuttle/shuttles/dropship.dm +++ b/code/modules/shuttle/shuttles/dropship.dm @@ -159,8 +159,8 @@ name = "Elevator ASRS" id = ELEVATOR_REQ_USCM preferred_direction = SOUTH // If you are changing this, please update the dir of the path below as well - automated_hangar_id = ELEVATOR_REQ_USCM - automated_lz_id = ELEVATOR_REQ_USCM_ADMIN + var/elevator_id = ELEVATOR_REQ_USCM + var/pit_id = ELEVATOR_REQ_USCM_ADMIN /obj/docking_port/mobile/marine_dropship/req_uscm/Initialize(mapload) . = ..() @@ -172,9 +172,9 @@ /obj/docking_port/mobile/marine_dropship/req_uscm/proc/swap_station() var/obj/docking_port/stationary/dockedAt = get_docked() if(dockedAt.id == automated_hangar_id) - SSshuttle.moveShuttle(id, automated_lz_id, TRUE) + SSshuttle.moveShuttle(id, pit_id, TRUE) else - SSshuttle.moveShuttle(id, automated_hangar_id, TRUE) + SSshuttle.moveShuttle(id, elevator_id, TRUE) /obj/docking_port/mobile/marine_dropship/check() From ac2d09b1fe044fc49396fe2be02c194b5c6adc7c Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 10 Jan 2025 16:29:44 +0100 Subject: [PATCH 08/10] getting close --- code/game/supplyshuttle.dm | 25 ++++++++--------------- code/modules/shuttle/shuttles/dropship.dm | 3 ++- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 7675ef6f5eb6..35136b020967 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -110,6 +110,8 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) density = TRUE circuit = /obj/item/circuitboard/computer/ordercomp var/datum/controller/supply/linked_supply_controller + var/railing_id = "supply_elevator_railing" + var/gear_id = "supply_elevator_gear" var/faction = FACTION_MARINE var/asrs_name = "Automated Storage and Retrieval System" @@ -167,24 +169,12 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) .["current_order"] += list(list_pack) - var/datum/shuttle/ferry/supply/shuttle = linked_supply_controller.shuttle - .["shuttle_status"] = "lowered" - if (shuttle.has_arrive_time()) - .["shuttle_status"] = "moving" - return - - if (shuttle.at_station() ) + var/obj/docking_port/mobile/marine_dropship/req_uscm/shuttle = linked_supply_controller.new_shuttle + .["shuttle_status"] = "moving" + if (shuttle.get_docked().id == shuttle.elevator_id) .["shuttle_status"] = "raised" - - switch(shuttle.docking_controller?.get_docking_status()) - if ("docked") - .["shuttle_status"] = "raised" - if ("undocked") - .["shuttle_status"] = "lowered" - if ("docking") - .["shuttle_status"] = "raising" - if ("undocking") - .["shuttle_status"] = "lowering" + if (shuttle.get_docked().id == shuttle.pit_id) + .["shuttle_status"] = "lowered" /obj/structure/machinery/computer/supply/ui_static_data(mob/user) . = ..() @@ -387,6 +377,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) . = ..() LAZYREMOVE(linked_supply_controller.bound_supply_computer_list, src) + /obj/structure/machinery/computer/supply/asrs/attackby(obj/item/hit_item, mob/user) if(istype(hit_item, /obj/item/spacecash)) if(can_order_contraband) diff --git a/code/modules/shuttle/shuttles/dropship.dm b/code/modules/shuttle/shuttles/dropship.dm index 1b0e30a0ee44..19075746742d 100644 --- a/code/modules/shuttle/shuttles/dropship.dm +++ b/code/modules/shuttle/shuttles/dropship.dm @@ -171,7 +171,7 @@ /obj/docking_port/mobile/marine_dropship/req_uscm/proc/swap_station() var/obj/docking_port/stationary/dockedAt = get_docked() - if(dockedAt.id == automated_hangar_id) + if(dockedAt.id == elevator_id) SSshuttle.moveShuttle(id, pit_id, TRUE) else SSshuttle.moveShuttle(id, elevator_id, TRUE) @@ -343,6 +343,7 @@ name = "Requisition Bay ASRS" id = ELEVATOR_REQ_USCM auto_open = TRUE + // roundstart_template = /datum/map_template/shuttle/elevator_req_uscm /obj/docking_port/stationary/marine_dropship/req_uscm_admin From 7c959edec1d2641e873a0eb3582489ec8e9e74c5 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 10 Jan 2025 19:26:26 +0100 Subject: [PATCH 09/10] getting closer --- code/game/supplyshuttle.dm | 8 ++-- code/modules/shuttle/shuttles/dropship.dm | 54 +++++++++++++++++++++++ code/modules/shuttle/vehicle_elevator.dm | 2 +- code/modules/shuttles/shuttle_supply.dm | 43 +----------------- 4 files changed, 60 insertions(+), 47 deletions(-) diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 35136b020967..59d491f123fe 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -1105,10 +1105,10 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) .["used_points"] = used_points .["used_dollars"] = used_dollars - var/datum/shuttle/ferry/supply/shuttle = linked_supply_controller.shuttle - .["can_launch"] = shuttle.can_launch() - .["can_force"] = shuttle.can_force() - .["can_cancel"] = shuttle.can_cancel() + var/obj/docking_port/mobile/marine_dropship/req_uscm/shuttle = linked_supply_controller.new_shuttle + .["can_launch"] = shuttle.canMove() + .["can_force"] = FALSE//shuttle.can_force() need to figure this out with the new shuttle what it even does + .["can_cancel"] = FALSE//shuttle.can_cancel() .["black_market"] = can_order_contraband .["mendoza_status"] = linked_supply_controller.mendoza_status diff --git a/code/modules/shuttle/shuttles/dropship.dm b/code/modules/shuttle/shuttles/dropship.dm index 19075746742d..93a90172fd30 100644 --- a/code/modules/shuttle/shuttles/dropship.dm +++ b/code/modules/shuttle/shuttles/dropship.dm @@ -343,6 +343,60 @@ name = "Requisition Bay ASRS" id = ELEVATOR_REQ_USCM auto_open = TRUE + var/railing_id = "supply_elevator_railing" + var/gear_id = "supply_elevator_gear" + +/obj/docking_port/stationary/marine_dropship/req_uscm/on_dock_ignition(obj/docking_port/mobile/departing_shuttle) + .=..() + raise_railings() + start_gears() + +/obj/docking_port/stationary/marine_dropship/req_uscm/on_departure(obj/docking_port/mobile/departing_shuttle) + .=..() + stop_gears() + +/obj/docking_port/stationary/marine_dropship/req_uscm/on_prearrival(obj/docking_port/mobile/arriving_shuttle) + . = ..() + start_gears() + +/obj/docking_port/stationary/marine_dropship/req_uscm/on_arrival(obj/docking_port/mobile/arriving_shuttle) + . = ..() + stop_gears() + lower_railings() + + +/obj/docking_port/stationary/marine_dropship/req_uscm/proc/raise_railings() + var/effective = 0 + for(var/obj/structure/machinery/door/poddoor/railing in GLOB.machines) + if(railing.id == railing_id && !railing.density) + effective = TRUE + spawn() + railing.close() + if(effective) + playsound(src, 'sound/machines/elevator_openclose.ogg', 50, 0) + +/obj/docking_port/stationary/marine_dropship/req_uscm/proc/lower_railings() + var/effective = 0 + for(var/obj/structure/machinery/door/poddoor/railing in GLOB.machines) + if(railing.id == railing_id && railing.density) + effective = TRUE + INVOKE_ASYNC(railing, TYPE_PROC_REF(/obj/structure/machinery/door, open)) + if(effective) + playsound(src, 'sound/machines/elevator_openclose.ogg', 50, 0) + +/obj/docking_port/stationary/marine_dropship/req_uscm/proc/start_gears(direction = 1) + for(var/obj/structure/machinery/gear/gear in GLOB.machines) + if(gear.id == gear_id) + spawn() + gear.icon_state = "gear_moving" + gear.setDir(direction) + +/obj/docking_port/stationary/marine_dropship/req_uscm/proc/stop_gears() + for(var/obj/structure/machinery/gear/gear in GLOB.machines) + if(gear.id == gear_id) + spawn() + gear.icon_state = "gear" + // roundstart_template = /datum/map_template/shuttle/elevator_req_uscm diff --git a/code/modules/shuttle/vehicle_elevator.dm b/code/modules/shuttle/vehicle_elevator.dm index 8f6a9025ba4f..4b78ec1dc144 100644 --- a/code/modules/shuttle/vehicle_elevator.dm +++ b/code/modules/shuttle/vehicle_elevator.dm @@ -37,7 +37,7 @@ // Play the 'raising' sound effect at the destination docking port manually. // `landing_sound` can't be used since that only plays on the elevator itself, // and this sound file is too long for that either way. - playsound(destination, 'sound/machines/asrs_raising.ogg', 60) + playsound(destination, 'sound/machines/asrs_raising.ogg', 60) //might just change it on the shuttle FIX ME return // If the elevator *is* in the vehicle bay, close the railings and start the gears when it leaves. diff --git a/code/modules/shuttles/shuttle_supply.dm b/code/modules/shuttles/shuttle_supply.dm index 19fb0b01223d..b786aaffe2c5 100644 --- a/code/modules/shuttles/shuttle_supply.dm +++ b/code/modules/shuttles/shuttle_supply.dm @@ -100,13 +100,11 @@ return //someone cancelled the launch if (at_station()) - raise_railings() sleep(12) if(forbidden_atoms_check()) //cancel the launch because of forbidden atoms. announce over supply channel? moving_status = SHUTTLE_IDLE playsound(locate(Elevator_x,Elevator_y,Elevator_z), 'sound/machines/buzz-two.ogg', 50, 0) - lower_railings() return else //at centcom linked_supply_controller.buy() @@ -138,7 +136,6 @@ NW.icon_state = "supply_elevator_lowering" NE.icon_state = "supply_elevator_lowering" animate(elevator_animation, pixel_x = 160, pixel_y = -80, time = 2 SECONDS) - start_gears(SOUTH) sleep(21) SW.icon_state = "supply_elevator_lowered" SE.icon_state = "supply_elevator_lowered" @@ -147,7 +144,6 @@ sleep(70) else playsound(locate(Elevator_x,Elevator_y,Elevator_z), 'sound/machines/asrs_raising.ogg', 50, 0) - start_gears(NORTH) sleep(70) SW.icon_state = "supply_elevator_raising" SE.icon_state = "supply_elevator_raising" @@ -162,7 +158,6 @@ move(away_area, destination) moving_status = SHUTTLE_IDLE - stop_gears() for(var/turf/vis_turf in elevator_animation.vis_contents) for(var/atom/movable/vis_content in vis_turf.contents) @@ -173,11 +168,7 @@ if (!at_station()) //at centcom handle_sell() - else - lower_railings() - - spawn(0) - recharging = 0 + recharging = 0 /datum/shuttle/ferry/supply/proc/handle_sell() linked_supply_controller.sell() // fix this make it expandable @@ -195,35 +186,3 @@ //returns 1 if the shuttle is idle and we can still mess with the cargo shopping list /datum/shuttle/ferry/supply/proc/idle() return (moving_status == SHUTTLE_IDLE) - -/datum/shuttle/ferry/supply/proc/raise_railings() - var/effective = 0 - for(var/obj/structure/machinery/door/poddoor/M in GLOB.machines) - if(M.id == railing_id && !M.density) - effective = 1 - spawn() - M.close() - if(effective) - playsound(locate(Elevator_x,Elevator_y,Elevator_z), 'sound/machines/elevator_openclose.ogg', 50, 0) - -/datum/shuttle/ferry/supply/proc/lower_railings() - var/effective = 0 - for(var/obj/structure/machinery/door/poddoor/M in GLOB.machines) - if(M.id == railing_id && M.density) - effective = 1 - INVOKE_ASYNC(M, TYPE_PROC_REF(/obj/structure/machinery/door, open)) - if(effective) - playsound(locate(Elevator_x,Elevator_y,Elevator_z), 'sound/machines/elevator_openclose.ogg', 50, 0) - -/datum/shuttle/ferry/supply/proc/start_gears(direction = 1) - for(var/obj/structure/machinery/gear/M in GLOB.machines) - if(M.id == gear_id) - spawn() - M.icon_state = "gear_moving" - M.setDir(direction) - -/datum/shuttle/ferry/supply/proc/stop_gears() - for(var/obj/structure/machinery/gear/M in GLOB.machines) - if(M.id == gear_id) - spawn() - M.icon_state = "gear" From 1fbb51e98810739ba5c160c867579d8d37dc3d52 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 10 Jan 2025 20:52:57 +0100 Subject: [PATCH 10/10] getting close --- code/game/supplyshuttle.dm | 12 +----------- code/modules/shuttle/shuttles/dropship.dm | 21 ++++++++++++++++++++- code/modules/shuttles/shuttle_supply.dm | 2 -- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 59d491f123fe..5dd86ea12a35 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -878,7 +878,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) // Called when the elevator is lowered. /datum/controller/supply/proc/sell() - var/area/area_shuttle = shuttle.get_location_area() + var/area/area_shuttle = new_shuttle.shuttle_areas[1] if(!area_shuttle) return @@ -1190,16 +1190,6 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) return TRUE if("send") - var/datum/shuttle/ferry/supply/shuttle = linked_supply_controller.shuttle - - if(shuttle.at_station()) - if (shuttle.forbidden_atoms_check()) - system_message = "For safety reasons, the Automated Storage and Retrieval System cannot store live organisms, classified nuclear weaponry or homing beacons." - return TRUE - shuttle.launch(src) - return TRUE - - shuttle.launch(src) linked_supply_controller.new_shuttle.swap_station() return TRUE diff --git a/code/modules/shuttle/shuttles/dropship.dm b/code/modules/shuttle/shuttles/dropship.dm index 93a90172fd30..1c818062fa5d 100644 --- a/code/modules/shuttle/shuttles/dropship.dm +++ b/code/modules/shuttle/shuttles/dropship.dm @@ -161,10 +161,13 @@ preferred_direction = SOUTH // If you are changing this, please update the dir of the path below as well var/elevator_id = ELEVATOR_REQ_USCM var/pit_id = ELEVATOR_REQ_USCM_ADMIN + faction = FACTION_MARINE /obj/docking_port/mobile/marine_dropship/req_uscm/Initialize(mapload) . = ..() - GLOB.supply_controller.new_shuttle = src + switch(faction) + if(FACTION_MARINE) + GLOB.supply_controller.new_shuttle = src /obj/docking_port/mobile/marine_dropship/req_uscm/get_transit_path_type() return /turf/open/space/transit/dropship/req @@ -405,6 +408,22 @@ id = ELEVATOR_REQ_USCM_ADMIN auto_open = TRUE roundstart_template = /datum/map_template/shuttle/elevator_req_uscm + faction = FACTION_MARINE + var/datum/controller/supply/linked_supply_controller + +/obj/docking_port/stationary/marine_dropship/req_uscm_admin/Initialize(mapload) + . = ..() + switch(faction) + if(FACTION_MARINE) + linked_supply_controller = GLOB.supply_controller + +/obj/docking_port/stationary/marine_dropship/req_uscm_admin/on_arrival(obj/docking_port/mobile/arriving_shuttle) + . = ..() + linked_supply_controller.sell() + +/obj/docking_port/stationary/marine_dropship/req_uscm_admin/on_dock_ignition(obj/docking_port/mobile/departing_shuttle) + . = ..() + linked_supply_controller.buy() /obj/docking_port/stationary/marine_dropship/crash_site auto_open = TRUE diff --git a/code/modules/shuttles/shuttle_supply.dm b/code/modules/shuttles/shuttle_supply.dm index b786aaffe2c5..4300961d88e2 100644 --- a/code/modules/shuttles/shuttle_supply.dm +++ b/code/modules/shuttles/shuttle_supply.dm @@ -166,8 +166,6 @@ elevator_animation.vis_contents.Cut() - if (!at_station()) //at centcom - handle_sell() recharging = 0 /datum/shuttle/ferry/supply/proc/handle_sell()