mirror of
				https://github.com/MarioSpore/Grinch-AP.git
				synced 2025-10-21 20:21:32 -06:00 
			
		
		
		
	Core: Add settings API ("auto settings") for host.yaml (#1871)
* Add settings API ("auto settings") for host.yaml
* settings: no BOM when saving
* settings: fix saving / groups resetting themselves
* settings: fix AutoWorldRegister import
Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>
* Lufia2: settings: clean up imports
* settings: more consistent class naming
* Docs: update world api for settings api refactor
* settings: fix access from World instance
* settings: update migration timeline
* Docs: Apply suggestions from code review
Co-authored-by: Zach Parks <zach@alliware.com>
* Settings: correctly resolve .exe in UserPath and LocalPath
---------
Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>
Co-authored-by: Zach Parks <zach@alliware.com>
			
			
This commit is contained in:
		| @@ -3,6 +3,7 @@ import typing | ||||
| import math | ||||
| import threading | ||||
|  | ||||
| import settings | ||||
| from BaseClasses import Item, MultiWorld, Tutorial, ItemClassification | ||||
| from .Items import DKC3Item, ItemData, item_table, inventory_table, junk_table | ||||
| from .Locations import DKC3Location, all_locations, setup_locations | ||||
| @@ -17,6 +18,16 @@ from .Rom import LocalRom, patch_rom, get_base_rom_path, DKC3DeltaPatch | ||||
| import Patch | ||||
|  | ||||
|  | ||||
| class DK3Settings(settings.Group): | ||||
|     class RomFile(settings.UserFilePath): | ||||
|         """File name of the DKC3 US rom""" | ||||
|         copy_to = "Donkey Kong Country 3 - Dixie Kong's Double Trouble! (USA) (En,Fr).sfc" | ||||
|         description = "DKC3 (US) ROM File" | ||||
|         md5s = [DKC3DeltaPatch.hash] | ||||
|  | ||||
|     rom_file: RomFile = RomFile(RomFile.copy_to) | ||||
|  | ||||
|  | ||||
| class DKC3Web(WebWorld): | ||||
|     theme = "jungle" | ||||
|  | ||||
| @@ -40,6 +51,7 @@ class DKC3World(World): | ||||
|     """ | ||||
|     game: str = "Donkey Kong Country 3" | ||||
|     option_definitions = dkc3_options | ||||
|     settings: typing.ClassVar[DK3Settings] | ||||
|     topology_present = False | ||||
|     data_version = 2 | ||||
|     #hint_blacklist = {LocationName.rocket_rush_flag} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 black-sliver
					black-sliver