cmooref17 / ReservedItemSlotMods

https://thunderstore.io/c/lethal-company/p/FlipMods/ReservedItemSlotCore/
MIT License
1 stars 0 forks source link

[BUG] ReservedFlashlightSlot breaking the game when picking up a laser pointer whilst having a pro flashlight in the reserved slot #48

Open retr0Spektro1d opened 1 month ago

retr0Spektro1d commented 1 month ago

Picking up a laser pointer when you have a flashlight on your reserved slot already creates a NullReferenceException : Object reference not set to an instance of an object

[DETAILED - OUTPUTLOG] [Info : ReservedItemSlotCore-2.0.29] Beginning grab on reserved item: Laser pointer Previous item slot: 2 [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: (wrapper dynamic-method) GameNetcodeStuff.PlayerControllerB.DMD(GameNetcodeStuff.PlayerControllerB)

The said error removes the ability to interact with anything and you have to restart in order to fix it.

Idea: Remove the laser pointer from being supported in the ReservedFlashlightSlot

cmooref17 commented 1 month ago

Thanks for letting me know! Is this something you can consistently replicate? I tried the steps that you just shared, but it's not complaining at all for me.

  1. I pick up a pro flashlight that goes into my reserved item slot.
  2. I then pick up a laser pointer, but nothing breaks, unfortunately.

Anything else that you did that I did not?

cmooref17 commented 1 month ago

Sorry if you don't know all of these answers exactly, or if you don't remember, but was there a special way that you grabbed the laser pointer? Was it on the ground? In a cabinet? Was it turned off when you grabbed it? Was the flashlight you had in your reserved slot turned on, or off? Was the reserved flashlight currently selected?

Thanks!

retr0Spektro1d commented 1 month ago

Thanks for letting me know! Is this something you can consistently replicate? I tried the steps that you just shared, but it's not complaining at all for me.

  1. I pick up a pro flashlight that goes into my reserved item slot.
  2. I then pick up a laser pointer, but nothing breaks, unfortunately.

Anything else that you did that I did not?

It happens inconsistently, sometimes i pick up the laser pointer and stuff goes fine, chance for that to happen i guess? But it still happens nonetheless

I'm playing the game without the use of test mods or indirectly testing the issue if it happens, it happens in real gameplay.

Any laser pointers i have found were laying on the ground and were still causing the issue to happen, unless it is the game itself that is trying to kill itself whenever i do something

(EDIT) It however did happen again literally right now when i was playing, i picked up one laser pointer and got it out of the building with no problem, i saw an another one and when i picked it up, the aforementioned error appeared again making me unable to interact with anything.

(EDIT 2, 05/19/2024, 05:14PM CET) After trimming the amount of mods present in my modlist, its safe to assume that the mod that was most suspicious was BepInEx_MLLoader, for some stupid reason this was causing the entire crapshow to happen. Sorry about reporting it, i can pick up laser pointers when having flashlights now.