summaryrefslogtreecommitdiff
path: root/jc_allow-bio-firestarter-on-smoker.patch
diff options
context:
space:
mode:
Diffstat (limited to 'jc_allow-bio-firestarter-on-smoker.patch')
-rw-r--r--jc_allow-bio-firestarter-on-smoker.patch26
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 );