textworld/generator/world.py [400:414]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        locked_or_closed_objects = []
        lockable_objects = []
        for s in self.facts:
            # Look for containers and supporters to put stuff in/on them.
            if s.name == "at" and s.arguments[0].type in ["c", "s"] and s.arguments[1].name == room.name:
                objects_holder.append(s.arguments[0])

            # Look for containers and doors without a matching key.
            if s.name == "at" and s.arguments[0].type in ["c", "d"] and s.arguments[1].name == room.name:
                obj_propositions = [p.name for p in self.facts if s.arguments[0].name in p.names]
                if "match" not in obj_propositions and s.arguments[0] not in lockable_objects:
                    lockable_objects.append(s.arguments[0])

                    if "locked" in obj_propositions or "closed" in obj_propositions:
                        locked_or_closed_objects.append(s.arguments[0])
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



textworld/generator/world.py [518:532]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        locked_or_closed_objects = []
        lockable_objects = []
        for s in self.facts:
            # Look for containers and supporters to put stuff in/on them.
            if s.name == "at" and s.arguments[0].type in ["c", "s"] and s.arguments[1].name == room.name:
                objects_holder.append(s.arguments[0])

            # Look for containers and doors without a matching key.
            if s.name == "at" and s.arguments[0].type in ["c", "d"] and s.arguments[1].name == room.name:
                obj_propositions = [p.name for p in self.facts if s.arguments[0].name in p.names]
                if "match" not in obj_propositions and s.arguments[0] not in lockable_objects:
                    lockable_objects.append(s.arguments[0])

                    if "locked" in obj_propositions or "closed" in obj_propositions:
                        locked_or_closed_objects.append(s.arguments[0])
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



