From: Christian Heller Date: Wed, 9 Dec 2020 05:44:08 +0000 (+0100) Subject: Add hat spinning. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/index.html?a=commitdiff_plain;h=871008b21686f5e4b462568ff4520ea299dd496f;p=plomrogue2 Add hat spinning. --- diff --git a/plomrogue/tasks.py b/plomrogue/tasks.py index 6a88649..841a0e6 100644 --- a/plomrogue/tasks.py +++ b/plomrogue/tasks.py @@ -272,3 +272,4 @@ class Task_SPIN(Task): def do(self): self.thing.carrying.spin() + self.thing.send_msg('CHAT "You spin this object."') diff --git a/plomrogue/things.py b/plomrogue/things.py index ea0e71c..09cf7f0 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -201,6 +201,29 @@ class Thing_Hat(Thing): 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)