summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2023-07-29 21:51:11 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2023-07-29 21:51:11 -0700
commitd5ff76b91bcd83bbd7157622b68b317b0ddb39f1 (patch)
tree288dcb3a77f280fad7bb88aab7a02be52bd338e3
parentUpdated to 2023-07-14-0912 (diff)
downloadcataclysm-bn-d5ff76b91bcd83bbd7157622b68b317b0ddb39f1.tar.xz
Add patch fixing the cash detection used by the tacoma crop overseer.
-rw-r--r--PKGBUILD8
-rw-r--r--src-11_fix-tacoma-farmfield.patch32
2 files changed, 39 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 29eb189..c31947e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@ pkgname=cataclysm-bn
_pkgname=Cataclysm-BN-cbn-experimental
pkgver=202307140912
_pkgver=2023-07-14-0912
-pkgrel=1
+pkgrel=2
pkgdesc="A post-apocalyptic roguelike."
#url="http://cataclysmrl.blogspot.com/"
#url="http://www.cataclysm.glyphgryph.com/"
@@ -143,6 +143,7 @@ source=("$pkgname-$_pkgver.tar.gz::https://github.com/cataclysmbnteam/Cataclysm-
"src-08_more-military-base-overmap.patch"
"src-09_npc-eat-from-further-camp.patch"
"src-10_reduced-kcal-during-sleep.patch"
+ "src-11_fix-tacoma-farmfield.patch"
"vampirism.patch"
@@ -244,6 +245,7 @@ b2sums=('bdc7619b76a002fb0c03f0a32045dd31914eaf5d019f1ad2e5fbafe84f16ce358931f29
'e3302d903d053f25aa666d572f74a8bbd3b65dde40eedcbf46e537ceb2294ac22b3772087fce04c4a780c2f18e855179c6ddc8af12d72a89b82957ce09deb52f'
'4bd44cbe85c53902b8a360509703e3d38e8a5da75dd2c534a77f03ce6440632f6c83c92939069c60473c88ffb3abab0fbf11e39271f44f813b9f6432ea5f9a6b'
'f115314dd2bb1da07bba7a90fec5c3acb7ccb5145efaea03d6806942e24d402c9a144a2fd07b82e727a0b79dedd4bdd87de0bbaf0944236563164fb6f117965e'
+ 'e0a9e8f1129650208f7a5a37680091a6d2abaa60f5d4fd7fc691854d49c9f59317ca18dbe764cb05cacd4a2a95de702bbdd072571862ee0b27bd8df3be7a5764'
'7d747ca4aff9a6fea8bf4cc5ea9b6c4be65271ee3d3f9dd2ae5ac1b0cf382e252b2f26948adcfa5357fffacd7f96a3adbd914559efb6313a1374704a15f53fa7'
'547b8a4c377d56743ea034b49d11354741847c2968ddc4eb8af59098365a9671a0c093f20de71a57638a85d0abdddbb08409a45dafde9ca6c9e78846f545d904'
'a56efdaae0344726debf5b74846edce8df7aa2357fbc7a05a3d369d1f457b02934a0d0ce2330072e03f1ac901e06e333c9393f795c761f8440307e7649ed5596'
@@ -678,6 +680,10 @@ prepare() {
# Managing the food supply of more than a few NPCs in BN is extremely difficult compared to DDA.
patch -Np1 --no-backup-if-mismatch -i "$srcdir"/src-10_reduced-kcal-during-sleep.patch
+ # Fix tacoma crop overseer failing to detect player current cash:
+ # The two plot purchasing functions using the seemingly obsolete player_character.cash instead of g->u.cash
+ patch -Np1 --no-backup-if-mismatch -i "$srcdir"/src-11_fix-tacoma-farmfield.patch
+
# # # Additional changes
echo "Applying vampirism patch"
diff --git a/src-11_fix-tacoma-farmfield.patch b/src-11_fix-tacoma-farmfield.patch
new file mode 100644
index 0000000..3a3e0ac
--- /dev/null
+++ b/src-11_fix-tacoma-farmfield.patch
@@ -0,0 +1,32 @@
+--- a/src/mission_companion.cpp
++++ b/src/mission_companion.cpp
+@@ -940,12 +940,12 @@
+ void talk_function::field_build_1( npc &p )
+ {
+ Character &player_character = get_player_character();
+- if( player_character.cash < 100000 ) {
++ if( g->u.cash < 100000 ) {
+ popup( _( "I'm sorry, you don't have enough money." ) );
+ return;
+ }
+ p.set_mutation( trait_NPC_CONSTRUCTION_LEV_1 );
+- player_character.cash += -100000;
++ g->u.cash += -100000;
+ const tripoint_abs_omt site =
+ overmap_buffer.find_closest( player_character.global_omt_location(), "ranch_camp_63", 20,
+ false );
+@@ -966,12 +966,12 @@
+ void talk_function::field_build_2( npc &p )
+ {
+ Character &player_character = get_player_character();
+- if( player_character.cash < 550000 ) {
++ if( g->u.cash < 550000 ) {
+ popup( _( "I'm sorry, you don't have enough money." ) );
+ return;
+ }
+ p.set_mutation( trait_NPC_CONSTRUCTION_LEV_2 );
+- player_character.cash += -550000;
++ g->u.cash += -550000;
+ const tripoint_abs_omt site =
+ overmap_buffer.find_closest( player_character.global_omt_location(), "ranch_camp_63", 20,
+ false );