Can anyone give me an example of a patch script that replaces an existing method with my own code? I'm trying to add my code in BlockPowerDoor.ActivateBlock but it keeps coming up like this, I get basically the same result when trying to add new methods as well, I can create the method but cant put anything in it.
// BlockPoweredDoor
public override bool ActivateBlock(WorldBase _world, int _cIdx, Vector3i _blockPos, BlockValue _blockValue, bool isOn, bool isPowered)
{
//IL_0006: Expected I4, but got O
return ((BlockPoweredDoorPatchFunctions)/*Error near IL_0006: Stack underflow*/).ActivateBlock_Patch((WorldBase)/*Error near IL_0006: Stack underflow*/, (int)/*Error near IL_0006: Stack underflow*/, (Vector3i)/*Error near IL_0006: Stack underflow*/, (BlockValue)/*Error near IL_0006: Stack underflow*/, (byte)/*Error near IL_0006: Stack underflow*/ != 0, (byte)(int)this != 0);
}