X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/copy_structured?a=blobdiff_plain;f=plomrogue%2Fthings.py;h=2c12cf283e41cc5b788d37c35d1fabe23225ba17;hb=ed297e4e19f8a83872d6345b86321e10aec019d4;hp=c49b204f1c2e320036ab5cd19b4d2b330fec980c;hpb=1b0d4f5fef925f2f7811fd32be1c773ab813c49e;p=plomrogue2 diff --git a/plomrogue/things.py b/plomrogue/things.py index c49b204..2c12cf2 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -163,6 +163,19 @@ class Thing_BottleSpawner(ThingSpawner): +class Thing_Hat(Thing): + symbol_hint = 'H' + portable = True + design = ' X X ===' + + + +class Thing_HatSpawner(ThingSpawner): + child_type = 'Hat' + + + + import datetime class Thing_MusicPlayer(Thing): symbol_hint = 'R' @@ -225,6 +238,14 @@ class Thing_MusicPlayer(Thing): return ['playing'] else: return ['paused'] + elif command == 'REMOVE': + if len(self.playlist) == 0: + return ['playlist already empty'] + del self.playlist[max(0, self.playlist_index)] + self.playlist_index -= 1 + if self.playlist_index < -1: + self.playlist_index = -1 + return ['removed song'] elif command == 'REWIND': self.playlist_index = -1 self.next_song_start = datetime.datetime.now()