-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap to using nautilus's own config systems
This system is more expandable, gives more examples to users looking to use the system themselves, and you should always use your own API
- Loading branch information
1 parent
a1b4e2a
commit 40dfdb5
Showing
4 changed files
with
43 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Nautilus.Json; | ||
using Nautilus.Options; | ||
using Nautilus.Options.Attributes; | ||
using Nautilus.Patchers; | ||
|
||
namespace Nautilus; | ||
[ConfigFile("NautilusConfig")] | ||
internal class NautilusConfig : ConfigFile | ||
{ | ||
[Toggle(Label = "Enable debug logs")] | ||
[OnChange(nameof(OnDebugLogChange))] | ||
public bool enableDebugLogs = false; | ||
|
||
[Toggle(Label = "Enable mod databank entries", Tooltip = "No seriously this needs a tooltip. I don't even know what this one does. And from a quick glance it looks like nothing")] | ||
public bool enableModDatabankEntries = true;//This whole option doesn't do anything now, because it didn't look like it did anything before either. | ||
|
||
[Choice(Label = "Extra item info", Options = new[] { "Mod name (default)", "Mod name and item ID", "Nothing", }/*, Tooltip = "Wait there's no tooltip for this? Wild, there should probably be one"*/)] | ||
[OnChange(nameof(OnItemInfoChange))] | ||
public string extraItemInfo = "Mod name (default)"; | ||
|
||
private void OnDebugLogChange(ToggleChangedEventArgs args) | ||
{ | ||
Utility.InternalLogger.SetDebugging(args.Value); | ||
} | ||
private void OnItemInfoChange(ChoiceChangedEventArgs<string> args) | ||
{ | ||
TooltipPatcher.RefreshExtraItemInfo(args.Value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters