home · contact · privacy
Add hat spinning.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 9 Dec 2020 05:44:08 +0000 (06:44 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 9 Dec 2020 05:44:08 +0000 (06:44 +0100)
plomrogue/tasks.py
plomrogue/things.py

index 6a886496658f4c228e33563fb6958a09c8efe4cc..841a0e663d0f343542dd7e0dd96476f37a5151e3 100644 (file)
@@ -272,3 +272,4 @@ class Task_SPIN(Task):
 
     def do(self):
         self.thing.carrying.spin()
 
     def do(self):
         self.thing.carrying.spin()
+        self.thing.send_msg('CHAT "You spin this object."')
index ea0e71ccb912aee1ce9ae60ea34a6b23a4dd44fa..09cf7f0b8bac496e17c2e980494afd369ce09dcb 100644 (file)
@@ -201,6 +201,29 @@ class Thing_Hat(Thing):
     symbol_hint = 'H'
     portable = True
     design = ' +--+ ' + ' |  | ' + '======'
     symbol_hint = 'H'
     portable = True
     design = ' +--+ ' + ' |  | ' + '======'
+    spinnable = True
+
+    def spin(self):
+        new_design = ''
+        new_design += self.design[12]
+        new_design += self.design[13]
+        new_design += self.design[6]
+        new_design += self.design[7]
+        new_design += self.design[0]
+        new_design += self.design[1]
+        new_design += self.design[14]
+        new_design += self.design[15]
+        new_design += self.design[8]
+        new_design += self.design[9]
+        new_design += self.design[2]
+        new_design += self.design[3]
+        new_design += self.design[16]
+        new_design += self.design[17]
+        new_design += self.design[10]
+        new_design += self.design[11]
+        new_design += self.design[4]
+        new_design += self.design[5]
+        self.design = ''.join(new_design)