rfvgyhn / min-ed-launcher

Minimal Elite Dangerous Launcher
MIT License
251 stars 9 forks source link

Feature request: Toggle auto-restart on/off by pressing a key in the console window #108

Open Identifier opened 1 year ago

Identifier commented 1 year ago

Describe the issue When I stumble upon a HGE I often want to use /restart 0 to farm the mats as fast as possible. And then when I'm done farming I just manually kill the MinEdLauncher console window before exiting Elite. The problem is that sometimes I forget to kill the MinEdLauncher console window before quitting Elite for good, so it auto-launches again.

I wish I could always just launch without the /restart flag for the normal case, but then enable it on-the-fly on those occasions that I run across a nice HGE.

Suggestion It would be much more convenient if MinEdLauncher's console window could simply have prompt that toggles auto-restart on or off. The console window is just sitting there anyway, it would be nice if I could alt-tab to it and press 'R' to your tool to have it toggle auto-restart on, even though I didn't specify the /restart flag.

HalJordan commented 5 months ago

This would definitely be a QoL improvement.

rfvgyhn commented 2 months ago

Unfortunately, this isn't trivial to implement. The way things work currently is by doing a blocking call to wait for ED to exit. This means another thread or moving launching the ED process to its own task and then doing some synchronization work would be required to read user input.

Certainly not impossible, but I'll likely not get around to it anytime soon (if that wasn't already inferred from my abysmal response time to this issue).

HalJordan commented 1 week ago

Maybe use a touch file? If it exists auto restart, if not skip?

HalJordan commented 1 week ago

To flesh out my idea, on startup, check the config, if auto-restart is enabled, make a touch file. When it comes time to restart, check for the file, if it's not there, break out, and clean up the file on close.

This way if you forget to enable it, you can make the file. You don't have to plan ahead when you start the game as to whether or not you want to go through "the expected gameplay mechanics" of a re-log loop to refresh the collectables.

rfvgyhn commented 2 days ago

That's an interesting idea. I'll add it to the to-do list.