diff options
author | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2021-05-07 00:42:44 -0700 |
---|---|---|
committer | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2021-05-07 00:42:44 -0700 |
commit | 8790ccae1394b742dfbe1e7e0c78d5b30ad204f6 (patch) | |
tree | 53820a46511a399ab4199c9775b6ce7ba18e59f1 /jc_npcs-eat-when-hungry.patch | |
parent | Fix more inconsistent ammo names (diff) | |
download | cataclysm-bn-8790ccae1394b742dfbe1e7e0c78d5b30ad204f6.tar.xz |
Port to Bright Nights
Diffstat (limited to 'jc_npcs-eat-when-hungry.patch')
-rw-r--r-- | jc_npcs-eat-when-hungry.patch | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/jc_npcs-eat-when-hungry.patch b/jc_npcs-eat-when-hungry.patch index 2074bef..1c7bf0c 100644 --- a/jc_npcs-eat-when-hungry.patch +++ b/jc_npcs-eat-when-hungry.patch @@ -1,9 +1,9 @@ --- a/src/npcmove.cpp +++ b/src/npcmove.cpp -@@ -1829,7 +1829,9 @@ +@@ -1858,7 +1858,9 @@ } - if( one_in( 3 ) && ( get_thirst() > 40 || + if( one_in( 3 ) && ( get_thirst() > thirst_levels::thirsty || - get_stored_kcal() + stomach.get_calories() < get_healthy_kcal() * 0.95 ) ) { + get_stored_kcal() + stomach.get_calories() < get_healthy_kcal() * 0.95 || + ( get_hunger() > 160 && @@ -11,7 +11,7 @@ if( consume_food_from_camp() ) { return npc_noop; } -@@ -3697,12 +3699,15 @@ +@@ -3820,13 +3822,14 @@ return true; } faction *yours = g->u.get_faction(); @@ -19,12 +19,11 @@ + int camp_kcals = std::min( std::max( 0, get_healthy_kcal() - get_stored_kcal() - stomach.get_calories() ), yours->food_supply ); if( camp_kcals > 0 ) { + complain_about( "camp_food_thanks", 1_hours, "<camp_food_thanks>", false ); mod_hunger( -camp_kcals ); mod_stored_kcal( camp_kcals ); yours->food_supply -= camp_kcals; + stomach.mod_calories( camp_kcals ); -+ stomach.mod_contents( -2400_ml ); -+ stomach.mod_contents( 1200_ml ); return true; } - return false; + complain_about( "camp_larder_empty", 1_hours, "<camp_larder_empty>", false ); |