Skip to content

Commit

Permalink
made 2 variables lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
wossnameGitHub committed Jul 12, 2024
1 parent bb5862c commit 7fe7812
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
24 changes: 12 additions & 12 deletions Dolphin scripts/Entrance Randomizer/lib/entrance_rando.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ class Priority(IntEnum):
if CONFIGS.STARTING_AREA is not None:
starting_area = CONFIGS.STARTING_AREA

TRANSITION_INFOS_DICT_RANDO = TRANSITION_INFOS_DICT.copy()
ALL_POSSIBLE_TRANSITIONS_RANDO = ALL_POSSIBLE_TRANSITIONS
transition_infos_dict_rando = TRANSITION_INFOS_DICT.copy()
all_possible_transitions_rando = ALL_POSSIBLE_TRANSITIONS

transitions_map: dict[tuple[int, int], Transition] = {}

Expand Down Expand Up @@ -232,15 +232,15 @@ def increment_index(


def delete_exit(area: Area, ex: Exit):
TRANSITION_INFOS_DICT_RANDO[area.area_id] = Area(
transition_infos_dict_rando[area.area_id] = Area(
area.area_id,
area.name,
area.default_entrance,
tuple([x for x in TRANSITION_INFOS_DICT_RANDO[area.area_id].exits if x != ex]),
tuple([x for x in transition_infos_dict_rando[area.area_id].exits if x != ex]),
)
global ALL_POSSIBLE_TRANSITIONS_RANDO
ALL_POSSIBLE_TRANSITIONS_RANDO = [
x for x in ALL_POSSIBLE_TRANSITIONS_RANDO
global all_possible_transitions_rando
all_possible_transitions_rando = [
x for x in all_possible_transitions_rando
if x != (area.area_id, ex.area_id)
]

Expand All @@ -254,7 +254,7 @@ def remove_disabled_exits():


def initialize_connections_left():
for area in TRANSITION_INFOS_DICT_RANDO.values():
for area in transition_infos_dict_rando.values():
__connections_left[area.area_id] = len(area.exits)


Expand Down Expand Up @@ -505,14 +505,14 @@ def set_transitions_map(): # noqa: PLR0915 # TODO: Break up in smaller function
initialize_connections_left()

if not CONFIGS.SKIP_JAGUAR:
starting_default = TRANSITION_INFOS_DICT_RANDO[starting_area].default_entrance
starting_default = transition_infos_dict_rando[starting_area].default_entrance
tutorial_original = Transition(from_=LevelCRC.JAGUAR, to=LevelCRC.PLANE_CUTSCENE)
tutorial_redirect = Transition(from_=starting_default, to=starting_area)
transitions_map[tutorial_original] = tutorial_redirect

global _possible_origins_bucket, _possible_redirections_bucket

_possible_origins_bucket = list(starmap(Transition, ALL_POSSIBLE_TRANSITIONS_RANDO))
_possible_origins_bucket = list(starmap(Transition, all_possible_transitions_rando))
_possible_redirections_bucket = _possible_origins_bucket.copy()

if CONFIGS.LINKED_TRANSITIONS:
Expand All @@ -525,7 +525,7 @@ def set_transitions_map(): # noqa: PLR0915 # TODO: Break up in smaller function
random.shuffle(closed_door_levels)

level_list = [
area for area in TRANSITION_INFOS_DICT_RANDO.values()
area for area in transition_infos_dict_rando.values()
if __connections_left[area.area_id] > 0
]
random.shuffle(level_list)
Expand Down Expand Up @@ -610,7 +610,7 @@ def set_transitions_map(): # noqa: PLR0915 # TODO: Break up in smaller function
# Ground rules:
# 1. you can't make a transition from a level to itself
_possible_redirections_bucket.extend(one_way_exits)
for area in TRANSITION_INFOS_DICT_RANDO.values():
for area in transition_infos_dict_rando.values():
for to_og in (exit_.area_id for exit_ in area.exits):
original = Transition(from_=area.area_id, to=to_og)
redirect = get_random_one_way_redirection(original)
Expand Down
8 changes: 4 additions & 4 deletions Dolphin scripts/Entrance Randomizer/lib/graph_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from lib.constants import * # noqa: F403
from lib.constants import __version__
from lib.entrance_rando import TRANSITION_INFOS_DICT_RANDO
from lib.entrance_rando import transition_infos_dict_rando
from lib.types_ import SeedType


Expand Down Expand Up @@ -67,7 +67,7 @@ def create_vertices(
# The same logic applies to the Spirit Fights:
# these will never appear on the map, therefore we remove the (Harry) suffix.
area_name = (
TRANSITION_INFOS_DICT_RANDO
transition_infos_dict_rando
[area_id]
.name
.replace(" (Day)", "")
Expand Down Expand Up @@ -117,8 +117,8 @@ def edge_text(
if direct == Direction.TWOWAY:
direct_str = "false"
output = (
f'<edge source="{TRANSITION_INFOS_DICT_RANDO[start].area_id}" '
+ f'target="{TRANSITION_INFOS_DICT_RANDO[end].area_id}" isDirect="{direct_str}" '
f'<edge source="{transition_infos_dict_rando[start].area_id}" '
+ f'target="{transition_infos_dict_rando[end].area_id}" isDirect="{direct_str}" '
+ f'id="{counter}"'
)
if line_type == LineType.DASHED or color is not None:
Expand Down

0 comments on commit 7fe7812

Please sign in to comment.