diff --git a/data/json/game_balance.json b/data/json/game_balance.json index 559665c4dfcd8..82d4a813f9cdf 100644 --- a/data/json/game_balance.json +++ b/data/json/game_balance.json @@ -76,27 +76,6 @@ "stype": "bool", "value": false }, - { - "type": "EXTERNAL_OPTION", - "name": "FILTHY_CLOTHES", - "info": "If true, zombies will drop filthy clothing.", - "stype": "bool", - "value": true - }, - { - "type": "EXTERNAL_OPTION", - "name": "FILTHY_MORALE", - "info": "Morale penalty for filthy clothing. If true, wearing filthy clothing will cause morale penalties. Doesn't make sense if FILTHY_CLOTHES option is false.", - "stype": "bool", - "value": true - }, - { - "type": "EXTERNAL_OPTION", - "name": "FILTHY_WOUNDS", - "info": "Infected wounds from filthy clothing. If true, getting hit in a body part covered in filthy clothing may cause infections. Doesn't make sense if FILTHY_CLOTHES option is false.", - "stype": "bool", - "value": true - }, { "type": "EXTERNAL_OPTION", "name": "MANUAL_BIONIC_INSTALLATION", @@ -153,13 +132,6 @@ "stype": "int", "value": 0 }, - { - "type": "EXTERNAL_OPTION", - "name": "MAX_HARVEST_COUNT", - "info": "The maximum amount of produce that can be harvested from a plant.", - "stype": "int", - "value": 12 - }, { "type": "EXTERNAL_OPTION", "name": "DISABLE_ROBOT_RESPONSE", diff --git a/src/character.cpp b/src/character.cpp index 66a416503920e..2e1c963953e47 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -8623,31 +8623,29 @@ dealt_damage_instance Character::deal_damage( Creature *source, bodypart_id bp, } } - if( get_option( "FILTHY_WOUNDS" ) ) { - int sum_cover = 0; - for( const item &i : worn ) { - if( i.covers( bp->token ) && i.is_filthy() ) { - sum_cover += i.get_coverage(); - } - } - - // Chance of infection is damage (with cut and stab x4) * sum of coverage on affected body part, in percent. - // i.e. if the body part has a sum of 100 coverage from filthy clothing, - // each point of damage has a 1% change of causing infection. - if( sum_cover > 0 ) { - const int cut_type_dam = dealt_dams.type_damage( DT_CUT ) + dealt_dams.type_damage( DT_STAB ); - const int combined_dam = dealt_dams.type_damage( DT_BASH ) + ( cut_type_dam * 4 ); - const int infection_chance = ( combined_dam * sum_cover ) / 100; - if( x_in_y( infection_chance, 100 ) ) { - if( has_effect( effect_bite, bp->token ) ) { - add_effect( effect_bite, 40_minutes, bp->token, true ); - } else if( has_effect( effect_infected, bp->token ) ) { - add_effect( effect_infected, 25_minutes, bp->token, true ); - } else { - add_effect( effect_bite, 1_turns, bp->token, true ); - } - add_msg_if_player( _( "Filth from your clothing has implanted deep in the wound." ) ); + int sum_cover = 0; + for( const item &i : worn ) { + if( i.covers( bp->token ) && i.is_filthy() ) { + sum_cover += i.get_coverage(); + } + } + + // Chance of infection is damage (with cut and stab x4) * sum of coverage on affected body part, in percent. + // i.e. if the body part has a sum of 100 coverage from filthy clothing, + // each point of damage has a 1% change of causing infection. + if( sum_cover > 0 ) { + const int cut_type_dam = dealt_dams.type_damage( DT_CUT ) + dealt_dams.type_damage( DT_STAB ); + const int combined_dam = dealt_dams.type_damage( DT_BASH ) + ( cut_type_dam * 4 ); + const int infection_chance = ( combined_dam * sum_cover ) / 100; + if( x_in_y( infection_chance, 100 ) ) { + if( has_effect( effect_bite, bp->token ) ) { + add_effect( effect_bite, 40_minutes, bp->token, true ); + } else if( has_effect( effect_infected, bp->token ) ) { + add_effect( effect_infected, 25_minutes, bp->token, true ); + } else { + add_effect( effect_bite, 1_turns, bp->token, true ); } + add_msg_if_player( _( "Filth from your clothing has implanted deep in the wound." ) ); } } diff --git a/src/iexamine.cpp b/src/iexamine.cpp index c02f316e39ef5..5cded6463242b 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -2154,7 +2154,7 @@ void iexamine::harvest_plant( player &p, const tripoint &examp, bool from_activi ///\EFFECT_SURVIVAL increases number of plants harvested from a seed int plant_count = rng( skillLevel / 2, skillLevel ); plant_count *= g->m.furn( examp )->plant->harvest_multiplier; - const int max_harvest_count = get_option( "MAX_HARVEST_COUNT" ); + const int max_harvest_count = 12; if( plant_count >= max_harvest_count ) { plant_count = max_harvest_count; } else if( plant_count <= 0 ) { diff --git a/src/item.cpp b/src/item.cpp index 9c67bf7e8d051..e9c911e8ce0be 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -9710,8 +9710,7 @@ skill_id item::contextualize_skill( const skill_id &id ) const bool item::is_filthy() const { - return has_flag( flag_FILTHY ) && ( get_option( "FILTHY_MORALE" ) || - g->u.has_trait( trait_SQUEAMISH ) ); + return has_flag( flag_FILTHY ); } bool item::on_drop( const tripoint &pos ) diff --git a/src/iuse_actor.cpp b/src/iuse_actor.cpp index 456b5eb4f0347..3453102def2d9 100644 --- a/src/iuse_actor.cpp +++ b/src/iuse_actor.cpp @@ -3333,7 +3333,7 @@ int heal_actor::use( player &p, item &it, bool, const tripoint &pos ) const p.add_msg_if_player( m_info, _( "You can't do that while mounted." ) ); return 0; } - if( get_option( "FILTHY_WOUNDS" ) && it.is_filthy() ) { + if( it.is_filthy() ) { p.add_msg_if_player( m_info, _( "You can't use filthy items for healing." ) ); return 0; } diff --git a/src/monster.cpp b/src/monster.cpp index b847b10bc9108..6f50684df496d 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -2391,7 +2391,7 @@ void monster::drop_items_on_death() const auto dropped = g->m.spawn_items( pos(), items ); - if( has_flag( MF_FILTHY ) && get_option( "FILTHY_CLOTHES" ) ) { + if( has_flag( MF_FILTHY ) ) { for( const auto &it : dropped ) { if( ( it->is_armor() || it->is_pet_armor() ) && !it->is_gun() ) { // handle wearable guns as a special case diff --git a/src/morale.cpp b/src/morale.cpp index 604c4f35625f0..0f15f4cec977f 100644 --- a/src/morale.cpp +++ b/src/morale.cpp @@ -1088,10 +1088,6 @@ void player_morale::update_constrained_penalty() void player_morale::update_squeamish_penalty() { - if( !get_option( "FILTHY_MORALE" ) ) { - set_permanent( MORALE_PERM_FILTHY, 0 ); - return; - } int penalty = 0; for( const std::pair &bpt : body_parts ) { if( bpt.second.filthy > 0 ) { diff --git a/tests/item_tname_test.cpp b/tests/item_tname_test.cpp index 9319e507b9f89..f97b39c9e68ef 100644 --- a/tests/item_tname_test.cpp +++ b/tests/item_tname_test.cpp @@ -241,7 +241,6 @@ TEST_CASE( "wet item", "[item][tname][wet]" ) TEST_CASE( "filthy item", "[item][tname][filthy]" ) { - override_option opt( "FILTHY_MORALE", "true" ); item rag( "rag" ); rag.set_flag( flag_FILTHY ); REQUIRE( rag.is_filthy() );