Added hack fix due to HarmonyXTranspiler
This commit is contained in:
parent
b472d9db59
commit
aeae936540
Binary file not shown.
|
@ -94,7 +94,10 @@ namespace DunGenPlus.Generation {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int GetMainPathIndexFromTile(Tile tile){
|
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) {
|
public static void AddTileProxy(TileProxy tileProxy, int index) {
|
||||||
|
|
|
@ -50,7 +50,6 @@ namespace DunGenPlus.Generation {
|
||||||
var num = tile.Placement.IsOnMainPath ? globalProp.MainPathWeight : globalProp.BranchPathWeight;
|
var num = tile.Placement.IsOnMainPath ? globalProp.MainPathWeight : globalProp.BranchPathWeight;
|
||||||
num *= globalProp.DepthWeightScale.Evaluate(tile.Placement.NormalizedDepth);
|
num *= globalProp.DepthWeightScale.Evaluate(tile.Placement.NormalizedDepth);
|
||||||
gameObjectChanceTable.Weights.Add(new GameObjectChance(globalProp.gameObject, num, 0f, null));
|
gameObjectChanceTable.Weights.Add(new GameObjectChance(globalProp.gameObject, num, 0f, null));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -367,7 +367,6 @@ namespace DunGenPlus.Patches {
|
||||||
[HarmonyTranspiler]
|
[HarmonyTranspiler]
|
||||||
[HarmonyPatch(typeof(Dungeon), "FromProxy")]
|
[HarmonyPatch(typeof(Dungeon), "FromProxy")]
|
||||||
public static IEnumerable<CodeInstruction> FromProxyPatch(IEnumerable<CodeInstruction> instructions){
|
public static IEnumerable<CodeInstruction> FromProxyPatch(IEnumerable<CodeInstruction> instructions){
|
||||||
|
|
||||||
var endSequence = new InstructionSequenceStandard("Forloop End");
|
var endSequence = new InstructionSequenceStandard("Forloop End");
|
||||||
endSequence.AddBasicLocal(OpCodes.Ldloca_S, 1);
|
endSequence.AddBasicLocal(OpCodes.Ldloca_S, 1);
|
||||||
endSequence.AddBasic(OpCodes.Constrained);
|
endSequence.AddBasic(OpCodes.Constrained);
|
||||||
|
|
Loading…
Reference in New Issue