summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD8
-rw-r--r--src-16_npcs-not-wielding-from-worn-holsters.patch11
2 files changed, 18 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 615dc73..44e0010 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@ _pkgname=Cataclysm-BN
pkgver=0.6.0
#pkgver=202310040030
#_pkgver=2023-10-04-0030
-pkgrel=6
+pkgrel=7
pkgdesc="A post-apocalyptic roguelike."
#url="http://cataclysmrl.blogspot.com/"
#url="http://www.cataclysm.glyphgryph.com/"
@@ -162,6 +162,7 @@ source=("$pkgname-$pkgver.tar.gz::https://github.com/cataclysmbnteam/Cataclysm-B
"src-13_searchlights-with-plut-gen-furn.patch"
"src-14_fix-npc_melee-calculations.patch"
"src-15_slow-down-fungal-blossoms.patch"
+ "src-16_npcs-not-wielding-from-worn-holsters.patch"
"src-20_fix-default-mods.patch"
"vampirism.patch"
@@ -274,6 +275,7 @@ b2sums=('1a311f72d159194d8737b75a484d015caf75a1920b1e9eaa0bdbcd9c0bb8aceda1f59a5
'c0ccf5af2fbf0c9bb59bd226ce17084658cbe6bc859bd8a76c292845dbf57679ac08de339d4cb90736bfa48fcc9f2f734c3fadaa5b91b0fc6e58d157c848a328'
'f10ba62a41e6c0f627b501b907c879ae66e480e90e2ca324d09ba084a6fc0f25e33b384847558f00feb992efcba44eb355ed202351597c5a10a3480bd659f88d'
'c22a81615cd95c01c8722f4be7866f58f488890e518cd74e80f14d65fa3e9889b20666c729cfb317bb55e498d70e13c86b7ba3a61299f667820d4277b2c69c4e'
+ 'b71e033258390937f0c82820ef960c0d3006fdc46182c9d0576c1d9314ff2f672168e259a33eee61b5d0be33eb8ebaf95f59ed76b971a80bc5cb68143b6b7368'
'5c605faf9fd815e39427722bf6f953cebbe77945e82b7415b7fecfba51978788298fac179ab0b26d28fc948679356f34dc2c475361c82d0149f9a9be04192ff1'
'978657c7b665b57acc5bffcafff55d289775c47bb7c45b924e89c09571bafbe85c5a122c40d9a76add3719c09ad237525493ae08d5501c174fc96720339e59d3')
@@ -770,6 +772,10 @@ prepare() {
# With x_in_y changed to 2000, fungal blossoms increase their numbers by roughly half every 60 seconds.
patch -Np1 --no-backup-if-mismatch -i "$srcdir"/src-15_slow-down-fungal-blossoms.patch
+ # Fix npcs failing to draw weapons from worn holsters/sheaths:
+ # The visit_items() function excluded worn items that are not weapons from the dps check. This meant worn holsters were being ignored.
+ patch -Np1 --no-backup-if-mismatch -i "$srcdir"/src-16_npcs-not-wielding-from-worn-holsters.patch
+
# # # Additional changes
echo "Applying vampirism patch"
diff --git a/src-16_npcs-not-wielding-from-worn-holsters.patch b/src-16_npcs-not-wielding-from-worn-holsters.patch
new file mode 100644
index 0000000..5173f86
--- /dev/null
+++ b/src-16_npcs-not-wielding-from-worn-holsters.patch
@@ -0,0 +1,11 @@
+--- a/src/npcmove.cpp
++++ b/src/npcmove.cpp
+@@ -3513,7 +3513,7 @@
+ // if they don't have a weapon with appropriate range/ammo.
+ visit_items( [&compare_weapon, this ]( item * node ) {
+ // For worn items, only compare if they have a weapon category defined.
+- if( is_worn( *node ) && node->type->weapon_category.empty() ) {
++ if( is_worn( *node ) && !( node->get_use( "holster" ) ) && node->type->weapon_category.empty() ) {
+ return VisitResponse::SKIP;
+ }
+ // Otherwise, compare any melee usable item, guns or holstered items