diff options
author | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2022-01-25 23:39:30 -0800 |
---|---|---|
committer | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2022-01-25 23:39:30 -0800 |
commit | 7406a4d8fad98609db9486e27f35e2347c87e70f (patch) | |
tree | bf59f93eda0b1200ca0f7630ee4b6832234b1c6d /vampirism.patch | |
parent | Update PKGUILD (diff) | |
download | cataclysm-bn-7406a4d8fad98609db9486e27f35e2347c87e70f.tar.xz |
Fix many patch fuzzing warnings.
Fix vampires not ignoring ambient temperature.
Diffstat (limited to 'vampirism.patch')
-rw-r--r-- | vampirism.patch | 100 |
1 files changed, 49 insertions, 51 deletions
diff --git a/vampirism.patch b/vampirism.patch index c833f7b..ee770b9 100644 --- a/vampirism.patch +++ b/vampirism.patch @@ -1,6 +1,6 @@ --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp -@@ -220,6 +220,7 @@3 +@@ -238,6 +238,7 @@3 static const species_id HUMAN( "HUMAN" ); static const species_id ZOMBIE( "ZOMBIE" ); @@ -8,7 +8,7 @@ static const std::string trait_flag_CANNIBAL( "CANNIBAL" ); static const std::string trait_flag_PSYCHOPATH( "PSYCHOPATH" ); static const std::string trait_flag_SAPIOVORE( "SAPIOVORE" ); -@@ -259,6 +260,8 @@ +@@ -278,6 +278,8 @@ static const std::string flag_SUPPORTS_ROOF( "SUPPORTS_ROOF" ); static const std::string flag_TREE( "TREE" ); static const std::string flag_USE_UPS( "USE_UPS" ); @@ -17,7 +17,7 @@ using namespace activity_handlers; -@@ -651,7 +654,8 @@ +@@ -667,7 +667,8 @@ !corpse.in_species( ZOMBIE ) ); if( is_human && !( u.has_trait_flag( trait_flag_CANNIBAL ) || u.has_trait_flag( trait_flag_PSYCHOPATH ) || @@ -40,7 +40,7 @@ static const trait_id trait_PACKMULE( "PACKMULE" ); static const trait_id trait_PADDED_FEET( "PADDED_FEET" ); static const trait_id trait_PAWS( "PAWS" ); -@@ -288,6 +288,8 @@ +@@ -311,6 +311,8 @@ static const trait_id trait_TOUGH_FEET( "TOUGH_FEET" ); static const trait_id trait_TRANSPIRATION( "TRANSPIRATION" ); static const trait_id trait_URSINE_EYE( "URSINE_EYE" ); @@ -66,7 +66,7 @@ } float rest = rest_quality(); -@@ -4545,6 +4547,7 @@ +@@ -4631,6 +4631,7 @@ const bool npc_no_food = is_npc() && get_option<bool>( "NO_NPC_FOOD" ); const bool foodless = debug_ls || npc_no_food; const bool mouse = has_trait( trait_NO_THIRST ); @@ -74,8 +74,8 @@ const bool mycus = has_trait( trait_M_DEPENDENT ); const float kcal_per_time = bmr() / ( 12.0f * 24.0f ); const int five_mins = ticks_between( from, to, 5_minutes ); -@@ -4568,7 +4571,7 @@ - } +@@ -4661,7 +4661,7 @@ + // Mycus and Metabolic Rehydration makes thirst unnecessary // since water is not limited by intake but by absorption, we can just set thirst to zero - if( mycus || mouse ) { @@ -83,7 +83,7 @@ set_thirst( 0 ); } } -@@ -4843,15 +4843,17 @@ +@@ -4861,15 +4861,17 @@ void Character::check_needs_extremes() { // Check if we've overdosed... in any deadly way. @@ -104,7 +104,7 @@ if( !( has_trait( trait_NOPAIN ) ) ) { add_msg_if_player( m_bad, _( "Your heart spasms painfully and stops." ) ); } else { -@@ -4859,11 +4861,12 @@ +@@ -4879,11 +4879,12 @@ } g->events().send<event_type::dies_from_drug_overdose>( getID(), effect_jetinjector ); set_part_hp_cur( bodypart_id( "torso" ), 0 ); @@ -119,10 +119,9 @@ add_msg_if_player( m_bad, _( "Your breathing slows down to a stop." ) ); g->events().send<event_type::dies_from_drug_overdose>( getID(), effect_drunk ); set_part_hp_cur( bodypart_id( "torso" ), 0 ); - @@ -4985,7 +4988,7 @@ - void Character::update_bodytemp( const map &m, weather_manager &weather ) + void Character::update_bodytemp( const map &m, const weather_manager &weather ) { - if( has_trait( trait_DEBUG_NOTEMP ) ) { + if( has_trait( trait_DEBUG_NOTEMP ) || has_trait( trait_VAMP_SKIN ) ) { @@ -132,7 +131,7 @@ --- a/src/character.h +++ b/src/character.h -@@ -163,6 +163,8 @@ +@@ -162,6 +162,8 @@ allergy_weak, // Cannibalism (unless psycho/cannibal) cannibalism, @@ -162,7 +161,7 @@ static const std::string flag_ALLERGEN_JUNK( "ALLERGEN_JUNK" ); static const std::string flag_ALLERGEN_MEAT( "ALLERGEN_MEAT" ); static const std::string flag_ALLERGEN_MILK( "ALLERGEN_MILK" ); -@@ -143,11 +144,17 @@ +@@ -148,11 +148,17 @@ static const std::string flag_RAW( "RAW" ); static const std::string flag_URSINE_HONEY( "URSINE_HONEY" ); static const std::string flag_USE_EAT_VERB( "USE_EAT_VERB" ); @@ -180,7 +179,7 @@ // This ugly temp array is here because otherwise it goes // std::vector(char*, char*)->vector(InputIterator,InputIterator) or some such const std::array<std::string, 2> temparray {{flag_ALLERGEN_MEAT, flag_ALLERGEN_EGG}}; -@@ -719,6 +726,12 @@ +@@ -712,6 +712,12 @@ _( "Eww. Inedible plant stuff!" ) ); } @@ -247,7 +246,6 @@ } else if( psycho || sapiovore ) { // Nothing - doesn't care enough to print a message } else { - @@ -1123,6 +1161,11 @@ add_msg_if_player( m_bad, _( "Yuck! How can anybody eat this stuff?" ) ); add_morale( allergy, -75, -400, 30_minutes, 24_minutes ); @@ -263,7 +261,7 @@ --- a/src/game.cpp +++ b/src/game.cpp -@@ -1008,8 +1008,9 @@ +@@ -1040,8 +1040,9 @@ int iInfoLine = 0; if( u.has_amount( itype_holybook_bible1, 1 ) || u.has_amount( itype_holybook_bible2, 1 ) || @@ -313,7 +311,7 @@ } } -@@ -3947,6 +3947,7 @@ +@@ -4046,6 +4046,7 @@ case edible_rating::allergy: case edible_rating::allergy_weak: case edible_rating::cannibalism: @@ -324,7 +322,7 @@ --- a/src/item_factory.cpp +++ b/src/item_factory.cpp -@@ -2219,6 +2219,7 @@ +@@ -2251,6 +2251,7 @@ // First allergens: // An item is an allergen even if it has trace amounts of allergenic material std::make_pair( material_id( "hflesh" ), "CANNIBALISM" ), @@ -332,7 +330,7 @@ std::make_pair( material_id( "hflesh" ), "ALLERGEN_MEAT" ), std::make_pair( material_id( "iflesh" ), "ALLERGEN_MEAT" ), -@@ -2233,10 +2234,15 @@ +@@ -2266,10 +2266,15 @@ std::make_pair( material_id( "mushroom" ), "ALLERGEN_VEGGY" ), std::make_pair( material_id( "milk" ), "ALLERGEN_MILK" ), std::make_pair( material_id( "egg" ), "ALLERGEN_EGG" ), @@ -362,7 +360,7 @@ --- a/src/map_field.cpp +++ b/src/map_field.cpp -@@ -88,6 +88,7 @@ +@@ -91,6 +91,7 @@ static const trait_id trait_M_SKIN3( "M_SKIN3" ); static const trait_id trait_THRESH_MARLOSS( "THRESH_MARLOSS" ); static const trait_id trait_THRESH_MYCUS( "THRESH_MYCUS" ); @@ -370,7 +368,7 @@ static const trait_id trait_WEB_WALKER( "WEB_WALKER" ); void map::create_burnproducts( const tripoint &p, const item &fuel, const units::mass &burned_mass ) -@@ -1395,7 +1396,8 @@ +@@ -1405,7 +1405,8 @@ if( ( cur.get_field_intensity() > 1 || !one_in( 3 ) ) && ( !inside || one_in( 3 ) ) ) { u.add_env_effect( effect_teargas, bp_mouth, 5, 20_seconds ); } @@ -380,7 +378,7 @@ u.add_env_effect( effect_blind, bp_eyes, cur.get_field_intensity() * 2, 10_seconds ); } } -@@ -1526,8 +1528,9 @@ +@@ -1537,8 +1537,9 @@ // The gas won't harm you inside a vehicle. if( !inside ) { // Full body suits protect you from the effects of the gas. @@ -395,7 +393,7 @@ --- a/src/memorial_logger.cpp +++ b/src/memorial_logger.cpp -@@ -80,6 +80,7 @@ +@@ -79,6 +79,7 @@ static const trap_str_id tr_snake( "tr_snake" ); static const trap_str_id tr_glass_pit( "tr_glass_pit" ); @@ -403,7 +401,7 @@ static const trait_id trait_CANNIBAL( "CANNIBAL" ); static const trait_id trait_PSYCHOPATH( "PSYCHOPATH" ); static const trait_id trait_SAPIOVORE( "SAPIOVORE" ); -@@ -486,6 +487,7 @@ +@@ -488,6 +488,7 @@ character_id ch = e.get<character_id>( "killer" ); if( ch == g->u.getID() ) { std::string name = e.get<cata_variant_type::string>( "victim_name" ); @@ -411,7 +409,7 @@ bool cannibal = g->u.has_trait( trait_CANNIBAL ); bool psycho = g->u.has_trait( trait_PSYCHOPATH ); if( g->u.has_trait( trait_SAPIOVORE ) ) { -@@ -509,6 +511,10 @@ +@@ -512,6 +512,10 @@ add( pgettext( "memorial_male", "Killed an innocent, %s." ), pgettext( "memorial_female", "Killed an innocent, %s." ), name ); @@ -425,7 +423,7 @@ --- a/src/morale_types.cpp +++ b/src/morale_types.cpp -@@ -138,6 +139,7 @@ +@@ -36,6 +36,7 @@ const morale_type MORALE_CRAVING_MARLOSS( "morale_craving_marloss" ); const morale_type MORALE_FOOD_BAD( "morale_food_bad" ); const morale_type MORALE_CANNIBAL( "morale_cannibal" ); @@ -455,7 +453,7 @@ static const trait_id trait_TREE_COMMUNION( "TREE_COMMUNION" ); static const trait_id trait_VOMITOUS( "VOMITOUS" ); static const trait_id trait_WEB_WEAVER( "WEB_WEAVER" ); -@@ -887,6 +888,11 @@ +@@ -860,6 +860,11 @@ if( !mutagen ) { return; } @@ -467,7 +465,7 @@ float mut_power = to_turns<float>( mutagen.get_duration() ) / to_turns<float> ( mutagen.get_int_dur_factor() ); add_msg_if_player( m_debug, "Mutation accumulation: %.1f", mut_power ); -@@ -926,6 +932,10 @@ +@@ -904,6 +904,10 @@ { bool force_bad = one_in( 3 ); bool force_good = false; @@ -481,7 +479,7 @@ --- a/src/npc.cpp +++ b/src/npc.cpp -@@ -116,6 +116,7 @@ +@@ -118,6 +118,7 @@ static const trait_id trait_SAPIOVORE( "SAPIOVORE" ); static const trait_id trait_SCHIZOPHRENIC( "SCHIZOPHRENIC" ); static const trait_id trait_TERRIFYING( "TERRIFYING" ); @@ -489,7 +487,7 @@ static const std::string flag_NPC_SAFE( "NPC_SAFE" ); -@@ -2486,12 +2487,15 @@ +@@ -2492,12 +2492,15 @@ } if( killer == &g->u && ( !guaranteed_hostile() || hit_by_player ) ) { @@ -508,7 +506,7 @@ --- a/src/player_hardcoded_effects.cpp +++ b/src/player_hardcoded_effects.cpp -@@ -114,6 +114,8 @@ +@@ -105,6 +105,8 @@ static const trait_id trait_SEESLEEP( "SEESLEEP" ); static const trait_id trait_SCHIZOPHRENIC( "SCHIZOPHRENIC" ); static const trait_id trait_THRESH_MYCUS( "THRESH_MYCUS" ); @@ -528,7 +526,7 @@ add_msg_if_player( m_bad, _( "Your heart spasms painfully and stops, dragging you back to reality as you die." ) ); } else { -@@ -1095,6 +1097,9 @@ +@@ -1065,6 +1065,9 @@ // Determine the strength of effects or dreams based upon category strength int strength = 0; // Category too weak for any effect or dream if( crossed_threshold() ) { @@ -541,7 +539,7 @@ --- a/src/suffer.cpp +++ b/src/suffer.cpp -@@ -143,6 +143,8 @@ +@@ -153,6 +153,8 @@ static const trait_id trait_TROGLO2( "TROGLO2" ); static const trait_id trait_TROGLO3( "TROGLO3" ); static const trait_id trait_UNSTABLE( "UNSTABLE" ); @@ -550,7 +548,7 @@ static const trait_id trait_VOMITOUS( "VOMITOUS" ); static const trait_id trait_WEB_SPINNER( "WEB_SPINNER" ); static const trait_id trait_WEB_WEAVER( "WEB_WEAVER" ); -@@ -243,7 +246,8 @@ +@@ -251,7 +251,8 @@ void Character::suffer_while_underwater() { @@ -560,7 +558,7 @@ oxygen--; } if( oxygen < 12 && worn_with_flag( "REBREATHER" ) ) { -@@ -742,7 +746,8 @@ +@@ -751,7 +751,8 @@ return; } @@ -570,7 +568,7 @@ suffer_from_sunburn(); } -@@ -768,6 +773,13 @@ +@@ -778,6 +778,13 @@ mod_int_bonus( -4 ); mod_per_bonus( -4 ); } @@ -584,7 +582,7 @@ } std::map<bodypart_id, float> Character::bodypart_exposure() -@@ -799,7 +811,8 @@ +@@ -816,7 +816,8 @@ void Character::suffer_from_sunburn() { @@ -594,7 +592,7 @@ return; } -@@ -816,6 +829,12 @@ +@@ -834,6 +834,12 @@ return; } sunlight_effect = _( "The sunlight burns" ); @@ -607,7 +605,7 @@ } // Sunglasses can keep the sun off the eyes. -@@ -893,7 +912,7 @@ +@@ -917,7 +917,7 @@ } // Solar Sensitivity (SUNBURN) trait causes injury to exposed parts @@ -619,7 +617,7 @@ --- a/data/json/field_type.json +++ b/data/json/field_type.json -@@ -303,7 +303,7 @@ +@@ -299,7 +299,7 @@ "dirty_transparency_cache": true, "percent_spread": 10, "outdoor_age_speedup": "0 turns", @@ -628,7 +626,7 @@ "priority": 8, "half_life": "2 minutes", "phase": "gas", -@@ -389,7 +389,7 @@ +@@ -385,7 +385,7 @@ "outdoor_age_speedup": "3 minutes", "dirty_transparency_cache": true, "has_fume": true, @@ -637,7 +635,7 @@ "priority": 8, "half_life": "10 minutes", "phase": "gas", -@@ -418,7 +418,7 @@ +@@ -414,7 +414,7 @@ "outdoor_age_speedup": "0 turns", "dirty_transparency_cache": true, "has_fume": true, @@ -646,7 +644,7 @@ "priority": 8, "half_life": "5 minutes", "phase": "gas", -@@ -464,7 +464,7 @@ +@@ -460,7 +460,7 @@ "wandering_field": "fd_toxic_gas", "gas_absorption_factor": 15, "dirty_transparency_cache": true, @@ -673,7 +671,7 @@ "priority": 8, "half_life": "15 minutes", "phase": "gas", -@@ -1233,7 +1233,7 @@ +@@ -1225,7 +1225,7 @@ "outdoor_age_speedup": "3 minutes", "dirty_transparency_cache": true, "has_fume": true, @@ -682,7 +680,7 @@ "priority": 8, "half_life": "10 minutes", "phase": "gas" -@@ -1253,7 +1253,7 @@ +@@ -1245,7 +1245,7 @@ "outdoor_age_speedup": "1 minutes", "dirty_transparency_cache": true, "has_fume": true, @@ -691,7 +689,7 @@ "priority": 8, "half_life": "30 minutes", "phase": "gas", -@@ -1275,7 +1275,7 @@ +@@ -1267,7 +1267,7 @@ "outdoor_age_speedup": "1 minutes", "dirty_transparency_cache": true, "has_fume": true, @@ -703,7 +701,7 @@ --- a/data/json/flags.json +++ b/data/json/flags.json -@@ -1093,6 +1093,21 @@ +@@ -1117,6 +1117,21 @@ "context": [ "COMESTIBLE" ] }, { @@ -725,7 +723,7 @@ "id": "ALLERGEN_JUNK", "type": "json_flag", "context": [ "COMESTIBLE" ] -@@ -1173,6 +1173,16 @@ +@@ -1197,6 +1197,16 @@ "context": [ ] }, { @@ -760,7 +758,7 @@ --- a/data/json/mutations/mutation_ordering.json +++ b/data/json/mutations/mutation_ordering.json -@@ -77,6 +77,7 @@ +@@ -73,6 +73,7 @@ "TROGLO2", "TROGLO3", "URSINE_FUR", @@ -768,9 +766,9 @@ "VISCOUS" ], "order": 1500 -@@ -185,7 +186,7 @@ +@@ -180,7 +181,7 @@ { "id": [ "FLOWERS" ], "order": 5000 }, - { "id": [ "ELFA_EARS", "FELINE_EARS", "LUPINE_EARS", "RABBIT_EARS", "URSINE_EARS" ], "order": 5500 }, + { "id": [ "ELFA_EARS", "FELINE_EARS", "LUPINE_EARS", "URSINE_EARS" ], "order": 5500 }, { "id": [ "ANTENNAE", "ANTLERS", "CURVED_HORNS", "HORNS", "POINTED_HORNS" ], "order": 6000 }, - { "id": [ "COMPOUND_EYES", "ELFAEYES", "FEL_EYE", "LIZ_EYE" ], "order": 6500 }, + { "id": [ "COMPOUND_EYES", "ELFAEYES", "FEL_EYE", "LIZ_EYE", "VAMP_EYES" ], "order": 6500 }, |