Skip to content

Commit

Permalink
Stardew valley: Fix package and imports for apworld linux (Archipelag…
Browse files Browse the repository at this point in the history
…oMW#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
  • Loading branch information
agilbert1412 authored May 28, 2023
1 parent c9f2179 commit abf4b3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion worlds/stardew_valley/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
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

Expand Down
4 changes: 3 additions & 1 deletion worlds/stardew_valley/data/crops_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from dataclasses import dataclass
from typing import List

from .. import data


@dataclass(frozen=True)
class SeedItem:
Expand All @@ -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 = []
Expand Down

0 comments on commit abf4b3b

Please sign in to comment.