Make wall angle more betterer

This commit is contained in:
2024-09-29 01:56:39 +02:00
parent dee8e85eb9
commit ffc398c202

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using BepInEx;
using BepInEx.Configuration;
using Controllers;
@@ -27,6 +28,7 @@ using Gameplay.Vehicles;
using HarmonyLib;
using HarmonyLib.Tools;
using MapEssentials.Temp;
using ScriptableObjectScripts.Radio;
using UI.InfoPanels.NestedUIElements;
using UnityEngine;
using Zenject;
@@ -648,6 +650,7 @@ namespace InfectionFreeZone {
}
}
}
// TODO: Add toggle for this
[HarmonyTranspiler]
[HarmonyPatch(typeof(ValidatableStructure), "Awake")]
@@ -699,5 +702,14 @@ namespace InfectionFreeZone {
return codes.AsEnumerable();
}
// TODO: Add toggle for this
[HarmonyPrefix]
[HarmonyPatch(typeof(WallConstructor), MethodType.Constructor,
typeof(Wall.Factory), typeof(WorkersRadio), typeof(WallConfig))]
public static void PostfixWallConstructor(Wall.Factory factory, WorkersRadio workersRadio, ref WallConfig wallConfig) {
Console.WriteLine($"Wall config created");
wallConfig.maxAngel = 2f;
}
}
}