diff options
Diffstat (limited to 'AnodyneArchipelago/Patches')
-rw-r--r-- | AnodyneArchipelago/Patches/PatchHelper.cs | 15 |
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 @@ | |||
1 | using AnodyneSharp.Entities; | ||
2 | using System; | ||
3 | using System.Reflection; | ||
4 | |||
5 | namespace 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 | } | ||