Added hack fix due to HarmonyXTranspiler

This commit is contained in:
LadyAliceMargatroid 2024-12-17 00:36:39 -08:00
parent b472d9db59
commit aeae936540
4 changed files with 4 additions and 3 deletions

View File

@ -94,7 +94,10 @@ namespace DunGenPlus.Generation {
}
public static int GetMainPathIndexFromTile(Tile tile){
return tileMainPath[tile];
if (tileMainPath.TryGetValue(tile, out var value)){
return value;
}
return 0;
}
public static void AddTileProxy(TileProxy tileProxy, int index) {

View File

@ -50,7 +50,6 @@ namespace DunGenPlus.Generation {
var num = tile.Placement.IsOnMainPath ? globalProp.MainPathWeight : globalProp.BranchPathWeight;
num *= globalProp.DepthWeightScale.Evaluate(tile.Placement.NormalizedDepth);
gameObjectChanceTable.Weights.Add(new GameObjectChance(globalProp.gameObject, num, 0f, null));
}
}

View File

@ -367,7 +367,6 @@ namespace DunGenPlus.Patches {
[HarmonyTranspiler]
[HarmonyPatch(typeof(Dungeon), "FromProxy")]
public static IEnumerable<CodeInstruction> FromProxyPatch(IEnumerable<CodeInstruction> instructions){
var endSequence = new InstructionSequenceStandard("Forloop End");
endSequence.AddBasicLocal(OpCodes.Ldloca_S, 1);
endSequence.AddBasic(OpCodes.Constrained);