From 4675132d5967e796e08c84d3a30273e776624b3f Mon Sep 17 00:00:00 2001 From: Hirmuolio Date: Tue, 26 May 2020 23:49:31 +0300 Subject: [PATCH 1/5] container insulation --- src/item.cpp | 2 +- src/item_contents.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/item.cpp b/src/item.cpp index 5f11cc917a9f2..378fdda01436a 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -9375,7 +9375,7 @@ bool item::process_blackpowder_fouling( player *carrier ) bool item::process( player *carrier, const tripoint &pos, bool activate, float insulation, temperature_flag flag, float spoil_multiplier_parent ) { - contents.process( carrier, pos, activate, insulation, flag, spoil_multiplier_parent ); + contents.process( carrier, pos, activate, type->insulation_factor * insulation, flag, spoil_multiplier_parent ); return process_internal( carrier, pos, activate, insulation, flag, spoil_multiplier_parent ); } diff --git a/src/item_contents.cpp b/src/item_contents.cpp index dfbd1faad0bea..98838471d83bf 100644 --- a/src/item_contents.cpp +++ b/src/item_contents.cpp @@ -845,6 +845,7 @@ void item_contents::remove_internal( const std::function &filter void item_contents::process( player *carrier, const tripoint &pos, bool activate, float insulation, temperature_flag flag, float spoil_multiplier_parent ) { + //debugmsg("contents %f", insulation); for( item_pocket &pocket : contents ) { // no reason to check mods, they won't rot if( !pocket.is_type( item_pocket::pocket_type::MOD ) ) { From 0a91cda299a988ed21583677f434f49219dd970e Mon Sep 17 00:00:00 2001 From: Hirmuolio Date: Tue, 26 May 2020 23:50:53 +0300 Subject: [PATCH 2/5] remove dbg msg --- src/item_contents.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/item_contents.cpp b/src/item_contents.cpp index 98838471d83bf..dfbd1faad0bea 100644 --- a/src/item_contents.cpp +++ b/src/item_contents.cpp @@ -845,7 +845,6 @@ void item_contents::remove_internal( const std::function &filter void item_contents::process( player *carrier, const tripoint &pos, bool activate, float insulation, temperature_flag flag, float spoil_multiplier_parent ) { - //debugmsg("contents %f", insulation); for( item_pocket &pocket : contents ) { // no reason to check mods, they won't rot if( !pocket.is_type( item_pocket::pocket_type::MOD ) ) { From 1642f99bfebe3a5a86fe5626050de47c2c5bb275 Mon Sep 17 00:00:00 2001 From: Hirmuolio Date: Wed, 27 May 2020 00:00:35 +0300 Subject: [PATCH 3/5] astyle --- src/item.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/item.cpp b/src/item.cpp index 378fdda01436a..15ba0cf5f9f34 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -8562,6 +8562,7 @@ void item::apply_freezerburn() bool item::process_temperature_rot( float insulation, const tripoint &pos, player *carrier, const temperature_flag flag, float spoil_modifier ) { + debugmsg( _( "%s, insulation %f" ), tname(), insulation ); const time_point now = calendar::turn; // if player debug menu'd the time backward it breaks stuff, just reset the @@ -9375,7 +9376,7 @@ bool item::process_blackpowder_fouling( player *carrier ) bool item::process( player *carrier, const tripoint &pos, bool activate, float insulation, temperature_flag flag, float spoil_multiplier_parent ) { - contents.process( carrier, pos, activate, type->insulation_factor * insulation, flag, spoil_multiplier_parent ); + contents.process( carrier, pos, activate, insulation, flag, spoil_multiplier_parent ); return process_internal( carrier, pos, activate, insulation, flag, spoil_multiplier_parent ); } From 5b33586ae0e32f696115f35cb2b9a4611ddd4016 Mon Sep 17 00:00:00 2001 From: Hirmuolio Date: Wed, 27 May 2020 00:01:18 +0300 Subject: [PATCH 4/5] remove another debug message --- src/item.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/item.cpp b/src/item.cpp index 15ba0cf5f9f34..5f11cc917a9f2 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -8562,7 +8562,6 @@ void item::apply_freezerburn() bool item::process_temperature_rot( float insulation, const tripoint &pos, player *carrier, const temperature_flag flag, float spoil_modifier ) { - debugmsg( _( "%s, insulation %f" ), tname(), insulation ); const time_point now = calendar::turn; // if player debug menu'd the time backward it breaks stuff, just reset the From f7587dba2025cbe7f4e359f696f84f0db1dc1376 Mon Sep 17 00:00:00 2001 From: Hirmuolio Date: Wed, 27 May 2020 00:02:21 +0300 Subject: [PATCH 5/5] add the fix back... --- src/item.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/item.cpp b/src/item.cpp index 5f11cc917a9f2..97394e02a34ed 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -9375,7 +9375,8 @@ bool item::process_blackpowder_fouling( player *carrier ) bool item::process( player *carrier, const tripoint &pos, bool activate, float insulation, temperature_flag flag, float spoil_multiplier_parent ) { - contents.process( carrier, pos, activate, insulation, flag, spoil_multiplier_parent ); + contents.process( carrier, pos, activate, type->insulation_factor * insulation, flag, + spoil_multiplier_parent ); return process_internal( carrier, pos, activate, insulation, flag, spoil_multiplier_parent ); }