-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFluent.cs
More file actions
40 lines (33 loc) · 1.14 KB
/
Fluent.cs
File metadata and controls
40 lines (33 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Fluent.API;
using Fluent.Core.Cecil;
using Fluent.Core.Cecil.Tests;
using Terraria.ModLoader;
using TomatoLib;
namespace Fluent
{
public class Fluent : TomatoMod
{
public static Fluent Instance => ModContent.GetInstance<Fluent>();
public override void Load()
{
base.Load();
TypeMimicker.MimickingTypes = TypeMimicker.FindMimickingTypes(Code).ToList();
IEnumerable<MethodInfo> methods = TypeMimicker.FindMethodsWithMimics(Code);
ModLogger.Debug($"Found types to mimic: {string.Join(", ", TypeMimicker.MimickingTypes)}");
foreach (MethodInfo method in methods)
{
ModLogger.Debug($"Mimicking types in: {method.DeclaringType?.FullName}::{method.Name}");
TypeMimicker.MimicTypesIn(method);
}
}
public override void PostAddRecipes()
{
base.PostAddRecipes();
ModLogger.Debug($"Test reassurance: {TestMimic.MimicTest()}");
LiquidLoader.Instance.PostSetup();
}
}
}