X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7Bcard_id%7D%7D/form?a=blobdiff_plain;f=plomrogue%2Fthings.py;h=30cd2bfe104fdd2a36836b87a401f6d33cc555f2;hb=6354f0d85ce38a5450142b2bc775e49f0abfc7b8;hp=67a3807fc939b88df98716d61392065d2511e496;hpb=018bb0242ebd2b7e9fde170fae830376dea55e16;p=plomrogue2 diff --git a/plomrogue/things.py b/plomrogue/things.py index 67a3807..30cd2bf 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -158,7 +158,6 @@ class Thing_MusicPlayer(Thing): symbol_hint = 'R' commandable = True portable = True - playlist = [] repeat = True next_song_start = datetime.datetime.now() playlist_index = 0 @@ -167,6 +166,7 @@ class Thing_MusicPlayer(Thing): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.next_song_start = datetime.datetime.now() + self.playlist = [] def proceed(self): if (not self.playing) or len(self.playlist) == 0: @@ -250,6 +250,30 @@ class Thing_MusicPlayer(Thing): +class Thing_BottleDeposit(Thing): + bottle_counter = 0 + symbol_hint = 'O' + + def proceed(self): + if self.bottle_counter >= 3: + self.bottle_counter = 0 + t = self.game.thing_types['MusicPlayer'](self.game, + position=self.position) + self.game.things += [t] + self.sound('BOTTLE DEPOSITOR', + 'here is a gift as a reward for ecological consciousness –' + 'use "command thing" on it to learn more!') + self.game.changed = True + + def accept(self): + self.bottle_counter += 1 + self.sound('BOTTLE DEPOSITOR', + 'thanks for this empty bottle – deposit %s more for a gift!' % + (3 - self.bottle_counter)) + + + + class ThingAnimate(Thing): blocking = True drunk = 0