naelstrof / KoboldKare

A public repo for the game KoboldKare
Other
86 stars 97 forks source link

Missing/Renamed mod's directory causes settings menu to go missing #313

Closed CanInBad closed 8 months ago

CanInBad commented 8 months ago

version: https://github.com/naelstrof/KoboldKare/commit/1d2e4c0d713954c31c8b451d6e76619d0aa538a9 steam build with manually installed mods

steps to reproduce

  1. save modList.json by enable mod you want to rename its directory later, play a game, and quit the game
  2. rename the mod's directory
  3. load up the game and observe Player.log

for example: I renamed 3039697214_OLD back to 3039697214 and this is the error it game me

Uploading Crash Report
DirectoryNotFoundException: Could not find a part of the path "C:\Users\Gcan\AppData\LocalLow\Naelstrof\KoboldKare\mods\3039697214_OLD\info.json".
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00164] in <6ab147e05ac54e688ea5ae0ad4ef3f2e>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in <6ab147e05ac54e688ea5ae0ad4ef3f2e>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in <6ab147e05ac54e688ea5ae0ad4ef3f2e>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
  at ModManager+ModInfo.LoadMetaData (System.String jsonPath) [0x00000] in <ff306f214a544bc9810c03a67727585e>:0 
  at ModManager+ModInfo.Load (SimpleJSON.JSONNode node) [0x000fd] in <ff306f214a544bc9810c03a67727585e>:0 
  at ModManager+ModInfo..ctor (SimpleJSON.JSONNode node) [0x00006] in <ff306f214a544bc9810c03a67727585e>:0 
  at ModManager.LoadConfig () [0x000f3] in <ff306f214a544bc9810c03a67727585e>:0 
  at ModManager.Start () [0x000db] in <ff306f214a544bc9810c03a67727585e>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in <6ab147e05ac54e688ea5ae0ad4ef3f2e>:0 
  at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00002] in <498923b45f5e4a059d38ed61d29f2cec>:0 
  at UnityEngine.UnitySynchronizationContext.Exec () [0x00056] in <498923b45f5e4a059d38ed61d29f2cec>:0 
  at UnityEngine.UnitySynchronizationContext.ExecuteTasks () [0x00014] in <498923b45f5e4a059d38ed61d29f2cec>:0

and resulting settings screen

Screenshot (20)

CanInBad commented 8 months ago

dupe of #300