26 lines
722 B
C#
26 lines
722 B
C#
using BepInEx;
|
|
using HarmonyLib;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace MxValheim.Patch
|
|
{
|
|
public class CraftingStation_Patch
|
|
{
|
|
[HarmonyPatch(typeof(CraftingStation), "Start")]
|
|
static class CraftingStation_Start_Patch
|
|
{
|
|
static void Postfix(CraftingStation __instance)
|
|
{
|
|
var rangeField = Traverse.Create(__instance).Field("m_rangeBuild");
|
|
|
|
if (rangeField.FieldExists())
|
|
{
|
|
float currentRange = rangeField.GetValue<float>();
|
|
rangeField.SetValue(currentRange * MxValheimMod.Config_rangeMultiplier.Value);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|