Initial
This commit is contained in:
parent
7a77b79dc5
commit
cdadd75ee9
104 changed files with 9416 additions and 0 deletions
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using HarmonyLib;
|
||||
using GameNetcodeStuff;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using BepInEx.Logging;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using DunGen;
|
||||
using LethalLevelLoader;
|
||||
|
||||
namespace ScarletMansion.DunGenPatch {
|
||||
|
||||
public class GeneratePathPatch {
|
||||
|
||||
[HarmonyPatch(typeof(RoundManager), "GenerateNewFloor")]
|
||||
[HarmonyPrefix]
|
||||
public static void DungeonGeneratorGenerate_PrefixPrefix(){
|
||||
// safety check
|
||||
Plugin.logger.LogInfo("Disabling SDM logic");
|
||||
Patch.Deactivate();
|
||||
//Patch.ActivateAnalysis();
|
||||
}
|
||||
|
||||
public static void GeneratePatch(RoundManager roundManager){
|
||||
Plugin.logger.LogInfo("Loading Scarlet Mansion map so we are activating the alt. dungen scripts");
|
||||
Patch.Activate(roundManager.dungeonGenerator.Generator);
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(DungeonGenerator), "GenerateMainPath")]
|
||||
public static void GenerateMainPathPatch(ref DungeonGenerator __instance, ref IEnumerator __result){
|
||||
if (Patch.active && Patch.callAlternative) {
|
||||
GeneratePath.RandomizeLineArchetypes(__instance, true);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(DungeonGenerator), "GenerateBranchPaths")]
|
||||
public static void GenerateBranchPathsPatch(ref DungeonGenerator __instance, ref IEnumerator __result){
|
||||
if (Patch.active && Patch.callAlternative) {
|
||||
__result = GeneratePath.GenerateAlternativeMainPaths(__instance);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(RoundManager), "FinishGeneratingLevel")]
|
||||
public static void GenerateBranchPathsPatch(){
|
||||
if (Patch.active) {
|
||||
Plugin.logger.LogInfo("Alt. InnerGenerate() function complete");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue