feat: initial 6-character HID rework

This commit is contained in:
Iris System 2024-04-28 15:46:06 +12:00
parent 73f43b8cb3
commit 9f56697241
30 changed files with 208 additions and 91 deletions

View file

@ -19,6 +19,7 @@ public class SystemConfigPatch: PatchObject
public Partial<string[]> DescriptionTemplates { get; set; }
public Partial<bool> CaseSensitiveProxyTags { get; set; }
public Partial<bool> ProxyErrorMessageEnabled { get; set; }
public Partial<bool> HidDisplaySplit { get; set; }
public override Query Apply(Query q) => q.ApplyPatch(wrapper => wrapper
@ -33,6 +34,7 @@ public class SystemConfigPatch: PatchObject
.With("description_templates", DescriptionTemplates)
.With("case_sensitive_proxy_tags", CaseSensitiveProxyTags)
.With("proxy_error_message_enabled", ProxyErrorMessageEnabled)
.With("hid_display_split", HidDisplaySplit)
);
public new void AssertIsValid()
@ -88,6 +90,9 @@ public class SystemConfigPatch: PatchObject
if (ProxyErrorMessageEnabled.IsPresent)
o.Add("proxy_error_message_enabled", ProxyErrorMessageEnabled.Value);
if (HidDisplaySplit.IsPresent)
o.Add("hid_display_split", HidDisplaySplit.Value);
return o;
}
@ -119,6 +124,9 @@ public class SystemConfigPatch: PatchObject
if (o.ContainsKey("proxy_error_message_enabled"))
patch.ProxyErrorMessageEnabled = o.Value<bool>("proxy_error_message_enabled");
if (o.ContainsKey("hid_display_split"))
patch.HidDisplaySplit = o.Value<bool>("hid_display_split");
return patch;
}
}