about summary refs log tree commit diff stats
path: root/AnodyneArchipelago/Patches
diff options
context:
space:
mode:
Diffstat (limited to 'AnodyneArchipelago/Patches')
-rw-r--r--AnodyneArchipelago/Patches/PatchHelper.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/AnodyneArchipelago/Patches/PatchHelper.cs b/AnodyneArchipelago/Patches/PatchHelper.cs new file mode 100644 index 0000000..6b6d532 --- /dev/null +++ b/AnodyneArchipelago/Patches/PatchHelper.cs
@@ -0,0 +1,15 @@
1using AnodyneSharp.Entities;
2using System;
3using System.Reflection;
4
5namespace AnodyneArchipelago.Patches
6{
7 internal class PatchHelper
8 {
9 public static EntityPreset GetEntityPreset(Type type, object instance)
10 {
11 FieldInfo presetField = type.GetField("_preset", BindingFlags.NonPublic | BindingFlags.Instance);
12 return presetField.GetValue(instance) as EntityPreset;
13 }
14 }
15}