forked from mirror/Archipelago
Major Content update for Stardew Valley ### Features - New BundleRandomization Value: Meme Bundles - Over 100 custom bundles, designed to be jokes, references, trolls, etc - New Setting: Bundles Per Room modifier - New Setting: Backpack Size - New Setting: Secretsanity - Checks for triggering easter eggs and secrets - New Setting: Moviesanity - Checks for watching movies and sharing snacks with Villagers - New Setting: Eatsanity - Checks for eating items - New Setting: Hatsanity - Checks for wearing Hats - New Setting: Start Without - Allows you to select any combination of various "starting" items, that you will actually not start with. Notably, tools, backpack slots, Day5 unlocks, etc. - New Setting: Allowed Filler Items - Allows you to customize the filler items you'll get - New Setting: Endgame Locations - Checks for various expensive endgame tasks and purchases - New Shipsanity value: Crops and Fish - New Settings: Jojapocalypse and settings to customize it - Bundle Plando: Replaced with BundleWhitelist and BundleBlacklist, for more customization freedom - Added a couple of Host.yaml settings to help hosts allow or ban specific difficult settings that could cause problems if the people don't know what they are signing up for. Plus a truckload of improvements on the mod side, not seen in this PR. ### Removed features - Integration for Stardew Valley Expanded. It is simply disabled, the code is all still there, but I'm extremely tired of providing tech support for it, plus Stardew Valley 1.7 was announced and that will break it again, so I'm done. When a maintainer steps up, it can be re-enabled.
55 lines
1.6 KiB
Python
55 lines
1.6 KiB
Python
from abc import ABC
|
|
from dataclasses import dataclass
|
|
from typing import ClassVar
|
|
|
|
from .base import FeatureBase
|
|
from ...strings.building_names import Building
|
|
|
|
progressive_house = "Progressive House"
|
|
|
|
# This assumes that the farm house is always available, which might not be true forever...
|
|
progressive_house_by_upgrade_name = {
|
|
Building.farm_house: 0,
|
|
Building.kitchen: 1,
|
|
Building.kids_room: 2,
|
|
Building.cellar: 3
|
|
}
|
|
|
|
|
|
def to_progressive_item(building: str) -> tuple[str, int]:
|
|
"""Return the name of the progressive item and its quantity required to unlock the building.
|
|
"""
|
|
if building in [Building.coop, Building.barn, Building.shed]:
|
|
return f"Progressive {building}", 1
|
|
elif building.startswith("Big"):
|
|
return f"Progressive {building[building.index(' ') + 1:]}", 2
|
|
elif building.startswith("Deluxe"):
|
|
return f"Progressive {building[building.index(' ') + 1:]}", 3
|
|
elif building in progressive_house_by_upgrade_name:
|
|
return progressive_house, progressive_house_by_upgrade_name[building]
|
|
|
|
return building, 1
|
|
|
|
|
|
def to_location_name(building: str) -> str:
|
|
return f"{building} Blueprint"
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class BuildingProgressionFeature(FeatureBase, ABC):
|
|
is_progressive: ClassVar[bool]
|
|
starting_buildings: set[str]
|
|
|
|
to_progressive_item = staticmethod(to_progressive_item)
|
|
progressive_house = progressive_house
|
|
|
|
to_location_name = staticmethod(to_location_name)
|
|
|
|
|
|
class BuildingProgressionVanilla(BuildingProgressionFeature):
|
|
is_progressive = False
|
|
|
|
|
|
class BuildingProgressionProgressive(BuildingProgressionFeature):
|
|
is_progressive = True
|