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,6 @@
|
||||
import os
|
||||
import settings
|
||||
import string
|
||||
import json
|
||||
import typing
|
||||
|
||||
from BaseClasses import Item, MultiWorld, Region, Location, Entrance, Tutorial, ItemClassification
|
||||
from .Items import item_table, faction_table
|
||||
@@ -11,6 +11,17 @@ from ..AutoWorld import World, WebWorld
|
||||
from .Options import wargroove_options
|
||||
|
||||
|
||||
class WargrooveSettings(settings.Group):
|
||||
class RootDirectory(settings.UserFolderPath):
|
||||
"""
|
||||
Locate the Wargroove root directory on your system.
|
||||
This is used by the Wargroove client, so it knows where to send communication files to
|
||||
"""
|
||||
description = "Wargroove root directory"
|
||||
|
||||
root_directory: RootDirectory = RootDirectory("C:/Program Files (x86)/Steam/steamapps/common/Wargroove")
|
||||
|
||||
|
||||
class WargrooveWeb(WebWorld):
|
||||
tutorials = [Tutorial(
|
||||
"Multiworld Setup Guide",
|
||||
@@ -28,6 +39,7 @@ class WargrooveWorld(World):
|
||||
"""
|
||||
|
||||
option_definitions = wargroove_options
|
||||
settings: typing.ClassVar[WargrooveSettings]
|
||||
game = "Wargroove"
|
||||
topology_present = True
|
||||
data_version = 1
|
||||
|
||||
Reference in New Issue
Block a user