| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | import unittest | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
											
												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 . import SVTestBase | 
					
						
							|  |  |  | from .. import BundleRandomization | 
					
						
							|  |  |  | from ..data.bundle_data import all_bundle_items_except_money, quality_crops_items_thematic, quality_foraging_items, quality_fish_items | 
					
						
							|  |  |  | from ..options import BundlePlando | 
					
						
							|  |  |  | from ..strings.bundle_names import BundleName | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from ..strings.crop_names import Fruit | 
					
						
							| 
									
										
										
											
												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 ..strings.quality_names import CropQuality, ForageQuality, FishQuality | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TestBundles(unittest.TestCase): | 
					
						
							|  |  |  |     def test_all_bundle_items_have_3_parts(self): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         for bundle_item in all_bundle_items_except_money: | 
					
						
							|  |  |  |             with self.subTest(bundle_item.item_name): | 
					
						
							|  |  |  |                 self.assertGreater(len(bundle_item.item_name), 0) | 
					
						
							| 
									
										
										
										
											2023-04-16 05:22:33 -04:00
										 |  |  |                 self.assertGreater(bundle_item.amount, 0) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |                 self.assertTrue(bundle_item.quality) | 
					
						
							| 
									
										
										
										
											2023-04-16 05:22:33 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def test_quality_crops_have_correct_amounts(self): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         for bundle_item in quality_crops_items_thematic: | 
					
						
							|  |  |  |             with self.subTest(bundle_item.item_name): | 
					
						
							|  |  |  |                 name = bundle_item.item_name | 
					
						
							|  |  |  |                 if name == Fruit.sweet_gem_berry or name == Fruit.ancient_fruit: | 
					
						
							| 
									
										
										
										
											2023-04-16 05:22:33 -04:00
										 |  |  |                     self.assertEqual(bundle_item.amount, 1) | 
					
						
							|  |  |  |                 else: | 
					
						
							|  |  |  |                     self.assertEqual(bundle_item.amount, 5) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def test_quality_crops_have_correct_quality(self): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         for bundle_item in quality_crops_items_thematic: | 
					
						
							|  |  |  |             with self.subTest(bundle_item.item_name): | 
					
						
							|  |  |  |                 self.assertEqual(bundle_item.quality, CropQuality.gold) | 
					
						
							| 
									
										
										
										
											2023-04-16 05:22:33 -04: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_quality_foraging_have_correct_amounts(self): | 
					
						
							|  |  |  |         for bundle_item in quality_foraging_items: | 
					
						
							|  |  |  |             with self.subTest(bundle_item.item_name): | 
					
						
							|  |  |  |                 self.assertEqual(bundle_item.amount, 3) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def test_quality_foraging_have_correct_quality(self): | 
					
						
							|  |  |  |         for bundle_item in quality_foraging_items: | 
					
						
							|  |  |  |             with self.subTest(bundle_item.item_name): | 
					
						
							|  |  |  |                 self.assertEqual(bundle_item.quality, ForageQuality.gold) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def test_quality_fish_have_correct_amounts(self): | 
					
						
							|  |  |  |         for bundle_item in quality_fish_items: | 
					
						
							|  |  |  |             with self.subTest(bundle_item.item_name): | 
					
						
							|  |  |  |                 self.assertEqual(bundle_item.amount, 2) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def test_quality_fish_have_correct_quality(self): | 
					
						
							|  |  |  |         for bundle_item in quality_fish_items: | 
					
						
							|  |  |  |             with self.subTest(bundle_item.item_name): | 
					
						
							|  |  |  |                 self.assertEqual(bundle_item.quality, FishQuality.gold) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TestRemixedPlandoBundles(SVTestBase): | 
					
						
							|  |  |  |     plando_bundles = {BundleName.money_2500, BundleName.money_5000, BundleName.money_10000, BundleName.gambler, BundleName.ocean_fish, | 
					
						
							|  |  |  |                       BundleName.lake_fish, BundleName.deep_fishing, BundleName.spring_fish, BundleName.legendary_fish, BundleName.bait} | 
					
						
							|  |  |  |     options = { | 
					
						
							|  |  |  |         BundleRandomization: BundleRandomization.option_remixed, | 
					
						
							|  |  |  |         BundlePlando: frozenset(plando_bundles) | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def test_all_plando_bundles_are_there(self): | 
					
						
							|  |  |  |         location_names = {location.name for location in self.multiworld.get_locations()} | 
					
						
							|  |  |  |         for bundle_name in self.plando_bundles: | 
					
						
							|  |  |  |             with self.subTest(f"{bundle_name}"): | 
					
						
							|  |  |  |                 self.assertIn(bundle_name, location_names) | 
					
						
							|  |  |  |         self.assertNotIn(BundleName.money_25000, location_names) | 
					
						
							|  |  |  |         self.assertNotIn(BundleName.carnival, location_names) | 
					
						
							|  |  |  |         self.assertNotIn(BundleName.night_fish, location_names) | 
					
						
							|  |  |  |         self.assertNotIn(BundleName.specialty_fish, location_names) | 
					
						
							|  |  |  |         self.assertNotIn(BundleName.specific_bait, location_names) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TestRemixedAnywhereBundles(SVTestBase): | 
					
						
							|  |  |  |     fish_bundle_names = {BundleName.spring_fish, BundleName.summer_fish, BundleName.fall_fish, BundleName.winter_fish, BundleName.ocean_fish, | 
					
						
							|  |  |  |                          BundleName.lake_fish, BundleName.river_fish, BundleName.night_fish, BundleName.legendary_fish, BundleName.specialty_fish, | 
					
						
							|  |  |  |                          BundleName.bait, BundleName.specific_bait, BundleName.crab_pot, BundleName.tackle, BundleName.quality_fish, | 
					
						
							|  |  |  |                          BundleName.rain_fish, BundleName.master_fisher} | 
					
						
							|  |  |  |     options = { | 
					
						
							|  |  |  |         BundleRandomization: BundleRandomization.option_remixed_anywhere, | 
					
						
							|  |  |  |         BundlePlando: frozenset(fish_bundle_names) | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def test_all_plando_bundles_are_there(self): | 
					
						
							|  |  |  |         location_names = {location.name for location in self.multiworld.get_locations()} | 
					
						
							|  |  |  |         for bundle_name in self.fish_bundle_names: | 
					
						
							|  |  |  |             with self.subTest(f"{bundle_name}"): | 
					
						
							|  |  |  |                 self.assertIn(bundle_name, location_names) | 
					
						
							|  |  |  | 
 |