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:
@@ -1,6 +1,8 @@
|
||||
import base64
|
||||
import itertools
|
||||
import os
|
||||
import settings
|
||||
|
||||
from enum import IntFlag
|
||||
from random import Random
|
||||
from typing import Any, ClassVar, Dict, get_type_hints, Iterator, List, Set, Tuple
|
||||
@@ -22,6 +24,16 @@ from .basepatch import apply_basepatch
|
||||
CHESTS_PER_SPHERE: int = 5
|
||||
|
||||
|
||||
class L2ACSettings(settings.Group):
|
||||
class RomFile(settings.SNESRomPath):
|
||||
"""File name of the US rom"""
|
||||
description = "Lufia II ROM File"
|
||||
copy_to = "Lufia II - Rise of the Sinistrals (USA).sfc"
|
||||
md5s = [L2ACDeltaPatch.hash]
|
||||
|
||||
rom_file: RomFile = RomFile(RomFile.copy_to)
|
||||
|
||||
|
||||
class L2ACWeb(WebWorld):
|
||||
tutorials = [Tutorial(
|
||||
"Multiworld Setup Guide",
|
||||
@@ -45,6 +57,7 @@ class L2ACWorld(World):
|
||||
web: ClassVar[WebWorld] = L2ACWeb()
|
||||
|
||||
option_definitions: ClassVar[Dict[str, AssembleOptions]] = get_type_hints(L2ACOptions)
|
||||
settings: ClassVar[L2ACSettings]
|
||||
item_name_to_id: ClassVar[Dict[str, int]] = l2ac_item_name_to_id
|
||||
location_name_to_id: ClassVar[Dict[str, int]] = l2ac_location_name_to_id
|
||||
item_name_groups: ClassVar[Dict[str, Set[str]]] = {
|
||||
|
Reference in New Issue
Block a user