 9b22458f44
			
		
	
	9b22458f44
	
	
	
		
			
			Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024 This includes randomization for pretty much all of the new content, including but not limited to - Raccoon Bundles - Booksanity - Skill Masteries - New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit. In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update - Walnutsanity - Player Buffs - More customizability in settings, such as shorter special orders, ER without farmhouse - New Remixed Bundles
		
			
				
	
	
		
			53 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| from __future__ import annotations
 | |
| 
 | |
| from typing import TypeVar, Generic, Dict, Collection
 | |
| 
 | |
| from ..content.game_content import StardewContent
 | |
| from ..options import StardewValleyOptions
 | |
| from ..stardew_rule import StardewRule
 | |
| 
 | |
| 
 | |
| class LogicRegistry:
 | |
| 
 | |
|     def __init__(self):
 | |
|         self.item_rules: Dict[str, StardewRule] = {}
 | |
|         self.seed_rules: Dict[str, StardewRule] = {}
 | |
|         self.cooking_rules: Dict[str, StardewRule] = {}
 | |
|         self.crafting_rules: Dict[str, StardewRule] = {}
 | |
|         self.crop_rules: Dict[str, StardewRule] = {}
 | |
|         self.artisan_good_rules: Dict[str, StardewRule] = {}
 | |
|         self.fish_rules: Dict[str, StardewRule] = {}
 | |
|         self.museum_rules: Dict[str, StardewRule] = {}
 | |
|         self.festival_rules: Dict[str, StardewRule] = {}
 | |
|         self.quest_rules: Dict[str, StardewRule] = {}
 | |
|         self.building_rules: Dict[str, StardewRule] = {}
 | |
|         self.special_order_rules: Dict[str, StardewRule] = {}
 | |
| 
 | |
|         self.sve_location_rules: Dict[str, StardewRule] = {}
 | |
| 
 | |
| 
 | |
| class BaseLogicMixin:
 | |
|     def __init__(self, *args, **kwargs):
 | |
|         pass
 | |
| 
 | |
| 
 | |
| T = TypeVar("T", bound=BaseLogicMixin)
 | |
| 
 | |
| 
 | |
| class BaseLogic(BaseLogicMixin, Generic[T]):
 | |
|     player: int
 | |
|     registry: LogicRegistry
 | |
|     options: StardewValleyOptions
 | |
|     content: StardewContent
 | |
|     regions: Collection[str]
 | |
|     logic: T
 | |
| 
 | |
|     def __init__(self, player: int, registry: LogicRegistry, options: StardewValleyOptions, content: StardewContent, regions: Collection[str], logic: T):
 | |
|         super().__init__(player, registry, options, content, regions, logic)
 | |
|         self.player = player
 | |
|         self.registry = registry
 | |
|         self.options = options
 | |
|         self.content = content
 | |
|         self.regions = regions
 | |
|         self.logic = logic
 |