From a4777d30526fcd837c49e19f4eecb1daf940f77a Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 3 Sep 2022 01:47:50 +0200 Subject: [PATCH] [MIRROR] Fix gas canister supply packs causing stray cargo pod runtime [MDB IGNORE] (#15949) * Fix gas canister supply packs causing stray cargo pod runtime (#69296) * Fix gas canister supply packs causing stray cargo pod runtime Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com> --- code/modules/events/stray_cargo.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/events/stray_cargo.dm b/code/modules/events/stray_cargo.dm index 74ef48d56d6..705c54e9d81 100644 --- a/code/modules/events/stray_cargo.dm +++ b/code/modules/events/stray_cargo.dm @@ -52,7 +52,11 @@ pack_type = pick(possible_pack_types) else pack_type = pick(stray_spawnable_supply_packs) - var/datum/supply_pack/SP = new pack_type + var/datum/supply_pack/SP + if(ispath(pack_type, /datum/supply_pack)) + SP = new pack_type + else // treat this as a supply pack id and resolving it with SSshuttle + SP = SSshuttle.supply_packs[pack_type] var/obj/structure/closet/crate/crate = SP.generate(null) if(crate) //empty supply packs are a thing! get memed on. crate.locked = FALSE //Unlock secure crates