From d9b6e12b2f12f22e723fddcafc77126e17c08801 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 9 Mar 2016 23:21:51 +0100 Subject: [PATCH] TCE: Add limit to drinking. --- plugins/server/TheCrawlingEater.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/server/TheCrawlingEater.py b/plugins/server/TheCrawlingEater.py index 4e8a3f8..1fc7e0c 100644 --- a/plugins/server/TheCrawlingEater.py +++ b/plugins/server/TheCrawlingEater.py @@ -11,11 +11,15 @@ def play_drink(): if ord("~") != world_db["MAP"][world_db["Things"][0]["pos"]]: log("NOTHING to drink here.") return + elif world_db["Things"][0]["T_BLADDER"] >= 32: + log("You're too FULL to drink more.") + return world_db["set_command"]("drink") def actor_drink(t): - if ord("~") == world_db["MAP"][world_db["Things"][0]["pos"]]: + if ord("~") == world_db["MAP"][world_db["Things"][0]["pos"]] and \ + t["T_BLADDER"] < 32: log("You DRINK.") t["T_BLADDER"] += 1 -- 2.30.2