tesselslate / resetti

Minecraft multi-instance reset macro for speedrunning
GNU General Public License v3.0
15 stars 3 forks source link

Dummy-proof reset and leave preview keybinds #10

Closed kyteware closed 1 year ago

kyteware commented 1 year ago

If you don't have reset or leave preview keybinds set, Resetti will ignore them and move on, assuming they are the default. Instead, I think it would be a good idea to have it fail to start, explaining that these keybinds need to be set.

Current code:

if keyName == "unknown" {
    continue
}
kyteware commented 1 year ago

If you agree, I'll make a pull request.

tesselslate commented 1 year ago

I agree, this is a good idea and a PR would be appreciated. I think it probably makes the most sense to return an error from mc.getInstanceInfo when the user has Leave Preview or their Atum reset key unbound.

Although we don't currently log any errors from getInstanceInfo (we probably should), I think mc.FindInstances should be modified to print errors to the console whenever getInstanceInfo returns them.

kyteware commented 1 year ago

Alright, I'll make a PR.

kyteware commented 1 year ago

Actually, it seems like getInstanceInfo currently returns an error when the window isn't an instance, and user definitely doesn't need to see all of that. I'll have it return a bool in the return tuple that is true when the error is about the instance not being workable and false when the window isn't an instance. If you have an issue with leave, stick it in code review on the PR.

tesselslate commented 1 year ago

Closed by #11