From a08ee567882b10ed2c9be19b98c5b32facba7280 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 9 Sep 2023 16:33:07 +0200 Subject: [PATCH] [MIRROR] Exploration drones can no longer be used to get to centcom [MDB IGNORE] (#23597) * Exploration drones can no longer be used to get to centcom (#78197) ## About The Pull Request Fixes #73417 Implements a check for exploration drones to make sure that containers inside the storage don't have blacklisted items in them before launch. Now you won't able to hide beacons and living beings inside bluespace body bags. Also adds exploration drone launchers to cargo shuttle's blacklist to prevent potential shenanigans in the future. [I suck at explaining, so here's a poorly made video that shows how to do this](https://www.youtube.com/watch?v=U45ifQGQxzI) ~also, why does it take 10 hours to get the "Time Waster" achievement. how did 6 people even get it??~ ## Why It's Good For The Game centcom is scary and exploits are bad ## Changelog :cl: fix: Exploration drones can't be used to reach Centcom anymore. /:cl: * Exploration drones can no longer be used to get to centcom --------- Co-authored-by: leaKsi <59278564+leaKsi@users.noreply.github.com> --- code/modules/explorer_drone/control_console.dm | 3 +++ code/modules/explorer_drone/exodrone.dm | 9 +++++++++ code/modules/shuttle/supply.dm | 1 + 3 files changed, 13 insertions(+) diff --git a/code/modules/explorer_drone/control_console.dm b/code/modules/explorer_drone/control_console.dm index 208292c2437..7b371e8412b 100644 --- a/code/modules/explorer_drone/control_console.dm +++ b/code/modules/explorer_drone/control_console.dm @@ -131,6 +131,9 @@ target_site = locate(params["target_site"]) in GLOB.exploration_sites if(!target_site) return TRUE + if(!controlled_drone.check_blacklist()) + say("Error - An unauthorized object was found inside the cargo!") + return TRUE controlled_drone.launch_for(target_site) return TRUE if("explore") diff --git a/code/modules/explorer_drone/exodrone.dm b/code/modules/explorer_drone/exodrone.dm index 567d5a93412..72cf09bd81b 100644 --- a/code/modules/explorer_drone/exodrone.dm +++ b/code/modules/explorer_drone/exodrone.dm @@ -88,6 +88,15 @@ GLOBAL_LIST_EMPTY(exodrone_launchers) if(EXODRONE_IDLE) return "Idle." +// Searches for blacklisted items hidden inside containers +/obj/item/exodrone/proc/check_blacklist() + for(var/obj/item/contained_item in contents) + if(contained_item.contents) + for(var/subcontained_object in contained_item.get_all_contents()) + if(is_type_in_typecache(subcontained_object, GLOB.blacklisted_cargo_types)) + return FALSE + return TRUE + /// Starts travel for site, does not validate if it's possible /obj/item/exodrone/proc/launch_for(datum/exploration_site/target_site) if(!location) //We're launching from station, fuel up diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index 4be299cd575..aba37b37a55 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -25,6 +25,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( /obj/item/swapper, /obj/docking_port, /obj/machinery/launchpad, + /obj/machinery/exodrone_launcher, /obj/machinery/disposal, /obj/structure/disposalpipe, /obj/item/mail,