home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enable sinking into and getting up from terrain tagged as sittable.
[plomrogue2]
/
plomrogue
/
things.py
diff --git
a/plomrogue/things.py
b/plomrogue/things.py
index 666a14d6f2301dc9e901d67ceeef4874f87eeb17..6ad8534317476c3c92a2591141253d452ce96ae1 100644
(file)
--- a/
plomrogue/things.py
+++ b/
plomrogue/things.py
@@
-564,6
+564,7
@@
class Thing_Player(ThingAnimate):
drunk = 0
tripping = 0
need_for_toilet = 0
drunk = 0
tripping = 0
need_for_toilet = 0
+ standing = True
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@
-576,7
+577,7
@@
class Thing_Player(ThingAnimate):
if self.tripping >= 0:
self.tripping -= 1
if self.need_for_toilet > 0:
if self.tripping >= 0:
self.tripping -= 1
if self.need_for_toilet > 0:
- self.need_for_toilet
*= 1.0
1
+ self.need_for_toilet
+=
1
terrain = self.game.maps[self.position[0]][self.position[1]]
if terrain in self.game.terrains:
terrain_type = self.game.terrains[terrain]
terrain = self.game.maps[self.position[0]][self.position[1]]
if terrain in self.game.terrains:
terrain_type = self.game.terrains[terrain]
@@
-584,7
+585,10
@@
class Thing_Player(ThingAnimate):
self.send_msg('CHAT "You use the toilet. What a relief!"')
self.need_for_toilet = 0
if 10000 * random.random() < self.need_for_toilet / 100000:
self.send_msg('CHAT "You use the toilet. What a relief!"')
self.need_for_toilet = 0
if 10000 * random.random() < self.need_for_toilet / 100000:
- self.send_msg('CHAT "You need to use a toilet."')
+ self.send_msg('CHAT "You need to go to a toilet. %s"' % self.need_for_toilet)
+ if self.need_for_toilet > 1000000:
+ self.send_msg('CHAT "You pee into your pants. Eww!"')
+ self.need_for_toilet = 0
if self.drunk == 0:
self.send_msg('CHAT "You sober up."')
self.invalidate('fov')
if self.drunk == 0:
self.send_msg('CHAT "You sober up."')
self.invalidate('fov')