jinxOAO / DSPmods_BepInEx

mods for DSP
4 stars 5 forks source link

RecycleableFuelRods outdated #32

Closed siweipancc closed 2 years ago

siweipancc commented 2 years ago

这个mod在最近一次更新已经失效了

[Error  :  HarmonyX] Failed to patch int PlanetFactory::InsertInto(int entityId, int offset, int itemId, byte itemCount, byte itemInc, Byte& remainInc): System.Exception: Cannot assign method return type System.Int32 to __result type System.Boolean for method int PlanetFactory::InsertInto(int entityId, int offset, int itemId, byte itemCount, byte itemInc, Byte& remainInc)
  at HarmonyLib.Public.Patching.HarmonyManipulator.EmitCallParameter (HarmonyLib.Internal.Util.ILEmitter il, System.Reflection.MethodBase original, System.Reflection.MethodInfo patch, System.Collections.Generic.Dictionary`2[TKey,TValue] variables, System.Boolean allowFirsParamPassthrough, Mono.Cecil.Cil.VariableDefinition& tmpObjectVar, System.Collections.Generic.List`1[HarmonyLib.Public.Patching.HarmonyManipulator+ArgumentBoxInfo]& tmpBoxVars) [0x003a4] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0
  at HarmonyLib.Public.Patching.HarmonyManipulator.WritePrefixes (HarmonyLib.Internal.Util.ILEmitter il, System.Reflection.MethodBase original, HarmonyLib.Internal.Util.ILEmitter+Label returnLabel, System.Collections.Generic.Dictionary`2[TKey,TValue] variables, System.Collections.Generic.ICollection`1[T] prefixes, System.Boolean debug) [0x00128] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0
  at HarmonyLib.Public.Patching.HarmonyManipulator.MakePatched (System.Reflection.MethodBase original, MonoMod.Cil.ILContext ctx, System.Collections.Generic.List`1[T] prefixes, System.Collections.Generic.List`1[T] postfixes, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] finalizers, System.Collections.Generic.List`1[T] ilmanipulators, System.Boolean debug) [0x00192] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0
[Error  : Unity Log] Exception: Cannot assign method return type System.Int32 to __result type System.Boolean for method int PlanetFactory::InsertInto(int entityId, int offset, int itemId, byte itemCount, byte itemInc, Byte& remainInc)
Stack trace:
HarmonyLib.Public.Patching.HarmonyManipulator.EmitCallParameter (HarmonyLib.Internal.Util.ILEmitter il, System.Reflection.MethodBase original, System.Reflection.MethodInfo patch, System.Collections.Generic.Dictionary`2[TKey,TValue] variables, System.Boolean allowFirsParamPassthrough, Mono.Cecil.Cil.VariableDefinition& tmpObjectVar, System.Collections.Generic.List`1[HarmonyLib.Public.Patching.HarmonyManipulator+ArgumentBoxInfo]& tmpBoxVars) (at <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.WritePrefixes (HarmonyLib.Internal.Util.ILEmitter il, System.Reflection.MethodBase original, HarmonyLib.Internal.Util.ILEmitter+Label returnLabel, System.Collections.Generic.Dictionary`2[TKey,TValue] variables, System.Collections.Generic.ICollection`1[T] prefixes, System.Boolean debug) (at <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.MakePatched (System.Reflection.MethodBase original, MonoMod.Cil.ILContext ctx, System.Collections.Generic.List`1[T] prefixes, System.Collections.Generic.List`1[T] postfixes, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] finalizers, System.Collections.Generic.List`1[T] ilmanipulators, System.Boolean debug) (at <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0)
Rethrow as HarmonyException: IL Compile Error (unknown location)
HarmonyLib.Public.Patching.HarmonyManipulator.MakePatched (System.Reflection.MethodBase original, MonoMod.Cil.ILContext ctx, System.Collections.Generic.List`1[T] prefixes, System.Collections.Generic.List`1[T] postfixes, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] finalizers, System.Collections.Generic.List`1[T] ilmanipulators, System.Boolean debug) (at <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.Manipulate (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo, MonoMod.Cil.ILContext ctx) (at <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0)
HarmonyLib.Public.Patching.ManagedMethodPatcher.Manipulator (MonoMod.Cil.ILContext ctx) (at <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0)
MonoMod.Cil.ILContext.Invoke (MonoMod.Cil.ILContext+Manipulator manip) (at <5be58f3c80ca41c4960cf35eb47d4341>:0)
MonoMod.RuntimeDetour.ILHook+Context.InvokeManipulator (Mono.Cecil.MethodDefinition def, MonoMod.Cil.ILContext+Manipulator cb) (at <a3e7db5d9f924acea1a3fada3479a63b>:0)
DMD<Refresh>?612560384._MonoMod_RuntimeDetour_ILHook+Context::Refresh (MonoMod.RuntimeDetour.ILHook+Context this) (at <b23a77c79efc4bf2a7257cdd474a9415>:0)
DMD<>?612560384.Trampoline<MonoMod.RuntimeDetour.ILHook+Context::Refresh>?-1715330048 (System.Object ) (at <082ddb54db994b38a48546100c059d83>:0)
HarmonyLib.Internal.RuntimeFixes.StackTraceFixes.OnILChainRefresh (System.Object self) (at <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0)
MonoMod.RuntimeDetour.ILHook.Apply () (at <a3e7db5d9f924acea1a3fada3479a63b>:0)
HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) (at <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0)
Rethrow as HarmonyException: IL Compile Error (unknown location)
HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) (at <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0)
HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) (at <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0)
Rethrow as HarmonyException: IL Compile Error (unknown location)
HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) (at <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0)
HarmonyXInterop.HarmonyInterop.ApplyPatch (System.Reflection.MethodBase target, HarmonyXInterop.PatchInfoWrapper add, HarmonyXInterop.PatchInfoWrapper remove) (at <6f3ef141a15c4e6ab23110cfdb515088>:0)
HarmonyLib.Internal.MethodPatcher.Apply () (at <4219818e0dc246b59423181a6728d40d>:0)
HarmonyLib.PatchProcessor.Patch () (at <4219818e0dc246b59423181a6728d40d>:0)
HarmonyLib.Harmony.PatchAll (System.Type type) (at <4219818e0dc246b59423181a6728d40d>:0)
HarmonyLib.Harmony.CreateAndPatchAll (System.Type type, System.String harmonyInstanceId) (at <4219818e0dc246b59423181a6728d40d>:0)
RecyclableFuelRod.RecyclableFuelRod.Start () (at <7d9dec3b77fd4cc5bf2984b9ce218917>:0)
jinxOAO commented 2 years ago

十分抱歉,我整了一天多也没整好,bug红字、游戏闪退层出不穷。我水平有限,加上新的可能是增产剂等等的缘故,很多游戏内的逻辑改得我看不懂了。我能想到一个退路就是,直接添加一个只用重氢合成燃料棒的配方,或许能够在原来的存档中维持建筑布局,省的大改。但是仍然可能需要重新对每个建筑选择(或复制粘贴)一遍配方。如果你觉得有必要我就试试这个,原有的这个mod我目前是没有能力给他修好了0.0

jinxOAO commented 2 years ago

更新了。 https://dsp.thunderstore.io/package/jinxOAO/RecycleableFuelRods/ 有其他问题请反馈,感谢。

siweipancc commented 2 years ago

感谢,我的朋友!