diff options
Diffstat (limited to 'src-03_allow-bio-firestarter-on-smoker.patch')
-rw-r--r-- | src-03_allow-bio-firestarter-on-smoker.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src-03_allow-bio-firestarter-on-smoker.patch b/src-03_allow-bio-firestarter-on-smoker.patch new file mode 100644 index 0000000..21043e6 --- /dev/null +++ b/src-03_allow-bio-firestarter-on-smoker.patch @@ -0,0 +1,43 @@ +--- a/src/iexamine.cpp ++++ b/src/iexamine.cpp +@@ -2476,7 +2476,10 @@ + return; + } + +- 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( itype_fire, 1 ) ) { + add_msg( _( "This kiln is ready to be fired, but you have no fire source." ) ); + return; + } else { +@@ -4950,11 +4953,23 @@ + return; + } + +- p.use_charges( itype_fire, 1 ); +- for( auto &it : here.i_at( examp ) ) { +- if( it.has_flag( flag_SMOKABLE ) ) { +- it.process_rot( examp ); +- 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 ) ) { ++ it.process_rot( examp ); ++ it.set_flag( flag_PROCESSING ); ++ } ++ } ++ } else { ++ p.use_charges( itype_fire, 1 ); ++ for( auto &it : g->m.i_at( examp ) ) { ++ if( it.has_flag( flag_SMOKABLE ) ) { ++ it.process_rot( examp ); ++ it.set_flag( flag_PROCESSING ); ++ } + } + } + here.furn_set( examp, next_smoker_type ); |