Fix R change

This commit is contained in:
Tyfon
2024-06-02 14:57:12 -07:00
parent cd5527827a
commit 0c2f2b3747

15
R.cs
View File

@@ -24,6 +24,7 @@ namespace UIFixes
{
// Order is significant, as some reference each other
UIElement.InitUITypes();
UIInputNode.InitUITypes();
UIContext.InitTypes();
DialogWindow.InitTypes();
ControlSettings.InitTypes();
@@ -72,6 +73,18 @@ namespace UIFixes
public UIContext UI { get { return new UIContext(UIField.GetValue(Value)); } }
}
public class UIInputNode(object value) : Wrapper(value)
{
private static FieldInfo UIField;
public static void InitUITypes()
{
UIField = AccessTools.Field(typeof(EFT.UI.UIInputNode), "UI");
}
public UIContext UI { get { return new UIContext(UIField.GetValue(Value)); } }
}
public class UIContext(object value) : Wrapper(value)
{
public static Type Type { get; private set; }
@@ -510,7 +523,7 @@ namespace UIFixes
public static Dictionary<ECurrencyType, int> GetMoneySums(IEnumerable<Item> items) => (Dictionary<ECurrencyType, int>)GetMoneySumsMethod.Invoke(null, [items]);
}
public class TraderScreensGroup(object value) : UIElement(value)
public class TraderScreensGroup(object value) : UIInputNode(value)
{
public static Type Type { get; private set; }
private static FieldInfo BuyTabField;