home · contact · privacy
In hunger(), correct log messages on actually over-eating,not hungering.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 8 Sep 2015 11:15:49 +0000 (13:15 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 8 Sep 2015 11:15:49 +0000 (13:15 +0200)
roguelike-server

index 09940395b36e39d222f46f17abd850016d3bc231..258bae690579a9c0e2d1051c0fda2dc951c8e51f 100755 (executable)
@@ -770,7 +770,11 @@ def hunger(t):
     stomach = int(32767 / world_db["ThingTypes"][t["T_TYPE"]]["TT_LIFEPOINTS"])
     if int(int(testbase / stomach) / ((rand.next() % stomach) + 1)):
         if t == world_db["Things"][0]:
-            strong_write(io_db["file_out"], "LOG You suffer from hunger.\n")
+            if t["T_SATIATION"] < 0:
+                strong_write(io_db["file_out"], "LOG You suffer from hunger.\n")
+            else:
+                strong_write(io_db["file_out"],
+                             "LOG You suffer from over-eating.\n")
         decrement_lifepoints(t)