Stardew valley: Fix package and imports for apworld linux (#1842)

- Fix csv load to use explicitly imported self package instead of keyword __package__
- Fix init.py having a relative import to outside of the apworld
This commit is contained in:
agilbert1412 2023-05-28 19:00:33 -04:00 committed by GitHub
parent c9f217943e
commit abf4b3bcbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -10,7 +10,7 @@ from .logic import StardewLogic, StardewRule, True_
from .options import stardew_valley_options, StardewOptions, fetch_options
from .regions import create_regions
from .rules import set_rules
from ..generic.Rules import set_rule
from worlds.generic.Rules import set_rule
client_version = 0

View File

@ -1,6 +1,8 @@
from dataclasses import dataclass
from typing import List
from .. import data
@dataclass(frozen=True)
class SeedItem:
@ -23,7 +25,7 @@ def load_crop_csv():
except ImportError:
from importlib_resources import files # noqa
with files(__package__).joinpath("crops.csv").open() as file:
with files(data).joinpath("crops.csv").open() as file:
reader = csv.DictReader(file)
crops = []
seeds = []