RoR2: code cleanup and styling consistency (#833)

* build locations dict dynamically from the TotalLocations option. Minor styling cleanup

* Minor items styling cleanup. remove unused event items

* minor options cleanup. clarify preset toggle slightly better

* make items.py more readable. add chaos weights dict to use as reference point for generation

* small rules styling and consistency cleanup

* create less regions and other init cleanup

* move region creation to less function calls and move revivals calculation

* typing

* use enum instead of hardcoded ints. fix bug i introduced

* better typing
This commit is contained in:
alwaysintreble
2022-08-20 18:09:35 -05:00
committed by GitHub
parent be8c3131d8
commit fb122df5f5
5 changed files with 206 additions and 203 deletions

View File

@@ -1,19 +1,13 @@
from typing import Dict
from BaseClasses import Location
import typing
from .Options import TotalLocations
class RiskOfRainLocation(Location):
game: str = "Risk of Rain 2"
# 37000 - 38000
base_location_table = {
"Victory": None,
}
# 37006 - 37506
item_pickups = {
f"ItemPickup{i}": 37005+i for i in range(1, 501)
item_pickups: Dict[str, int] = {
f"ItemPickup{i+1}": 37000+i for i in range(TotalLocations.range_end)
}
location_table = {**base_location_table, **item_pickups}
lookup_id_to_name: typing.Dict[int, str] = {id: name for name, id in location_table.items()}