beatlepie / ONI-Mods

2 stars 3 forks source link

Game crashing when Reapy's Dock is deconstructed. #4

Open Matze149 opened 2 years ago

Matze149 commented 2 years ago

The game crashes if you deconstruct a Reapy's Dock with a Reapy. The message is: Exception in: (ReapBot).SweepBotTrappedMonitor.root.death. System.NullReferenceException: Object reference not set to an instance of an object at SweepBotTrappedMonitor+<>c.b__6_3 (SweepBotTrappedMonitor+Instance smi) [0x00010] in <33cbadb4d53344698461e1b8bda03e57>:0 at StateMachine4+GenericInstance[StateMachineType,StateMachineInstanceType,MasterType,DefType].ExecuteActions (StateMachine4+State[StateMachineType,StateMachineInstanceType,MasterType,DefType] state, System.Collections.Generic.List`1[T] actions) [0x00048] in <33cbadb4d53344698461e1b8bda03e57>:0

at UnityEngine.Debug.LogError (System.Object message, UnityEngine.Object context) [0x00000] in <9fe2cbebfa394c8da6af069ec8cc9ef4>:0 at Debug.LogError (System.Object obj, UnityEngine.Object context) [0x00000] in <53ba8544b0394db88dcaac034e1fe553>:0 at DebugUtil.LogErrorArgs (UnityEngine.Object context, System.Object[] objs) [0x00000] in <53ba8544b0394db88dcaac034e1fe553>:0 at DebugUtil.LogException (UnityEngine.Object context, System.String errorMessage, System.Exception e) [0x00000] in <53ba8544b0394db88dcaac034e1fe553>:0 at StateMachine4+GenericInstance[StateMachineType,StateMachineInstanceType,MasterType,DefType].ExecuteActions (StateMachine4+State[StateMachineType,StateMachineInstanceType,MasterType,DefType] state, System.Collections.Generic.List1[T] actions) [0x00000] in <33cbadb4d53344698461e1b8bda03e57>:0 at StateMachine4+GenericInstance[StateMachineType,StateMachineInstanceType,MasterType,DefType].PushState (StateMachine+BaseState state) [0x00000] in <33cbadb4d53344698461e1b8bda03e57>:0 at StateMachine4+GenericInstance[StateMachineType,StateMachineInstanceType,MasterType,DefType].GoTo (StateMachine+BaseState base_state) [0x00000] in <33cbadb4d53344698461e1b8bda03e57>:0 at SweepBotTrappedMonitor.<InitializeStates>b__6_0 (SweepBotTrappedMonitor+Instance smi, System.Single dt) [0x00000] in <33cbadb4d53344698461e1b8bda03e57>:0 at BucketUpdater1[DataType].Update (DataType data, System.Single dt) [0x00000] in <53ba8544b0394db88dcaac034e1fe553>:0 at UpdateBucketWithUpdater`1[DataType].Update (System.Single dt) [0x00000] in <53ba8544b0394db88dcaac034e1fe553>:0 at StateMachineUpdater+BucketGroup.AdvanceOneSubTick (System.Single dt) [0x00000] in <53ba8544b0394db88dcaac034e1fe553>:0 at StateMachineUpdater.AdvanceOneSimSubTick () [0x00000] in <53ba8544b0394db88dcaac034e1fe553>:0 at Game.SimEveryTick (System.Single dt) [0x00000] in <33cbadb4d53344698461e1b8bda03e57>:0 at Game.Update () [0x00000] in <33cbadb4d53344698461e1b8bda03e57>:0 Build: U41-498381-V

LinearBotSystems commented 1 year ago

I can confirm also the dubes try to harvest what the harvester already has harvested

Matze149 commented 1 year ago

I've went through the code, the problem is that the original SweepBotTrappedMonitor.cs tries to access the component "OrnamentReceptacle".

This can be fixed in 1 of 2 ways: