rphsoftware/OneLoader

package.json editing only applies after game is restarted

Pixelguin opened this issue · 2 comments

The mod Window Scaling Fix uses package.json editing, but it only applies the next time OMORI is launched.

Reproduce:

  • Install OneLoader 1.4
  • Install Window Scaling Fix
  • Launch OMORI --> window scaling is not fixed
  • Close OMORI
  • Launch OMORI again --> window scaling is fixed

This is possible to reproduce even if the mod ZIP is deleted:

  • Install OneLoader 1.4
  • Install Window Scaling Fix
  • Launch OMORI --> window scaling is not fixed
  • Close OMORI
  • Delete Window Scaling Fix from the www/mods folder
  • Launch OMORI --> window scaling is fixed
  • Close OMORI
  • Launch OMORI --> window scaling is not fixed

Recommend restarting the game like it does when patching the game icon Rph.

The package.json code already performs a full game restart if it detects changes though ( https://github.com/rphsoftware/OneLoader/blob/master/www/modloader/packagejson_engine.js#L45 )
I guess this does not fully cause the change to apply which is rather annoying. I have personally not ran into this issue before, so I think some extra testing needs to be done.