## What is this fixing or adding? Major content update for Stardew Valley ## How was this tested? One large-scale public Beta on the archipelago server, plus several smaller private asyncs and test runs You can go to https://github.com/agilbert1412/StardewArchipelago/releases to grab the mod (latest 4.x.x version), the supported mods and the apworld, to test this PR ## New Features: - Festival Checks [Easy mode or Hard Mode] - Special Orders [Both Board and Qi] - Willy's Boat - Ginger Island Parrots - TV Channels - Trap Items [Available in various difficulty levels] - Entrance Randomizer: Buildings and Chaos - New Fishsanity options: Exclude Legendaries, Exclude Hard fish, Only easy fish - Resource Pack overhaul [Resource packs are now more enjoyable and varied] - Goal: Greatest Walnut Hunter [Find every single Golden Walnut] - Goal: Perfection [Achieve Perfection] - Option: Profit Margin [Multiplier over all earnings] - Option: Friendsanity Heart Size [Reduce clutter from friendsanity hearts] - Option: Exclude Ginger Island - will exclude many locations and items to generate a playthrough that does not go to the island - Mod Support [Curated list of mods] ## New Contributors: @Witchybun for the mod support --------- Co-authored-by: Witchybun <embenham05@gmail.com> Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
		
			
				
	
	
		
			59 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
from enum import IntFlag
 | 
						|
from typing import Optional, List
 | 
						|
from dataclasses import dataclass, field
 | 
						|
 | 
						|
connector_keyword = " to "
 | 
						|
 | 
						|
 | 
						|
class RandomizationFlag(IntFlag):
 | 
						|
    NOT_RANDOMIZED = 0b0
 | 
						|
    PELICAN_TOWN = 0b11111
 | 
						|
    NON_PROGRESSION = 0b11110
 | 
						|
    BUILDINGS = 0b11100
 | 
						|
    EVERYTHING = 0b11000
 | 
						|
    CHAOS = 0b10000
 | 
						|
    GINGER_ISLAND = 0b0100000
 | 
						|
    LEAD_TO_OPEN_AREA = 0b1000000
 | 
						|
 | 
						|
 | 
						|
@dataclass(frozen=True)
 | 
						|
class RegionData:
 | 
						|
    name: str
 | 
						|
    exits: List[str] = field(default_factory=list)
 | 
						|
 | 
						|
    def get_merged_with(self, exits: List[str]):
 | 
						|
        merged_exits = []
 | 
						|
        merged_exits.extend(self.exits)
 | 
						|
        if exits is not None:
 | 
						|
            merged_exits.extend(exits)
 | 
						|
        merged_exits = list(set(merged_exits))
 | 
						|
        return RegionData(self.name, merged_exits)
 | 
						|
 | 
						|
    def get_clone(self):
 | 
						|
        return self.get_merged_with(None)
 | 
						|
 | 
						|
 | 
						|
@dataclass(frozen=True)
 | 
						|
class ConnectionData:
 | 
						|
    name: str
 | 
						|
    destination: str
 | 
						|
    origin: Optional[str] = None
 | 
						|
    reverse: Optional[str] = None
 | 
						|
    flag: RandomizationFlag = RandomizationFlag.NOT_RANDOMIZED
 | 
						|
 | 
						|
    def __post_init__(self):
 | 
						|
        if connector_keyword in self.name:
 | 
						|
            origin, destination = self.name.split(connector_keyword)
 | 
						|
            if self.reverse is None:
 | 
						|
                super().__setattr__("reverse", f"{destination}{connector_keyword}{origin}")
 | 
						|
 | 
						|
 | 
						|
@dataclass(frozen=True)
 | 
						|
class ModRegionData:
 | 
						|
    mod_name: str
 | 
						|
    regions: List[RegionData]
 | 
						|
    connections: List[ConnectionData]
 | 
						|
 | 
						|
 | 
						|
 |