intficpy/thing_base.py
def playerDumpsItems(
        self,
        into_location=None,
        success_msg=None,
        event="turn",
        preposition="in",
        **kwargs,
    ):
        """
        The result of a player trying to dump the items.

        Returns True on success, else False.

        :param into_location: the location to dump items into
        :type into_location: Thing
        """
        if not self.topLevelContentsList:
            self.game.addText(self.empty_msg)
            return False

        can_move = False
        if into_location:
            for t in self.topLevelContentsList:
                if into_location.playerAboutToAddItem(
                    t, preposition, event=event, **kwargs
                ):
                    can_move = True
        else:
            can_move = True

        if not can_move:
            return False

        if success_msg:
            self.game.addTextToEvent(event, success_msg)

        success = False

        if into_location:
            for t in self.topLevelContentsList:
                if into_location.playerAddsItem(t, preposition, event=event, **kwargs):
                    success = True
        else:
            for t in self.topLevelContentsList:
                # TODO: implement Room/PhysicalEntity playerAddsItem instead
                t.moveTo(self.game.me.location)
                success = True

        if not success:
            return False

        return True

        The result of a player trying to dump the items.

        Returns True on success, else False.

        :param into_location: the location to dump items into
        :type into_location: Thing
        
The result of a player trying to dump the items.
Returns True on success, else False.
The result of a player trying to dump the items . Returns True on success else False .
def playerDumpsItems(
        self,
        into_location=None,
        success_msg=None,
        event="turn",
        preposition="in",
        **kwargs,
    ):
        if not self.topLevelContentsList:
            self.game.addText(self.empty_msg)
            return False
        can_move = False
        if into_location:
            for t in self.topLevelContentsList:
                if into_location.playerAboutToAddItem(
                    t, preposition, event=event, **kwargs
                ):
                    can_move = True
        else:
            can_move = True
        if not can_move:
            return False
        if success_msg:
            self.game.addTextToEvent(event, success_msg)
        success = False
        if into_location:
            for t in self.topLevelContentsList:
                if into_location.playerAddsItem(t, preposition, event=event, **kwargs):
                    success = True
        else:
            for t in self.topLevelContentsList:
                t.moveTo(self.game.me.location)
                success = True
        if not success:
            return False
        return True
def playerDumpsItems ( self , into_location = None , success_msg = None , event = "turn" , preposition = "in" , ** kwargs , ) : if not self . topLevelContentsList : self . game . addText ( self . empty_msg ) return False can_move = False if into_location : for t in self . topLevelContentsList : if into_location . playerAboutToAddItem ( t , preposition , event = event , ** kwargs ) : can_move = True else : can_move = True if not can_move : return False if success_msg : self . game . addTextToEvent ( event , success_msg ) success = False if into_location : for t in self . topLevelContentsList : if into_location . playerAddsItem ( t , preposition , event = event , ** kwargs ) : success = True else : for t in self . topLevelContentsList : t . moveTo ( self . game . me . location ) success = True if not success : return False return True
The result of a player trying to dump the items.
The result of a player trying to dump the items .
"""
        The result of a player trying to dump the items.

        Returns True on success, else False.

        :param into_location: the location to dump items into
        :type into_location: Thing
        """ # TODO: implement Room/PhysicalEntity playerAddsItem instead
self
into_location
the location to dump items into
the location to dump items into
success_msg
event
preposition