summaryrefslogtreecommitdiff
path: root/jc_stop-non-faction-npc-malnourishment.patch
blob: 33781d775d9a080a69000a8f0420fb5c23bbb1ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- a/src/npcmove.cpp
+++ b/src/npcmove.cpp
@@ -116,6 +116,14 @@
 static const efftype_id effect_onfire( "onfire" );
 static const efftype_id effect_stunned( "stunned" );
 
+const vitamin_id vitamin_calcium( "calcium" );
+const vitamin_id vitamin_iron( "iron" );
+const vitamin_id vitamin_vitA( "vitA" );
+const vitamin_id vitamin_vitB( "vitB" );
+const vitamin_id vitamin_vitC( "vitC" );
+const vitamin_id vitamin_mutant_toxin( "mutant_toxin" );
+const vitamin_id vitamin_bad_food( "bad_food" );
+
 static constexpr float NPC_DANGER_VERY_LOW = 5.0f;
 static constexpr float NPC_DANGER_MAX = 150.0f;
 static constexpr float MAX_FLOAT = 5000000000.0f;
@@ -3856,6 +3864,14 @@
             // TODO: Remove this and let player "exploit" hungry NPCs
             set_hunger( 0 );
             set_thirst( 0 );
+            set_stored_kcal( get_healthy_kcal() );
+            vitamin_set( vitamin_calcium, 0 );
+            vitamin_set( vitamin_iron, 0 );
+            vitamin_set( vitamin_vitA, 0 );
+            vitamin_set( vitamin_vitB, 0 );
+            vitamin_set( vitamin_vitC, 0 );
+            vitamin_set( vitamin_mutant_toxin, 0 );
+            vitamin_set( vitamin_bad_food, 0 );
         }
         return false;
     }