This commit is contained in:
Anna 2022-09-03 18:44:43 -04:00
parent be92a100b6
commit c827a5f570
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 Z { get; set; }
public Guid PackId { get; set; }
[JsonProperty("template_1")]
public int Template1 { get; set; }
[JsonProperty("word_1_list")]
public int? Word1List { get; set; }
[JsonProperty("word_1_word")]
public int? Word1Word { get; set; }
public int? Conjunction { get; set; }
[JsonProperty("template_2")]
public int? Template2 { get; set; }
[JsonProperty("word_2_list")]
public int? Word2List { get; set; }
[JsonProperty("word_2_word")]
public int? Word2Word { get; set; }
}

View File

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

View File

@ -149,7 +149,7 @@ public class PluginUi : IDisposable {
this.ClearIfNecessary();
var valid = this.ValidSetup();
if (valid) {
if (!valid) {
ImGui.BeginDisabled();
}
@ -164,7 +164,7 @@ public class PluginUi : IDisposable {
Word1List = this._word1.Item1 == -1 ? null : this._word1.Item1,
Word1Word = this._word1.Item2 == -1 ? null : this._word1.Item2,
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,
Word2Word = this._word2.Item2 == -1 ? null : this._word2.Item2,
};
@ -183,7 +183,7 @@ public class PluginUi : IDisposable {
});
}
if (valid) {
if (!valid) {
ImGui.EndDisabled();
}