X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=plomrogue%2Fthings.py;h=4f802db6e25a9f340a9da02074b219d80502b0ab;hb=028871514fd40755055facc5883a4f8076dcebad;hp=18cdf4c78069e9273e411c38223f4baae080a38f;hpb=8d0b5840b7df40ee883fdcf2fa1b4cd1d39e26fa;p=plomrogue2 diff --git a/plomrogue/things.py b/plomrogue/things.py index 18cdf4c..4f802db 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -22,6 +22,7 @@ class Thing(ThingBase): portable = False protection = '.' commandable = False + carried = False def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) @@ -436,3 +437,9 @@ class Thing_Player(ThingAnimate): if self.game.sessions[c_id]['thing_id'] == self.id_: self.game.io.send(msg, c_id) break + + def uncarry(self): + t = self.carrying + t.carried = False + self.carrying = None + return t