From: Christian Heller Date: Thu, 3 Dec 2020 05:31:07 +0000 (+0100) Subject: Make fullness/emptiness of bottles visible via .thing_char. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/%7B%7Bdb.prefix%7D%7D/%7Broute%7D?a=commitdiff_plain;h=d56384f9b6c88bab666162a0f97d7e64f2b3951c;p=plomrogue2 Make fullness/emptiness of bottles visible via .thing_char. --- diff --git a/plomrogue/tasks.py b/plomrogue/tasks.py index 423758d..8fa3a17 100644 --- a/plomrogue/tasks.py +++ b/plomrogue/tasks.py @@ -148,6 +148,7 @@ class Task_INTOXICATE(Task): def do(self): self.thing.carrying.full = False + self.thing.carrying.empty() for c_id in self.thing.game.sessions: if self.thing.game.sessions[c_id]['thing_id'] == self.thing.id_: self.thing.game.io.send('RANDOM_COLORS', c_id) diff --git a/plomrogue/things.py b/plomrogue/things.py index 30cd2bf..1c99737 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -145,6 +145,11 @@ class Thing_Bottle(Thing): symbol_hint = 'B' portable = True full = True + thing_char = '~' + + def empty(self): + self.thing_char = '_' + self.full = False