Added the new coilhead behaviour to the knight Added treasure room puzzle for bedroom Changed many LogInfo into LogDebug Removed jank animator override stuff (no offense) Changed how treasure rooms lock their doors to work in multiplayer Removed basement scripts
48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
using HarmonyLib;
|
|
|
|
namespace ScarletMansion.GamePatch {
|
|
[HarmonyPatch(typeof(EnemyVent))]
|
|
public class EnemyVentPatch {
|
|
|
|
/*
|
|
[HarmonyPostfix]
|
|
[HarmonyPatch("BeginVentSFX")]
|
|
public static void BeginVentSFXPatch(ref EnemyVent __instance){
|
|
var comp = __instance.GetComponent<ScarletVent>();
|
|
if (comp) {
|
|
comp.BeginVentSFX();
|
|
}
|
|
}
|
|
*/
|
|
|
|
public static bool setActive = false;
|
|
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch("OpenVentClientRpc")]
|
|
public static void OpenVentClientRpcPatchPre(ref EnemyVent __instance){
|
|
setActive = true;
|
|
}
|
|
|
|
|
|
[HarmonyPostfix]
|
|
[HarmonyPatch("OpenVentClientRpc")]
|
|
public static void OpenVentClientRpcPatchPost(ref EnemyVent __instance){
|
|
if (setActive == false) return;
|
|
|
|
var comp = __instance.GetComponent<ScarletVent>();
|
|
if (comp) {
|
|
Plugin.logger.LogDebug("Doing scalet open vent");
|
|
comp.OpenVentClientRpc();
|
|
}
|
|
|
|
setActive = false;
|
|
}
|
|
|
|
}
|
|
}
|