

def find_dropped_items(self, wanted=None, near=None):
    '\n        If ``near`` is a Vector3, the items are sorted by distance to ``near``.\n        '
    items = []
    for item in self.entities.objects:
        slot = slot_from_item(item)
        if (not slot):
            continue
        if near:
            items.append((item, slot))
        else:
            (yield (item, slot))
    if near:
        dist = near.dist_sq
        for (d, item, slot) in sorted(((dist(Vec(i)), i, s) for (i, s) in items)):
            (yield (item, slot))

dataset/ETHPy150Open Gjum/Bat/bat/bat.py BatPlugin.find_dropped_items/original