This commit is contained in:
Anna 2022-09-03 18:44:43 -04:00
parent f41c3545e2
commit 2a47e2e251
Signed by: anna
GPG Key ID: 0B391D8F06FCD9E0
3 changed files with 20 additions and 5 deletions

View File

@ -11,11 +11,24 @@ public class MessageRequest {
public float Y { get; set; } public float Y { get; set; }
public float Z { get; set; } public float Z { get; set; }
public Guid PackId { get; set; } public Guid PackId { get; set; }
[JsonProperty("template_1")]
public int Template1 { get; set; } public int Template1 { get; set; }
[JsonProperty("word_1_list")]
public int? Word1List { get; set; } public int? Word1List { get; set; }
[JsonProperty("word_1_word")]
public int? Word1Word { get; set; } public int? Word1Word { get; set; }
public int? Conjunction { get; set; } public int? Conjunction { get; set; }
[JsonProperty("template_2")]
public int? Template2 { get; set; } public int? Template2 { get; set; }
[JsonProperty("word_2_list")]
public int? Word2List { get; set; } public int? Word2List { get; set; }
[JsonProperty("word_2_word")]
public int? Word2Word { get; set; } public int? Word2Word { get; set; }
} }

View File

@ -1,3 +1,4 @@
using Dalamud.Logging;
using YamlDotNet.Serialization.NamingConventions; using YamlDotNet.Serialization.NamingConventions;
namespace OrangeGuidanceTomestone; namespace OrangeGuidanceTomestone;
@ -15,8 +16,9 @@ public class Pack {
} }
.Select(name => { .Select(name => {
try { try {
return des.Deserialize<Pack>(Resourcer.Resource.AsString($"{name}.yaml")); return des.Deserialize<Pack>(Resourcer.Resource.AsStringUnChecked($"OrangeGuidanceTomestone.packs.{name}.yaml"));
} catch { } catch (Exception ex) {
PluginLog.LogError(ex, name);
return null; return null;
} }
}) })

View File

@ -149,7 +149,7 @@ public class PluginUi : IDisposable {
this.ClearIfNecessary(); this.ClearIfNecessary();
var valid = this.ValidSetup(); var valid = this.ValidSetup();
if (valid) { if (!valid) {
ImGui.BeginDisabled(); ImGui.BeginDisabled();
} }
@ -164,7 +164,7 @@ public class PluginUi : IDisposable {
Word1List = this._word1.Item1 == -1 ? null : this._word1.Item1, Word1List = this._word1.Item1 == -1 ? null : this._word1.Item1,
Word1Word = this._word1.Item2 == -1 ? null : this._word1.Item2, Word1Word = this._word1.Item2 == -1 ? null : this._word1.Item2,
Conjunction = this._conj == -1 ? null : this._conj, Conjunction = this._conj == -1 ? null : this._conj,
Template2 = this._part2, Template2 = this._part2 == -1 ? null : this._part2,
Word2List = this._word2.Item1 == -1 ? null : this._word2.Item1, Word2List = this._word2.Item1 == -1 ? null : this._word2.Item1,
Word2Word = this._word2.Item2 == -1 ? null : this._word2.Item2, Word2Word = this._word2.Item2 == -1 ? null : this._word2.Item2,
}; };
@ -183,7 +183,7 @@ public class PluginUi : IDisposable {
}); });
} }
if (valid) { if (!valid) {
ImGui.EndDisabled(); ImGui.EndDisabled();
} }