X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=plomrogue%2Fthings.py;h=4f802db6e25a9f340a9da02074b219d80502b0ab;hb=497f9b478cdaf0ad1825d95d612caab33ba7c403;hp=18cdf4c78069e9273e411c38223f4baae080a38f;hpb=3484a01e592bafc9d573b878ff94ef5e64755476;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