Copy paste to banquet for fools

This commit is contained in:
2025-05-21 15:41:49 +02:00
parent f56aae2dbf
commit dea5256339
31 changed files with 2364 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using System;
using HarmonyLib;
namespace BanquetForCyka {
[HarmonyPatch]
public class ProjectilePatch {
[HarmonyPrefix]
[HarmonyPatch(typeof(Projectile), "StickToObjectWithVisuals")]
static void Prefix(Projectile __instance) {
if (Main.debug.Value)
Console.WriteLine("Projectile created");
var trav = Traverse.Create(__instance);
var explodeOnStick = trav.Field("m_ExplodeOnStick");
if (!explodeOnStick.GetValue<bool>()) {
if (Main.debug.Value)
Console.WriteLine("Exploding on stick");
explodeOnStick.SetValue(Main.projectileExplodeOnStick.Value);
}
}
}
}