summaryrefslogtreecommitdiff
path: root/jc_allow-bio-firestarter-on-smoker.patch
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2021-09-29 19:55:24 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2021-09-29 19:55:24 -0700
commit4717bc0e562d1328b24b780bb5ab327e82b28fa6 (patch)
treeedc37436e700a188d62a889969bfbebce5835a87 /jc_allow-bio-firestarter-on-smoker.patch
parentUpdated to 2021-09-20-1811 (diff)
downloadcataclysm-bn-4717bc0e562d1328b24b780bb5ab327e82b28fa6.tar.xz
Updated to 2021-09-29-2237
Diffstat (limited to 'jc_allow-bio-firestarter-on-smoker.patch')
-rw-r--r--jc_allow-bio-firestarter-on-smoker.patch18
1 files changed, 11 insertions, 7 deletions
diff --git a/jc_allow-bio-firestarter-on-smoker.patch b/jc_allow-bio-firestarter-on-smoker.patch
index 6ced728..49df9f4 100644
--- a/jc_allow-bio-firestarter-on-smoker.patch
+++ b/jc_allow-bio-firestarter-on-smoker.patch
@@ -1,25 +1,29 @@
--- a/src/iexamine.cpp
+++ b/src/iexamine.cpp
-@@ -4866,18 +4866,30 @@
+@@ -2476,7 +2476,10 @@
return;
}
-- if( !p.has_charges( "fire", 1 ) ) {
+- if( !p.has_charges( itype_fire, 1 ) ) {
+ const bool has_bionic_firestarter = p.has_bionic( bio_lighter ) &&
+ p.enough_power_for( bio_lighter );
+
-+ if( !has_bionic_firestarter && !p.has_charges( "fire", 1 ) ) {
- add_msg( _( "This smoking rack is ready to be fired, but you have no fire source." ) );
++ if( !has_bionic_firestarter && !p.has_charges( itype_fire, 1 ) ) {
+ add_msg( _( "This kiln is ready to be fired, but you have no fire source." ) );
return;
- } else if( !query_yn( _( "Fire the smoking rack?" ) ) ) {
+ } else {
+@@ -4950,11 +4953,23 @@
return;
}
-- p.use_charges( "fire", 1 );
+- p.use_charges( itype_fire, 1 );
- for( auto &it : g->m.i_at( examp ) ) {
- if( it.has_flag( flag_SMOKABLE ) ) {
- it.process_rot( 1, false, examp, nullptr );
- it.set_flag( flag_PROCESSING );
++ const bool has_bionic_firestarter = p.has_bionic( bio_lighter ) &&
++ p.enough_power_for( bio_lighter );
++
+ if( has_bionic_firestarter ) {
+ for( auto &it : g->m.i_at( examp ) ) {
+ if( it.has_flag( flag_SMOKABLE ) ) {
@@ -28,7 +32,7 @@
+ }
+ }
+ } else {
-+ p.use_charges( "fire", 1 );
++ p.use_charges( itype_fire, 1 );
+ for( auto &it : g->m.i_at( examp ) ) {
+ if( it.has_flag( flag_SMOKABLE ) ) {
+ it.process_rot( 1, false, examp, nullptr );