-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVTDisableConveyorBeltMaxLengthMod.cs
42 lines (39 loc) · 1.07 KB
/
VTDisableConveyorBeltMaxLengthMod.cs
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
41
42
using HarmonyLib;
using System;
using System.Reflection;
using VoxelTycoon;
using VoxelTycoon.Modding;
namespace VTDisableConveyorBeltMaxLengthMod
{
public class VTDisableConveyorBeltMaxLengthMod : Mod
{
Logger _logger = new Logger<VTDisableConveyorBeltMaxLengthMod>();
protected override void OnGameStarted()
{
try
{
var harmony = new Harmony("com.github.ianmcderp");
Harmony.DEBUG = true;
harmony.PatchAll(Assembly.GetExecutingAssembly());
harmony.PatchAll();
}
catch (Exception e)
{
_logger.LogError("Loading VTDisableConveyorBeltMaxLengthMod failed");
_logger.LogException(e);
}
}
}
[HarmonyPatch(
typeof(VoxelTycoon.Tools.TrackBuilder.ConveyorBuilderTool),
"CheckLength",
new Type[] {}
)]
class PatchedConveyorBuilderTool
{
static void Postfix(ref bool __result)
{
__result = true;
}
}
}