summaryrefslogtreecommitdiff
path: root/jc_allow-bio-firestarter-on-smoker.patch
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2021-01-18 05:01:02 -0800
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2021-01-18 05:01:02 -0800
commit42209cb39a6d278e0c3ad9dafd13bba47d3f9adb (patch)
tree45be71d6fb9f07a843180e65c2b46a995d3a7ba7 /jc_allow-bio-firestarter-on-smoker.patch
parentUpdate ammo names patch (diff)
downloadcataclysm-bn-42209cb39a6d278e0c3ad9dafd13bba47d3f9adb.tar.xz
Revert the npc sleep on tables patch
Add patch to prevent non-faction NPCs becoming sleep deprived
Diffstat (limited to 'jc_allow-bio-firestarter-on-smoker.patch')
-rw-r--r--jc_allow-bio-firestarter-on-smoker.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/jc_allow-bio-firestarter-on-smoker.patch b/jc_allow-bio-firestarter-on-smoker.patch
new file mode 100644
index 0000000..e81a493
--- /dev/null
+++ b/jc_allow-bio-firestarter-on-smoker.patch
@@ -0,0 +1,39 @@
+--- a/src/iexamine.cpp
++++ b/src/iexamine.cpp
+@@ -4868,18 +4868,30 @@
+ return;
+ }
+
+- if( !p.has_charges( "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." ) );
+ return;
+ } else if( !query_yn( _( "Fire the smoking rack?" ) ) ) {
+ return;
+ }
+
+- p.use_charges( "fire", 1 );
+- for( auto &it : g->m.i_at( examp ) ) {
+- if( it.has_flag( flag_SMOKABLE ) ) {
+- it.process_temperature_rot( 1, examp, nullptr );
+- it.set_flag( flag_PROCESSING );
++ if( has_bionic_firestarter ) {
++ for( auto &it : g->m.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 ) ) {
++ 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 );