intficpy/thing_base.py
def playerAboutToTake(self, event="turn", **kwargs):
        """
        Actions carried out when the player is about to try and take this item.

        :param event: the event name to print to
        :type event: str
        """
        if not self.invItem or self.parent_obj:
            self.game.addTextToEvent(event, self.cannotTakeMsg)
            return False
        if self.game.me.topLevelContainsItem(self):
            self.game.addTextToEvent(
                event, f"You already have {self.lowNameArticle(True)}. "
            )
            return False
        if self.containsItem(self.game.me):
            self.game.addTextToEvent(
                event, f"(First trying to leave {self.lowNameArticle(True)})"
            )
            if not self.playerExits(event=event):
                return False
        if not self.location.playerAboutToRemoveItem(self):
            return False
        return True

        Actions carried out when the player is about to try and take this item.

        :param event: the event name to print to
        :type event: str
        
Actions carried out when the player is about to try and take this item.
Actions carried out when the player is about to try and take this item .
def playerAboutToTake(self, event="turn", **kwargs):
        if not self.invItem or self.parent_obj:
            self.game.addTextToEvent(event, self.cannotTakeMsg)
            return False
        if self.game.me.topLevelContainsItem(self):
            self.game.addTextToEvent(
                event, f"You already have {self.lowNameArticle(True)}. "
            )
            return False
        if self.containsItem(self.game.me):
            self.game.addTextToEvent(
                event, f"(First trying to leave {self.lowNameArticle(True)})"
            )
            if not self.playerExits(event=event):
                return False
        if not self.location.playerAboutToRemoveItem(self):
            return False
        return True
def playerAboutToTake ( self , event = "turn" , ** kwargs ) : if not self . invItem or self . parent_obj : self . game . addTextToEvent ( event , self . cannotTakeMsg ) return False if self . game . me . topLevelContainsItem ( self ) : self . game . addTextToEvent ( event , f"You already have {self.lowNameArticle(True)}. " ) return False if self . containsItem ( self . game . me ) : self . game . addTextToEvent ( event , f"(First trying to leave {self.lowNameArticle(True)})" ) if not self . playerExits ( event = event ) : return False if not self . location . playerAboutToRemoveItem ( self ) : return False return True
Actions carried out when the player is about to try and take this item.
Actions carried out when the player is about to try and take this item .
"""
        Actions carried out when the player is about to try and take this item.

        :param event: the event name to print to
        :type event: str
        """
self
event
the event name to print to
the event name to print to