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

Commit

Permalink
fix: skip error when reading. maybe.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Aug 16, 2023
1 parent c949dc0 commit 7cb567e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -674,4 +674,5 @@ internal partial class Strings
public string ConfigWindow_Tab_Auto { get; set; } = "About some general actions' usage and conditions.";
public string ConfigWindow_Tab_Target { get; set; } = "The way to find the targets, hostiles or friends.";
public string ConfigWindow_Tab_Extra { get; set; } = "Some features shouldn't be included by RS.";
public string ConfigWindow_List_AddPosition { get; set; } = "Add One territory position";
}
5 changes: 5 additions & 0 deletions RotationSolver/RotationSolverPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public RotationSolverPlugin(DalamudPluginInterface pluginInterface)
Service.Config = JsonConvert.DeserializeObject<PluginConfig>(
File.ReadAllText(Svc.PluginInterface.ConfigFile.FullName), new JsonSerializerSettings()
{
MissingMemberHandling = MissingMemberHandling.Error,
Error = delegate (object sender, Newtonsoft.Json.Serialization. ErrorEventArgs args)
{
args.ErrorContext.Handled = true;
}
})
?? PluginConfig.Create();
}
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/UI/RotationConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,7 @@ private static void DrawListTerritories()
OtherConfiguration.BeneficialPositions[territoryId] = pts = Array.Empty<Vector3>();
}

if (ImGui.Button("Add One territory position") && Player.Available) unsafe
if (ImGui.Button(LocalizationManager.RightLang.ConfigWindow_List_AddPosition) && Player.Available) unsafe
{
var point = Player.Object.Position;
int* unknown = stackalloc int[] { 0x4000, 0, 0x4000, 0 };
Expand Down

0 comments on commit 7cb567e

Please sign in to comment.