home · contact · privacy
Disallow picking up thing already carried by other player.
[plomrogue2] / plomrogue / things.py
index 18cdf4c78069e9273e411c38223f4baae080a38f..4f802db6e25a9f340a9da02074b219d80502b0ab 100644 (file)
@@ -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