Skip to content

Commit 0b8ebfc

Browse files
agilbert1412FlySniper
authored andcommitted
Stardew valley: Fix package and imports for apworld linux (ArchipelagoMW#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
1 parent cba6e91 commit 0b8ebfc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

worlds/stardew_valley/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from .options import stardew_valley_options, StardewOptions, fetch_options
1111
from .regions import create_regions
1212
from .rules import set_rules
13-
from ..generic.Rules import set_rule
13+
from worlds.generic.Rules import set_rule
1414

1515
client_version = 0
1616

worlds/stardew_valley/data/crops_data.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from dataclasses import dataclass
22
from typing import List
33

4+
from .. import data
5+
46

57
@dataclass(frozen=True)
68
class SeedItem:
@@ -23,7 +25,7 @@ def load_crop_csv():
2325
except ImportError:
2426
from importlib_resources import files # noqa
2527

26-
with files(__package__).joinpath("crops.csv").open() as file:
28+
with files(data).joinpath("crops.csv").open() as file:
2729
reader = csv.DictReader(file)
2830
crops = []
2931
seeds = []

0 commit comments

Comments
 (0)