home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
2720886
)
TCE: Add limit to drinking.
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 9 Mar 2016 22:21:51 +0000
(23:21 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 9 Mar 2016 22:21:51 +0000
(23:21 +0100)
plugins/server/TheCrawlingEater.py
patch
|
blob
|
history
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
+ 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