diff options
author | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2022-01-31 20:26:08 -0800 |
---|---|---|
committer | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2022-01-31 20:26:08 -0800 |
commit | 5df800d05b7ca9e8d7d79ef33fcdcead0785b75a (patch) | |
tree | 4f49044af83273900da7a277a3e368762d0533cd /jc_allow-bio-firestarter-on-smoker.patch | |
parent | Fix more inconsistent ammo names (diff) | |
download | cataclysm-dda-5df800d05b7ca9e8d7d79ef33fcdcead0785b75a.tar.xz |
Update to 0.F.3
Port various patches from BN
Diffstat (limited to 'jc_allow-bio-firestarter-on-smoker.patch')
-rw-r--r-- | jc_allow-bio-firestarter-on-smoker.patch | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/jc_allow-bio-firestarter-on-smoker.patch b/jc_allow-bio-firestarter-on-smoker.patch index e81a493..4c5c548 100644 --- a/jc_allow-bio-firestarter-on-smoker.patch +++ b/jc_allow-bio-firestarter-on-smoker.patch @@ -1,39 +1,43 @@ --- a/src/iexamine.cpp +++ b/src/iexamine.cpp -@@ -4868,18 +4868,30 @@ +@@ -2638,7 +2638,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 { +@@ -5396,11 +5399,23 @@ return; } -- p.use_charges( "fire", 1 ); -- for( auto &it : g->m.i_at( examp ) ) { +- p.use_charges( itype_fire, 1 ); +- for( item &it : here.i_at( examp ) ) { - if( it.has_flag( flag_SMOKABLE ) ) { - it.process_temperature_rot( 1, 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 ) ) { ++ for( item &it : here.i_at( examp ) ) { + if( it.has_flag( flag_SMOKABLE ) ) { + it.process_temperature_rot( 1, examp, nullptr ); + it.set_flag( flag_PROCESSING ); + } + } + } else { -+ p.use_charges( "fire", 1 ); -+ for( auto &it : g->m.i_at( examp ) ) { ++ p.use_charges( itype_fire, 1 ); ++ for( item &it : here.i_at( examp ) ) { + if( it.has_flag( flag_SMOKABLE ) ) { + it.process_temperature_rot( 1, examp, nullptr ); + it.set_flag( flag_PROCESSING ); + } } } - g->m.furn_set( examp, next_smoker_type ); + here.furn_set( examp, next_smoker_type ); |