private static void Prefix(CrafterGhostModel __instance, ref float progress) { var crafter = __instance.GetComponent <Crafter>(); if (!Handler.IsModified(crafter)) { return; } progress = 1 - progress; }
private static void Postfix(CrafterGhostModel __instance) { var crafter = __instance.GetComponent <Crafter>(); if (!Handler.IsModified(crafter)) { return; } foreach (var mat in (List <Material>)ghostMaterialsFieldInfo.GetValue(__instance)) { if (mat.name != "DontRender") { mat.SetColor(ShaderPropertyID._BorderColor, Config.GhostColor); } } }