mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Adds a cargo shuttle upgrade for plastic flaps and air refills. (#95393)
## About The Pull Request
We've all been there before. You send the cargo shuttle, you return it
only to find the blast doors were wide open, and air is now venting out
into space, and with the airlock cycling you are now trapped in a
freezing death trap of your own unwitting design.
This is funny and I want us to keep doing this.
But in an effort to continue to offer interesting things for cargo to
buy in a given shift, this PR offers the ability for cargo to buy an
upgrade to the cargo shuttle itself, that being 2 ~~tiny fans~~ Plastic
Flaps that are installed into the shuttle, as denoted by landmarks
mapped into the cargo shuttle.
Upon being picked up, also includes a certificate of installation. to go
onto the shuttle. Honestly, this is mostly so that I can be lazy and not
just spawn an empty crate but Ideally I open this up for future
categories of "cargo upgrades" that just spawn onto the station.
The other feature here is in shuttles having their air refilled on the
way to/from the station, as part of their subscription to air ™️
It's currently offered for the fairly steep price of 8,000 credits.
## Why It's Good For The Game
This is admittedly a luxury purchase, but, for players who are doing
well enough on credits, either through stocks, bounties, shuttle loans,
cargo events, whatever, this is something that players may want to
purchase for peace of mind, while being entirely optional in-game. The
cargo shuttle can be finicky in many ways and can tend towards easy
mistakes causing lots of pressure-related injuries in a round.
Again, this is intentionally offered at a high price point to avoid this
being an automatic purchase early into the round, but also something
that feels like an earned luxury if you have it, allowing you to focus
on your loop of buying and selling items, hustling if you will, without
caring if Larry over there is going to vent the shuttle for the
umpteenth time.
Like other tiny fans, these are not deconstruct-able and intentionally
should be locked to the cargo shuttle in practice.
This commit is contained in:
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 22 KiB |
Reference in New Issue
Block a user