+def play_drink():
+ if action_exists("drink") and world_db["WORLD_ACTIVE"]:
+ 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"]] and \
+ t["T_BLADDER"] < 32:
+ log("You DRINK.")
+ t["T_BLADDER"] += 1
+
+
+def play_pee():
+ if action_exists("pee") and world_db["WORLD_ACTIVE"]:
+ if world_db["Things"][0]["T_BLADDER"] < 1:
+ log("Nothing to drop from empty bladder.")
+ return
+ world_db["set_command"]("pee")
+
+
+def actor_pee(t):
+ if t["T_BLADDER"] < 1:
+ return
+ if t == world_db["Things"][0]:
+ log("You LOSE fluid.")
+ terrain = world_db["MAP"][t["pos"]]
+ t["T_BLADDER"] -= 1
+
+