self.thing.send_msg('CHAT "You sink into the %s. '
'Staying here will replenish your energy."'
% terrain_type.description)
+ for t in [t for t in self.thing.game.things
+ if t.type_ == 'Chair' and t.position == self.thing.position]:
+ self.thing.standing = False
+ self.thing.send_msg('CHAT "You sink into the Chair. '
+ 'Staying here will replenish your energy."')
self.thing.invalidate('fov')
if self.thing.blocks_light:
self.thing.game.record_change(self.thing.position, 'fov')
cookable = False
carried = False
consumable = False
+ sittable = False
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
+class Thing_Chair(Thing):
+ symbol_hint = 'h'
+ portable = True
+ sittable = True
+
+
+
+class Thing_ChairSpawner(ThingSpawner):
+ symbol_hint = 'e'
+ child_type = 'Chair'
+
+
+
class Thing_Cookie(Thing):
symbol_hint = 'c'
portable = True
Thing_PsychedelicSpawner, Thing_DoorKey,
Thing_Crate, Thing_CrateSpawner, Thing_Stimulant,
Thing_StimulantSpawner, Thing_Sign,
- Thing_SignSpawner)
+ Thing_SignSpawner, Thing_Chair, Thing_ChairSpawner)
from plomrogue.config import config
game = Game(config['savefile'])
game.register_thing_type(Thing_StimulantSpawner)
game.register_thing_type(Thing_Sign)
game.register_thing_type(Thing_SignSpawner)
+game.register_thing_type(Thing_Chair)
+game.register_thing_type(Thing_ChairSpawner)
game.read_savefile()
game.io.start_loop()
for port in config['servers']: