intficpy/thing_base.py
def playerAboutToAddItem(self, item, preposition, event="turn", **kwargs):
        """
        The prepartations we make when the player is about to try to add an item
        to this item. Performs any implicit actions needed to add the item.
        Returns True if the item addition is allowed, False otherwise.
        :param item: the item to attempt to add
        :type item: Thing
        :param preposition: the contains preposition the player wants to add the item with
            (in/on/etc.)
        :type preposition: str
        """
        matching_children = [
            c for c in self.children if c.contains_preposition == preposition
        ]
        if len(matching_children) == 1:
            if not item.playerAboutToMoveTo(matching_children[0], event=event):
                return False
            return True

        if not item.playerAboutToMoveTo(self, event=event):
            return False

        if self is self.game.me.getOutermostLocation().floor:
            return True

        self.game.addText(
            self.default_cannot_add_item_msg.format(self=self, preposition=preposition)
        )
        return False

        The prepartations we make when the player is about to try to add an item
        to this item. Performs any implicit actions needed to add the item.
        Returns True if the item addition is allowed, False otherwise.
        :param item: the item to attempt to add
        :type item: Thing
        :param preposition: the contains preposition the player wants to add the item with
            (in/on/etc.)
        :type preposition: str
        
The prepartations we make when the player is about to try to add an item
to this item. Performs any implicit actions needed to add the item.
Returns True if the item addition is allowed, False otherwise.
The prepartations we make when the player is about to try to add an item to this item . Performs any implicit actions needed to add the item . Returns True if the item addition is allowed False otherwise .
def playerAboutToAddItem(self, item, preposition, event="turn", **kwargs):
        matching_children = [
            c for c in self.children if c.contains_preposition == preposition
        ]
        if len(matching_children) == 1:
            if not item.playerAboutToMoveTo(matching_children[0], event=event):
                return False
            return True
        if not item.playerAboutToMoveTo(self, event=event):
            return False
        if self is self.game.me.getOutermostLocation().floor:
            return True
        self.game.addText(
            self.default_cannot_add_item_msg.format(self=self, preposition=preposition)
        )
        return False
def playerAboutToAddItem ( self , item , preposition , event = "turn" , ** kwargs ) : matching_children = [ c for c in self . children if c . contains_preposition == preposition ] if len ( matching_children ) == 1 : if not item . playerAboutToMoveTo ( matching_children [ 0 ] , event = event ) : return False return True if not item . playerAboutToMoveTo ( self , event = event ) : return False if self is self . game . me . getOutermostLocation ( ) . floor : return True self . game . addText ( self . default_cannot_add_item_msg . format ( self = self , preposition = preposition ) ) return False
The prepartations we make when the player is about to try to add an item
to this item.
The prepartations we make when the player is about to try to add an item to this item .
"""
        The prepartations we make when the player is about to try to add an item
        to this item. Performs any implicit actions needed to add the item.
        Returns True if the item addition is allowed, False otherwise.
        :param item: the item to attempt to add
        :type item: Thing
        :param preposition: the contains preposition the player wants to add the item with
            (in/on/etc.)
        :type preposition: str
        """
self
item
the item to attempt to add
the item to attempt to add
preposition
the contains preposition the player wants to add the item with
(in/on/etc.)
the contains preposition the player wants to add the item with ( in / on / etc . )
event