Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into cleanup-and-nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
l-2-j committed Apr 8, 2022
2 parents e4fd448 + 348aafb commit a9c33cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"editor.formatOnSaveMode": "modifications",
"editor.insertSpaces": true,
"editor.tabSize": 4,
"csharp.format.enable": false
}
4 changes: 2 additions & 2 deletions NeosModLoader/ModConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ private bool AnyValuesSet()

internal static ModConfiguration LoadConfigForMod(LoadedNeosMod mod)
{
// intentional call to an obsolete method. This will need reorganizing in the next major version.
ModConfigurationDefinition definition = mod.NeosMod.GetConfigurationDefinition();
if (definition == null)
{
Expand Down Expand Up @@ -500,11 +501,10 @@ public void Save(bool saveDefaultValues = false)
Logger.WarnInternal($"Config for {LoadedNeosMod.NeosMod.Name} will NOT be saved due to a safety check failing. This is probably due to you downgrading a mod.");
return;
}
ModConfigurationDefinition definition = LoadedNeosMod.NeosMod.GetConfigurationDefinition();

JObject json = new()
{
[VERSION_JSON_KEY] = JToken.FromObject(definition.Version.ToString(), jsonSerializer)
[VERSION_JSON_KEY] = JToken.FromObject(Definition.Version.ToString(), jsonSerializer)
};

JObject valueMap = new();
Expand Down

0 comments on commit a9c33cc

Please sign in to comment.