Skip to content

Commit

Permalink
Break everything
Browse files Browse the repository at this point in the history
  • Loading branch information
yannl35133 committed Feb 6, 2024
1 parent 044d416 commit c6124fe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions logic/assumed_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def randomize(self, useroutput: UserOutput):

self.rng.shuffle(self.must_be_placed_items)
self.rng.shuffle(self.may_be_placed_items)
self.may_be_placed_items += self.must_be_placed_items
self.must_be_placed_items = []

self.logic.add_item(BANNED_BIT)
for item in self.must_be_placed_items:
Expand Down
16 changes: 9 additions & 7 deletions logic/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,17 @@ def __or__(self, other: Placement) -> Placement:
# locations
for location, item in other.locations.items():
if location in self.locations and item != self.locations[location]:
raise ValueError(
f"Found location '{location}' in self.locations. Expected item '{item}' but found item '{self.locations[location]}'."
)
pass
# raise ValueError(
# f"Found location '{location}' in self.locations. Expected item '{item}' but found item '{self.locations[location]}'."
# )
# items
for item, location in other.items.items():
if item in self.items and location != self.items[item]:
raise ValueError(
f"Found item '{item}' in self.items. Expected location '{location}' but found location '{self.items[item]}'."
)
pass
# raise ValueError(
# f"Found item '{item}' in self.items. Expected location '{location}' but found location '{self.items[item]}'."
# )
# stones
for k, v in other.stones.items():
if k in self.stones and v != self.stones[k]:
Expand Down Expand Up @@ -505,7 +507,7 @@ def place_item(self, location: EIN, item: EIN, hint_mode=False, fill=True):
name = ""
else:
name = "Item "
raise ValueError(f"{name}{item} is already placed.")
# raise ValueError(f"{name}{item} is already placed.")

if item in self.placement.item_placement_limit and not location.startswith(
self.placement.item_placement_limit[item]
Expand Down
3 changes: 3 additions & 0 deletions logic/randomize.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ def set_placement_options(self):
for trick_name in OPTIONS["enabled-tricks-bitless"]["choices"]
}

self.placement |= norm_keys({loc: EIN("Whip") for loc in self.areas.checks})(
lambda x: x
)
self.placement |= SINGLE_CRYSTAL_PLACEMENT(self.norm, self.areas.checks)

vanilla_map_transitions = {}
Expand Down

0 comments on commit c6124fe

Please sign in to comment.