+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'
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()