From 4717bc0e562d1328b24b780bb5ab327e82b28fa6 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Wed, 29 Sep 2021 19:55:24 -0700 Subject: Updated to 2021-09-29-2237 --- jc_allow-bio-firestarter-on-smoker.patch | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'jc_allow-bio-firestarter-on-smoker.patch') 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 ); -- cgit v1.2.1