Exemple #1
0
    def destroy(self):
        'Get rid of this item and remove it from the index.'

        container = self.container
        room = self.room

        if container is not None:
            container.remove(self)

        remove(self)
        TZContainer.destroy(self)

        if room is not None:
            room.action(dict(act='destroy_item', actor=None, item=self))
Exemple #2
0
    def destroy(self):
        '''Get rid of this room and remove it from the index.

        All outgoing exits will also be destroyed.
        Any mob in the room will be teleported to its home. If this room
            is its home, the mob will be destroyed.
        Any player in the room will be teleported to its home.

        As with a TZContainer, any item in the room will be destroyed.

        '''

        for x in self.exits():
            x.destroy()
        for mob in self.mobs():
            if mob.home is self:
                mob.destroy()
            else:
                mob.teleport(mob.home)
        for player in self.players():
            player.teleport(player.home)
        remove(self)
        TZContainer.destroy(self)