| 
									
										
										
										
											2023-10-28 00:18:33 +02:00
										 |  |  | import unittest | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  | from itertools import combinations | 
					
						
							|  |  |  | from typing import ClassVar | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from BaseClasses import get_seed | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  | from test.param import classvar_matrix | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from ..assertion import WorldAssertMixin, ModAssertMixin | 
					
						
							| 
									
										
										
										
											2025-05-13 03:58:03 -04:00
										 |  |  | from ..bases import skip_long_tests, SVTestCase, solo_multiworld | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  | from ..options.option_names import all_option_choices | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from ... import options | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
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
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | from ...mods.mod_data import ModNames | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  | from ...options.options import all_mods | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  | @unittest.skip | 
					
						
							|  |  |  | class TestTroubleshootMods(WorldAssertMixin, ModAssertMixin, SVTestCase): | 
					
						
							|  |  |  |     def test_troubleshoot_option(self): | 
					
						
							|  |  |  |         seed = get_seed(78709133382876990000) | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  |         world_options = { | 
					
						
							|  |  |  |             options.EntranceRandomization: options.EntranceRandomization.option_buildings, | 
					
						
							|  |  |  |             options.Mods: ModNames.sve | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         with self.solo_world_sub_test(world_options=world_options, seed=seed, world_caching=False) as (multiworld, _): | 
					
						
							|  |  |  |             self.assert_basic_checks(multiworld) | 
					
						
							|  |  |  |             self.assert_stray_mod_items(world_options[options.Mods], multiworld) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if skip_long_tests(): | 
					
						
							|  |  |  |     raise unittest.SkipTest("Long tests disabled") | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | @classvar_matrix(mod_pair=combinations(sorted(all_mods), 2)) | 
					
						
							|  |  |  | class TestGenerateModsPairs(WorldAssertMixin, ModAssertMixin, SVTestCase): | 
					
						
							|  |  |  |     mod_pair: ClassVar[tuple[str, str]] | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
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
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     def test_given_mod_pairs_when_generate_then_basic_checks(self): | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  |         world_options = { | 
					
						
							|  |  |  |             options.Mods.internal_name: frozenset(self.mod_pair) | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         with solo_multiworld(world_options, world_caching=False) as (multiworld, _): | 
					
						
							|  |  |  |             self.assert_basic_checks(multiworld) | 
					
						
							|  |  |  |             self.assert_stray_mod_items(list(self.mod_pair), multiworld) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | @classvar_matrix(mod=all_mods, option_and_choice=all_option_choices) | 
					
						
							|  |  |  | class TestGenerateModAndOptionChoice(WorldAssertMixin, ModAssertMixin, SVTestCase): | 
					
						
							|  |  |  |     mod: ClassVar[str] | 
					
						
							|  |  |  |     option_and_choice: ClassVar[tuple[str, str]] | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def test_given_mod_names_when_generate_paired_with_other_options_then_basic_checks(self): | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  |         option, choice = self.option_and_choice | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  |         world_options = { | 
					
						
							|  |  |  |             option: choice, | 
					
						
							|  |  |  |             options.Mods.internal_name: self.mod | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  |         with solo_multiworld(world_options, world_caching=False) as (multiworld, _): | 
					
						
							|  |  |  |             self.assert_basic_checks(multiworld) | 
					
						
							|  |  |  |             self.assert_stray_mod_items(self.mod, multiworld) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
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
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  | @classvar_matrix(goal=options.Goal.options.keys(), option_and_choice=all_option_choices) | 
					
						
							|  |  |  | class TestGenerateAllGoalAndAllOptionWithAllModsWithoutQuest(WorldAssertMixin, ModAssertMixin, SVTestCase): | 
					
						
							|  |  |  |     goal = ClassVar[str] | 
					
						
							|  |  |  |     option_and_choice = ClassVar[tuple[str, str]] | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
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
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  |     def test_given_no_quest_all_mods_when_generate_with_all_goals_then_basic_checks(self): | 
					
						
							|  |  |  |         option, choice = self.option_and_choice | 
					
						
							|  |  |  |         if option == options.QuestLocations.internal_name: | 
					
						
							|  |  |  |             self.skipTest("QuestLocations are disabled") | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
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
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         world_options = { | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  |             options.Goal.internal_name: self.goal, | 
					
						
							|  |  |  |             option: choice, | 
					
						
							|  |  |  |             options.QuestLocations.internal_name: -1, | 
					
						
							|  |  |  |             options.Mods.internal_name: frozenset(options.Mods.valid_keys), | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-11 20:19:17 -04:00
										 |  |  |         with solo_multiworld(world_options, world_caching=False) as (multiworld, _): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |             self.assert_basic_checks(multiworld) |