diff options
author | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2021-10-07 09:15:54 -0700 |
---|---|---|
committer | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2021-10-07 09:15:54 -0700 |
commit | 87d516615c70689c366caddafaac75dfdb9f6ec1 (patch) | |
tree | e808106846a7dac4c462197e94440123f7d14249 /custom.patch | |
parent | Uppdated to 2021-10-04-1824 (diff) | |
download | cataclysm-bn-87d516615c70689c366caddafaac75dfdb9f6ec1.tar.xz |
Fix more foods listed as incorrect materials.
Fix vampire patch to reject alcohol and foodplace foodstuff.
Fix vampire patch to properly reject 0 nutrition foods.
Diffstat (limited to 'custom.patch')
-rw-r--r-- | custom.patch | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/custom.patch b/custom.patch index 6d2c4ae..85315ab 100644 --- a/custom.patch +++ b/custom.patch @@ -91,9 +91,11 @@ static const trait_id trait_VEGETARIAN( "VEGETARIAN" ); static const trait_id trait_WATERSLEEP( "WATERSLEEP" ); -@@ -114,6 +114,7 @@ +@@ -114,6 +114,9 @@ static const std::string flag_HIDDEN_HALLU( "HIDDEN_HALLU" ); ++static const std::string flag_ALLERGEN_ALCOHOL( "ALLERGEN_ALCOHOL" ); static const std::string flag_ALLERGEN_EGG( "ALLERGEN_EGG" ); ++static const std::string flag_ALLERGEN_FOODSTUFF( "ALLERGEN_FOODSTUFF" ); static const std::string flag_ALLERGEN_FRUIT( "ALLERGEN_FRUIT" ); +static const std::string flag_ALLERGEN_HONEY( "ALLERGEN_HONEY" ); static const std::string flag_ALLERGEN_JUNK( "ALLERGEN_JUNK" ); @@ -111,7 +113,7 @@ } }; +const std::vector<std::string> vamp_blacklist {{ -+ flag_ALLERGEN_VEGGY, flag_ALLERGEN_FRUIT, flag_ALLERGEN_WHEAT, flag_ALLERGEN_NUT, flag_ALLERGEN_MEAT, flag_ALLERGEN_EGG, flag_ALLERGEN_JUNK, flag_ALLERGEN_MILK, flag_ALLERGEN_HONEY, ++ flag_ALLERGEN_VEGGY, flag_ALLERGEN_FRUIT, flag_ALLERGEN_WHEAT, flag_ALLERGEN_NUT, flag_ALLERGEN_MEAT, flag_ALLERGEN_EGG, flag_ALLERGEN_JUNK, flag_ALLERGEN_MILK, flag_ALLERGEN_HONEY, flag_ALLERGEN_FOODSTUFF, flag_ALLERGEN_ALCOHOL, + } +}; // This ugly temp array is here because otherwise it goes @@ -121,8 +123,8 @@ _( "Eww. Inedible plant stuff!" ) ); } -+ if( has_trait( trait_VAMP_HUNGER ) && nutrition_for( food ) > 0 && -+ food.has_any_flag( vamp_blacklist ) && !food.has_flag( flag_VAMPIRISM_OK ) ) { ++ if( has_trait( trait_VAMP_HUNGER ) && food.has_any_flag( vamp_blacklist ) && ++ !food.has_flag( flag_VAMPIRISM_OK ) ) { + return ret_val<edible_rating>::make_failure( edible_rating::inedible_mutation, + _( "Bleh. This isn't blood!" ) ); + } @@ -218,10 +220,12 @@ std::make_pair( material_id( "hflesh" ), "ALLERGEN_MEAT" ), std::make_pair( material_id( "iflesh" ), "ALLERGEN_MEAT" ), -@@ -2233,10 +2234,13 @@ +@@ -2233,10 +2234,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" ), ++ std::make_pair( material_id( "alcohol" ), "ALLERGEN_ALCOHOL" ), ++ std::make_pair( material_id( "foodplace_foodstuff" ), "ALLERGEN_FOODSTUFF" ), + std::make_pair( material_id( "honey" ), "ALLERGEN_HONEY" ), std::make_pair( material_id( "junk" ), "ALLERGEN_JUNK" ), // Not food, but we can keep it here @@ -571,7 +575,7 @@ --- a/data/json/flags.json +++ b/data/json/flags.json -@@ -1093,6 +1093,11 @@ +@@ -1093,6 +1093,21 @@ "context": [ "COMESTIBLE" ] }, { @@ -580,6 +584,16 @@ + "context": [ "COMESTIBLE" ] + }, + { ++ "id": "ALLERGEN_ALCOHOL", ++ "type": "json_flag", ++ "context": [ "COMESTIBLE" ] ++ }, ++ { ++ "id": "ALLERGEN_FOODSTUFF", ++ "type": "json_flag", ++ "context": [ "COMESTIBLE" ] ++ }, ++ { "id": "ALLERGEN_JUNK", "type": "json_flag", "context": [ "COMESTIBLE" ] |