From c2e8fa6a4e50464970f912e4c457cd439c3d0daa Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Tue, 11 Oct 2022 21:37:29 -0400 Subject: [PATCH] Adds clearer modularity support to the inhands unit test. (#70440) cl ShizCalev server: Added clarified downstream modularity support for the inhands unit test. /cl Sorry to our downstreams for not being clear about how to add additional locations for the test. You can now just set a var with the path (example provided) and add make sure you also add the path to your deploy.sh. If you need additional locations ontop of that, just add another line with generate_possible_icon_states_list("your/inhands/folder/path"), and make sure that path is also in deploy.sh --- code/modules/unit_tests/inhands.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/modules/unit_tests/inhands.dm b/code/modules/unit_tests/inhands.dm index 6dd002846c1..be0aa57c427 100644 --- a/code/modules/unit_tests/inhands.dm +++ b/code/modules/unit_tests/inhands.dm @@ -3,6 +3,10 @@ var/static/list/possible_icon_states = list() var/fallback_log_message var/unset_inhand_var_message + /// additional_inhands_location is for downstream modularity support. as an example, for skyrat's usage, set additional_inhands_location = "modular_skyrat/master_files/icons/mob/inhands/" + /// Make sure this location is also present in tools/deploy.sh + /// If you need additional paths ontop of this second one, you can add another generate_possible_icon_states_list("your/folder/path/inhands/") below the if(additional_inhands_location) block in Run(), and make sure to add that path to tools/deploy.sh as well. + var/additional_inhands_location = null /datum/unit_test/defined_inhand_icon_states/proc/generate_possible_icon_states_list(directory_path) if(!directory_path) @@ -16,6 +20,11 @@ /datum/unit_test/defined_inhand_icon_states/Run() generate_possible_icon_states_list() + if(additional_inhands_location) + generate_possible_icon_states_list(additional_inhands_location) + + //Add EVEN MORE paths if needed here! + //generate_possible_icon_states_list("your/folder/path/inhands/") for(var/obj/item/item_path as anything in subtypesof(/obj/item)) if(initial(item_path.item_flags) & ABSTRACT)