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:
@@ -2,8 +2,11 @@ import binascii
|
||||
import bsdiff4
|
||||
import os
|
||||
import pkgutil
|
||||
import settings
|
||||
import typing
|
||||
import tempfile
|
||||
|
||||
|
||||
from BaseClasses import Entrance, Item, ItemClassification, Location, Tutorial
|
||||
from Fill import fill_restrictive
|
||||
from worlds.AutoWorld import WebWorld, World
|
||||
@@ -29,6 +32,16 @@ from .Rom import LADXDeltaPatch
|
||||
DEVELOPER_MODE = False
|
||||
|
||||
|
||||
class LinksAwakeningSettings(settings.Group):
|
||||
class RomFile(settings.UserFilePath):
|
||||
"""File name of the Link's Awakening DX rom"""
|
||||
copy_to = "Legend of Zelda, The - Link's Awakening DX (USA, Europe) (SGB Enhanced).gbc"
|
||||
description = "LADX ROM File"
|
||||
md5s = [LADXDeltaPatch.hash]
|
||||
|
||||
rom_file: RomFile = RomFile(RomFile.copy_to)
|
||||
|
||||
|
||||
class LinksAwakeningWebWorld(WebWorld):
|
||||
tutorials = [Tutorial(
|
||||
"Multiworld Setup Guide",
|
||||
@@ -40,6 +53,7 @@ class LinksAwakeningWebWorld(WebWorld):
|
||||
)]
|
||||
theme = "dirt"
|
||||
|
||||
|
||||
class LinksAwakeningWorld(World):
|
||||
"""
|
||||
After a previous adventure, Link is stranded on Koholint Island, full of mystery and familiar faces.
|
||||
@@ -49,6 +63,7 @@ class LinksAwakeningWorld(World):
|
||||
web = LinksAwakeningWebWorld()
|
||||
|
||||
option_definitions = links_awakening_options # options the player can set
|
||||
settings: typing.ClassVar[LinksAwakeningSettings]
|
||||
topology_present = True # show path to required location checks in spoiler
|
||||
|
||||
# data_version is used to signal that items, locations or their names
|
||||
|
||||
Reference in New Issue
Block a user