home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only allow cookable items to be cooked into cookies.
[plomrogue2]
/
plomrogue
/
tasks.py
diff --git
a/plomrogue/tasks.py
b/plomrogue/tasks.py
index 6ee273164f19dd33422c99c21d708f71cab21dc8..9b53bbe86f98fdc0efe08cede71c0870fb3e3d17 100644
(file)
--- a/
plomrogue/tasks.py
+++ b/
plomrogue/tasks.py
@@
-67,7
+67,8
@@
class Task_MOVE(Task):
terrain_type = self.thing.game.terrains[terrain]
if 'sittable' in terrain_type.tags:
self.thing.standing = False
terrain_type = self.thing.game.terrains[terrain]
if 'sittable' in terrain_type.tags:
self.thing.standing = False
- self.thing.send_msg('CHAT "You sink into the %s."'
+ self.thing.send_msg('CHAT "You sink into the %s.'
+ 'Staying here will reduce your weariness."'
% terrain_type.description)
self.thing.invalidate('fov')
if self.thing.blocks_light:
% terrain_type.description)
self.thing.invalidate('fov')
if self.thing.blocks_light:
@@
-154,6
+155,12
@@
class Task_DROP(Task):
if t.type_ == 'BottleDeposit'
and t.position == target_position]:
raise PlayError('cannot drop full bottle into bottle deposit')
if t.type_ == 'BottleDeposit'
and t.position == target_position]:
raise PlayError('cannot drop full bottle into bottle deposit')
+ for t in [t for t in self.thing.game.things
+ if t.type_ == 'CookieSpawner'
+ and t.position == target_position]:
+ if not self.thing.carrying.cookable:
+ raise PlayError('cannot cook items of this type')
+ break
def do(self):
target_position = self._get_move_target()
def do(self):
target_position = self._get_move_target()
@@
-239,7
+246,7
@@
class Task_INTOXICATE(Task):
self.thing.carrying.full = False
self.thing.carrying.empty()
self.thing.send_msg('CHAT "You are drunk now."')
self.thing.carrying.full = False
self.thing.carrying.empty()
self.thing.send_msg('CHAT "You are drunk now."')
- self.thing.need_for_toilet += 1
0000
+ self.thing.need_for_toilet += 1
self.thing.drunk = 10000
self.thing.invalidate('fov')
self.thing.game.record_change(self.thing.position, 'other')
self.thing.drunk = 10000
self.thing.invalidate('fov')
self.thing.game.record_change(self.thing.position, 'other')