From 0d5b29a52730de03d9a3bb6a13952a59bc0e99d1 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Sun, 19 May 2024 20:25:03 +0300 Subject: [PATCH] [MODULAR] Modularizes flashbang to bola code and configifies it (#3379) aaaa Co-authored-by: nikothedude <59709059+nikothedude@users.noreply.github.com> --- config/nova/config_nova.txt | 3 +++ modular_nova/modules/sec_haul/code/belts.dm | 12 ++++++++++++ .../modules/sec_haul/code/sec_haul_config.dm | 2 ++ tgstation.dme | 2 ++ 4 files changed, 19 insertions(+) create mode 100644 modular_nova/modules/sec_haul/code/belts.dm create mode 100644 modular_nova/modules/sec_haul/code/sec_haul_config.dm diff --git a/config/nova/config_nova.txt b/config/nova/config_nova.txt index 31f620888d9..5ea118a22c7 100644 --- a/config/nova/config_nova.txt +++ b/config/nova/config_nova.txt @@ -149,3 +149,6 @@ ARRIVALS_WAIT 150 ## Uncomment to completely disable the opt-in system, which is a system that forces objectives to only roll on individuals who consent to it. #DISABLE_ANTAG_OPT_IN_PREFERENCES + +## Uncomment to enable the replacing of flashbangs in secbelts with energy bolas +REPLACE_SECBELT_FLASHBANGS_WITH_BOLA diff --git a/modular_nova/modules/sec_haul/code/belts.dm b/modular_nova/modules/sec_haul/code/belts.dm new file mode 100644 index 00000000000..69f702fb5f2 --- /dev/null +++ b/modular_nova/modules/sec_haul/code/belts.dm @@ -0,0 +1,12 @@ +/obj/item/storage/belt/security/full/PopulateContents() + . = ..() + + if (!CONFIG_GET(flag/replace_secbelt_flashbangs_with_bola)) + return + + var/obj/item/grenade/flashbang/bang = locate(/obj/item/grenade/flashbang) in src + if (!bang) + return + + qdel(bang) + new /obj/item/restraints/legcuffs/bola/energy(src) diff --git a/modular_nova/modules/sec_haul/code/sec_haul_config.dm b/modular_nova/modules/sec_haul/code/sec_haul_config.dm new file mode 100644 index 00000000000..3096b840de4 --- /dev/null +++ b/modular_nova/modules/sec_haul/code/sec_haul_config.dm @@ -0,0 +1,2 @@ +/datum/config_entry/flag/replace_secbelt_flashbangs_with_bola + default = TRUE diff --git a/tgstation.dme b/tgstation.dme index 2039f434b87..6d9905d0c96 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -8165,6 +8165,8 @@ #include "modular_nova\modules\science_tools\research.dm" #include "modular_nova\modules\science_tools\tool_designs.dm" #include "modular_nova\modules\science_tools\tools.dm" +#include "modular_nova\modules\sec_haul\code\belts.dm" +#include "modular_nova\modules\sec_haul\code\sec_haul_config.dm" #include "modular_nova\modules\sec_haul\code\corrections_officer\corrections_officer.dm" #include "modular_nova\modules\sec_haul\code\corrections_officer\corrections_officer_equipment.dm" #include "modular_nova\modules\sec_haul\code\corrections_officer\landmarks.dm"