diff --git a/_maps/shuttles/cargo_birdboat.dmm b/_maps/shuttles/cargo_birdboat.dmm index 1ebb9428959..5df90054714 100644 --- a/_maps/shuttles/cargo_birdboat.dmm +++ b/_maps/shuttles/cargo_birdboat.dmm @@ -67,6 +67,7 @@ id = "cargoshuttle"; name = "cargo shuttle conveyor belt" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "n" = ( @@ -114,6 +115,7 @@ id = "cargoshuttle"; name = "cargo shuttle conveyor belt" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "w" = ( diff --git a/_maps/shuttles/cargo_birdshot.dmm b/_maps/shuttles/cargo_birdshot.dmm index a0cc7901c18..d3aefb9a9f9 100644 --- a/_maps/shuttles/cargo_birdshot.dmm +++ b/_maps/shuttles/cargo_birdshot.dmm @@ -16,6 +16,7 @@ id = "QMLoaddoor"; name = "Supply Dock Loading Door" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/mineral/titanium, /area/shuttle/supply) "d" = ( @@ -28,6 +29,7 @@ id = "QMLoaddoor2"; name = "Supply Dock Loading Door" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/mineral/titanium, /area/shuttle/supply) "e" = ( diff --git a/_maps/shuttles/cargo_box.dmm b/_maps/shuttles/cargo_box.dmm index 875efcf7b38..a11d66035f2 100644 --- a/_maps/shuttles/cargo_box.dmm +++ b/_maps/shuttles/cargo_box.dmm @@ -14,6 +14,7 @@ id = "QMLoaddoor2"; name = "Supply Dock Loading Door" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "g" = ( @@ -40,6 +41,7 @@ id = "QMLoaddoor"; name = "Supply Dock Loading Door" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "l" = ( diff --git a/_maps/shuttles/cargo_catwalk.dmm b/_maps/shuttles/cargo_catwalk.dmm index 640cccd79f3..7136321584f 100644 --- a/_maps/shuttles/cargo_catwalk.dmm +++ b/_maps/shuttles/cargo_catwalk.dmm @@ -25,6 +25,7 @@ dir = 8; id = "cargounload" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/iron/smooth, /area/shuttle/supply) "i" = ( @@ -107,6 +108,7 @@ dir = 4; id = "cargoload" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/iron/smooth, /area/shuttle/supply) "H" = ( diff --git a/_maps/shuttles/cargo_delta.dmm b/_maps/shuttles/cargo_delta.dmm index 71477acd357..1a95a02ea6e 100644 --- a/_maps/shuttles/cargo_delta.dmm +++ b/_maps/shuttles/cargo_delta.dmm @@ -60,6 +60,7 @@ id = "cargounload"; name = "Supply Dock Unloading Door" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "l" = ( @@ -115,6 +116,7 @@ dir = 4; id = "cargoload" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "u" = ( diff --git a/_maps/shuttles/cargo_kilo.dmm b/_maps/shuttles/cargo_kilo.dmm index e0dc7be8bef..d00abd81baf 100644 --- a/_maps/shuttles/cargo_kilo.dmm +++ b/_maps/shuttles/cargo_kilo.dmm @@ -58,6 +58,7 @@ id = "QMLoad"; name = "off ramp" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "j" = ( @@ -166,6 +167,7 @@ id = "QMLoad2"; name = "on ramp" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "u" = ( diff --git a/_maps/shuttles/cargo_mini.dmm b/_maps/shuttles/cargo_mini.dmm index 64789355b26..c845b07e66a 100644 --- a/_maps/shuttles/cargo_mini.dmm +++ b/_maps/shuttles/cargo_mini.dmm @@ -18,6 +18,7 @@ }, /obj/docking_port/mobile/supply, /obj/effect/mapping_helpers/airlock/access/all/supply/general, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "v" = ( @@ -36,6 +37,7 @@ name = "Supply Shuttle Airlock" }, /obj/effect/mapping_helpers/airlock/access/all/supply/general, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "X" = ( diff --git a/_maps/shuttles/cargo_nebula.dmm b/_maps/shuttles/cargo_nebula.dmm index 5320c961694..b2f011a2599 100644 --- a/_maps/shuttles/cargo_nebula.dmm +++ b/_maps/shuttles/cargo_nebula.dmm @@ -84,6 +84,7 @@ dir = 8; id = "QMLoad" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "s" = ( @@ -196,6 +197,7 @@ dir = 4; id = "QMLoad2" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/plating, /area/shuttle/supply) "V" = ( diff --git a/_maps/shuttles/cargo_northstar.dmm b/_maps/shuttles/cargo_northstar.dmm index 8eb2df12009..59232e5a1e5 100644 --- a/_maps/shuttles/cargo_northstar.dmm +++ b/_maps/shuttles/cargo_northstar.dmm @@ -49,6 +49,7 @@ dir = 4; id = "QMLoad" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/catwalk_floor/iron_smooth, /area/shuttle/supply) "h" = ( @@ -158,6 +159,7 @@ id = "QMLoaddoor"; name = "Supply Dock Loading Door" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/catwalk_floor/iron_smooth, /area/shuttle/supply) "M" = ( diff --git a/_maps/shuttles/cargo_pubby.dmm b/_maps/shuttles/cargo_pubby.dmm index 45d764e9e1f..19af28cc014 100644 --- a/_maps/shuttles/cargo_pubby.dmm +++ b/_maps/shuttles/cargo_pubby.dmm @@ -38,6 +38,7 @@ dir = 4; id = "ShuttleLoad" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/mineral/titanium/blue, /area/shuttle/supply) "m" = ( @@ -131,6 +132,7 @@ dir = 8; id = "ShuttleUnload" }, +/obj/effect/landmark/flaps_install, /turf/open/floor/mineral/titanium/blue, /area/shuttle/supply) "K" = ( diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 0553cc6d565..d8685b299e0 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -5,6 +5,9 @@ /// If we're under load we want to allow for cycling, but if not we want to preserve already generated docks for use #define SOFT_TRANSIT_RESERVATION_THRESHOLD (100 ** 2) +/// Points to turfs on the cargo shuttle that have flaps automatically installed if an upgrade is purchased +GLOBAL_LIST_EMPTY(cargo_shuttle_flaps_landmarks) + SUBSYSTEM_DEF(shuttle) name = "Shuttle" @@ -149,6 +152,9 @@ SUBSYSTEM_DEF(shuttle) /// List of express consoles that are waiting for pack initialization var/list/obj/machinery/computer/cargo/express/express_consoles = list() + /// If TRUE, automatically refills the cargo shuttle's air when it docks + var/renew_cargo_air = FALSE + /datum/controller/subsystem/shuttle/Initialize() order_number = rand(1, 9000) diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 272c4e14dce..77ae51ea07c 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -576,6 +576,18 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player) return created_joining_mob return created_joining_mob +/obj/effect/landmark/flaps_install + name = "plastic flaps install point" + icon_state = "flap-install" + +/obj/effect/landmark/flaps_install/Initialize(mapload) + . = ..() + GLOB.cargo_shuttle_flaps_landmarks += src + +/obj/effect/landmark/flaps_install/Destroy() + GLOB.cargo_shuttle_flaps_landmarks -= src + return ..() + //Landmark that creates destinations for the navigate verb to path to /obj/effect/landmark/navigate_destination name = "navigate verb destination" diff --git a/code/modules/cargo/order.dm b/code/modules/cargo/order.dm index fb3c1a83787..c6a8166ef69 100644 --- a/code/modules/cargo/order.dm +++ b/code/modules/cargo/order.dm @@ -188,7 +188,7 @@ account_holder = paying_account.account_holder else account_holder = "Cargo" - var/obj/structure/closet/crate/crate = pack.generate(A, paying_account) + var/obj/structure/closet/crate/crate = pack.generate(A, paying_account, initial(pack.storage_override)) if(pack.order_flags & ORDER_CONTRABAND) for(var/atom/movable/item_within as anything in crate.get_all_contents()) ADD_TRAIT(item_within, TRAIT_CONTRABAND, INNATE_TRAIT) diff --git a/code/modules/cargo/packs/_packs.dm b/code/modules/cargo/packs/_packs.dm index 21ec7f68a9e..dc63b5f43e6 100644 --- a/code/modules/cargo/packs/_packs.dm +++ b/code/modules/cargo/packs/_packs.dm @@ -21,6 +21,8 @@ var/desc = "" /// What typepath of crate do you spawn? var/crate_type = /obj/structure/closet/crate + /// If we're not going to use a crate, then what would we like to use as a container for the order/manifest? + var/storage_override /// If this pack comes shipped in a specific pod when launched from the express console var/special_pod /// Can coupons target this pack? If so, how rarely? @@ -62,7 +64,7 @@ else if(!crate_type && !crate_override) CRASH("tried to generate a supply pack without a valid crate type") else if(crate_override) - var/obj/unique_container = new crate_override + var/obj/unique_container = new crate_override(A) fill(unique_container) return unique_container diff --git a/code/modules/cargo/packs/imports.dm b/code/modules/cargo/packs/imports.dm index abd262fb693..d7851e8b1bc 100644 --- a/code/modules/cargo/packs/imports.dm +++ b/code/modules/cargo/packs/imports.dm @@ -364,3 +364,33 @@ /obj/item/stack/ore/bluespace_crystal/artificial = 2, /obj/item/stock_parts/subspace/ansible, ) + +/datum/supply_pack/imports/fan_upgrade + name = "Cargo Shuttle Upgrade: Air Renewal" + desc = "Do you or your coworkers have a bad habit of leaving your cargo shuttle shutter doors open to the cold, cold, vaccuum of space? \ + With this handy engineering retrofit, your shuttle will now be equip with a few handy plastic flaps and a subscription for air refills." + cost = CARGO_CRATE_VALUE * 40 // HELLA expensive. + order_flags = ORDER_NOT_DEPARTMENTAL + access_view = ACCESS_CARGO + storage_override = /obj/item/folder + contains = list( + /obj/item/paper/fluff/certificate, + ) + +/datum/supply_pack/imports/fan_upgrade/generate(atom/A, datum/bank_account/paying_account, crate_override) + if(SSshuttle.renew_cargo_air) + return ..() + + for(var/obj/spawnpoint as anything in GLOB.cargo_shuttle_flaps_landmarks) + new /obj/structure/plasticflaps(spawnpoint.loc) + SSshuttle.renew_cargo_air = TRUE + order_flags = ORDER_INVISIBLE + return ..() + +/obj/item/paper/fluff/certificate + name = "Certificate of Shuttle Upgrade" + color = COLOR_LIGHT_ORANGE + desc = "A note from the Nanotrasen Mechanics Society detailing your new shuttle upgrade." + default_raw_text = "Hey boss. We got those flaps installed for ya, nothing to it really. You'll find 'em over the blast doors or the exits, \ + whichever the mechanics were able to get to. They're all set to go without any tweaking, so don't futz with them. Otherwise, you let us know \ + if anything seems out of place." diff --git a/code/modules/shuttle/mobile_port/variants/supply.dm b/code/modules/shuttle/mobile_port/variants/supply.dm index 505507bd9bb..425c6402fb2 100644 --- a/code/modules/shuttle/mobile_port/variants/supply.dm +++ b/code/modules/shuttle/mobile_port/variants/supply.dm @@ -40,6 +40,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( #define GOODY_FREE_SHIPPING_MAX 5 /// How much to charge oversized goody orders #define CRATE_TAX 700 +#define REFILL_RANGE_DEFAULT 10 /obj/docking_port/mobile/supply name = "supply shuttle" @@ -123,11 +124,16 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( if(getDockedId() == "cargo_away") // Buy when we leave home. buy() create_mail() + if(SSshuttle.renew_cargo_air) + refill_air() . = ..() // Fly/enter transit. if(. != DOCKING_SUCCESS) return if(getDockedId() == "cargo_away") // Sell when we get home sell() + if(SSshuttle.renew_cargo_air) + refill_air() + /obj/docking_port/mobile/supply/proc/buy() SEND_SIGNAL(SSshuttle, COMSIG_SUPPLY_SHUTTLE_BUY) @@ -342,5 +348,22 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( return similar_count + +/** + * This proc collects all turfs on a shuttle, then replaces the air with the initial gas mix across the shuttle. + * Used by the shuttle air upgrade. + */ +/obj/docking_port/mobile/supply/proc/refill_air() + for(var/area/shuttle/shuttle_area as anything in shuttle_areas) + for(var/turf/open/floor/shuttle_floor in shuttle_area.get_turfs_from_all_zlevels()) + if(shuttle_floor.blocks_air) + //skip walls + continue + var/datum/gas_mixture/GM = SSair.parse_gas_string(shuttle_floor.initial_gas_mix, /datum/gas_mixture/turf) + shuttle_floor.copy_air(GM) + shuttle_floor.temperature = initial(shuttle_floor.temperature) + shuttle_floor.update_visuals() + #undef GOODY_FREE_SHIPPING_MAX #undef CRATE_TAX +#undef REFILL_RANGE_DEFAULT diff --git a/icons/effects/landmarks_static.dmi b/icons/effects/landmarks_static.dmi index 134c62cdd21..53d3d939128 100644 Binary files a/icons/effects/landmarks_static.dmi and b/icons/effects/landmarks_static.dmi differ