home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TCE: Add limit to drinking.
[plomrogue]
/
plugins
/
server
/
TheCrawlingEater.py
diff --git
a/plugins/server/TheCrawlingEater.py
b/plugins/server/TheCrawlingEater.py
index 4e8a3f8ad0e0d36dce8a4c9189440d22beec366f..1fc7e0c5737cd0e7cb38b0827388812e9850ff07 100644
(file)
--- 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
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):
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
log("You DRINK.")
t["T_BLADDER"] += 1