From: Christian Heller Date: Wed, 16 Dec 2020 18:56:50 +0000 (+0100) Subject: Return cookie chars sorted. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/day_todos?a=commitdiff_plain;h=6a16b94fff101209e90ce93ee53847d84a25da5c;p=plomrogue2 Return cookie chars sorted. --- diff --git a/plomrogue/things.py b/plomrogue/things.py index dd14db5..4cc3512 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -626,6 +626,9 @@ class Thing_Player(ThingAnimate): self.game.players_hat_chars[self.name] += c def get_cookie_chars(self): + chars = ' #' # default if self.name in self.game.players_hat_chars: - return self.game.players_hat_chars[self.name] - return ' #' # default + chars = self.game.players_hat_chars[self.name] + chars_split = list(chars) + chars_split.sort() + return ''.join(chars_split)