autopopulate flea offer price; update flea offer price when bulk; ammobox unload in place fixes

This commit is contained in:
Tyfon
2024-07-23 16:46:45 -07:00
parent 35d54c282e
commit 48faa97082
7 changed files with 207 additions and 11 deletions

16
R.cs
View File

@@ -67,6 +67,7 @@ public static class R
InventoryScreen.InitTypes();
ScavengerInventoryScreen.InitTypes();
LocalizedText.InitTypes();
GameWorld.InitTypes();
}
public abstract class Wrapper(object value)
@@ -867,6 +868,20 @@ public static class R
set { StringCaseField.SetValue(Value, value); }
}
}
public class GameWorld(object value) : Wrapper(value)
{
public static Type Type { get; private set; }
private static FieldInfo StashField;
public static void InitTypes()
{
Type = typeof(EFT.GameWorld);
StashField = AccessTools.Field(Type, "stashClass");
}
public StashClass Stash { get { return (StashClass)StashField.GetValue(Value); } }
}
}
public static class RExtentensions
@@ -898,4 +913,5 @@ public static class RExtentensions
public static R.InventoryScreen R(this InventoryScreen value) => new(value);
public static R.ScavengerInventoryScreen R(this ScavengerInventoryScreen value) => new(value);
public static R.LocalizedText R(this LocalizedText value) => new(value);
public static R.GameWorld R(this GameWorld value) => new(value);
}