Stardew Valley: Refactor Animals to use Content Packs (#4320)
This commit is contained in:
23
worlds/stardew_valley/data/animal.py
Normal file
23
worlds/stardew_valley/data/animal.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
from .game_item import Source
|
||||
from ..strings.animal_names import Animal as AnimalName
|
||||
|
||||
assert AnimalName
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Animal:
|
||||
name: str
|
||||
required_building: str = field(kw_only=True)
|
||||
sources: tuple[Source, ...] = field(kw_only=True)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class IncubatorSource(Source):
|
||||
egg_item: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class OstrichIncubatorSource(Source):
|
||||
egg_item: str
|
||||
@@ -143,7 +143,7 @@ duck_egg = BundleItem(AnimalProduct.duck_egg)
|
||||
rabbit_foot = BundleItem(AnimalProduct.rabbit_foot)
|
||||
dinosaur_egg = BundleItem(AnimalProduct.dinosaur_egg)
|
||||
void_egg = BundleItem(AnimalProduct.void_egg)
|
||||
ostrich_egg = BundleItem(AnimalProduct.ostrich_egg, source=BundleItem.Sources.island, )
|
||||
ostrich_egg = BundleItem(AnimalProduct.ostrich_egg, source=BundleItem.Sources.content)
|
||||
golden_egg = BundleItem(AnimalProduct.golden_egg)
|
||||
|
||||
truffle_oil = BundleItem(ArtisanGood.truffle_oil)
|
||||
@@ -832,7 +832,7 @@ calico_items = [calico_egg.as_amount(200), calico_egg.as_amount(200), calico_egg
|
||||
magic_rock_candy, mega_bomb.as_amount(10), mystery_box.as_amount(10), mixed_seeds.as_amount(50),
|
||||
strawberry_seeds.as_amount(20),
|
||||
spicy_eel.as_amount(5), crab_cakes.as_amount(5), eggplant_parmesan.as_amount(5),
|
||||
pumpkin_soup.as_amount(5), lucky_lunch.as_amount(5)]
|
||||
pumpkin_soup.as_amount(5), lucky_lunch.as_amount(5) ]
|
||||
calico_bundle = BundleTemplate(CCRoom.bulletin_board, BundleName.calico, calico_items, 2, 2)
|
||||
|
||||
raccoon_bundle = BundleTemplate(CCRoom.bulletin_board, BundleName.raccoon, raccoon_foraging_items, 4, 4)
|
||||
|
||||
@@ -3,12 +3,13 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from typing import List, Tuple, Union, Optional
|
||||
|
||||
from ..strings.monster_names import Monster
|
||||
from ..strings.animal_product_names import AnimalProduct
|
||||
from ..strings.fish_names import WaterChest
|
||||
from ..strings.forageable_names import Forageable
|
||||
from ..strings.metal_names import Mineral, Artifact, Fossil
|
||||
from ..strings.region_names import Region
|
||||
from ..strings.geode_names import Geode
|
||||
from ..strings.metal_names import Mineral, Artifact, Fossil
|
||||
from ..strings.monster_names import Monster
|
||||
from ..strings.region_names import Region
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -105,7 +106,7 @@ class Artifact:
|
||||
geodes=(Geode.artifact_trove, WaterChest.fishing_chest))
|
||||
ornamental_fan = create_artifact("Ornamental Fan", 7.4, (Region.beach, Region.forest, Region.town),
|
||||
geodes=(Geode.artifact_trove, WaterChest.fishing_chest))
|
||||
dinosaur_egg = create_artifact("Dinosaur Egg", 11.4, (Region.skull_cavern),
|
||||
dinosaur_egg = create_artifact(AnimalProduct.dinosaur_egg, 11.4, (Region.skull_cavern),
|
||||
monsters=Monster.pepper_rex)
|
||||
rare_disc = create_artifact("Rare Disc", 5.6, Region.stardew_valley,
|
||||
geodes=(Geode.artifact_trove, WaterChest.fishing_chest),
|
||||
|
||||
Reference in New Issue
Block a user