diff options
Diffstat (limited to 'src-03_allow-bio-firestarter-on-smoker.patch')
-rw-r--r-- | src-03_allow-bio-firestarter-on-smoker.patch | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src-03_allow-bio-firestarter-on-smoker.patch b/src-03_allow-bio-firestarter-on-smoker.patch index 21043e6..5210727 100644 --- a/src-03_allow-bio-firestarter-on-smoker.patch +++ b/src-03_allow-bio-firestarter-on-smoker.patch @@ -12,31 +12,28 @@ add_msg( _( "This kiln is ready to be fired, but you have no fire source." ) ); return; } else { -@@ -4950,11 +4953,23 @@ +@@ -4950,10 +4953,21 @@ 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 ); +- if( it->has_flag( flag_SMOKABLE ) ) { +- 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 ); ++ for( auto &it : here.i_at( examp ) ) { ++ if( it->has_flag( flag_SMOKABLE ) ) { ++ 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 ); ++ for( auto &it : here.i_at( examp ) ) { ++ if( it->has_flag( flag_SMOKABLE ) ) { ++ it->set_flag( flag_PROCESSING ); + } } } |