Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resuming from shutdown #2

Open
fatboychummy opened this issue Oct 30, 2023 · 0 comments
Open

Resuming from shutdown #2

fatboychummy opened this issue Oct 30, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@fatboychummy
Copy link
Member

I would like to be able to resume the program from a shutdown (ie: if the chunk unloaded then reloaded, or server restarted, or etc.).

I have a bit of this implemented already, but it's currently just "dead code" hanging there doing nothing.

I have an ideas for implementation, but I'm not sure how much I like it. A lot can go wrong and data can be lost.

It would first move any startup.lua, startup, and startup/ files/folders into a temporary directory. From there, it would create a new startup file that just runs dog with some specific arguments.

On program completion, it would restore the old files. Perhaps even reboot again so other startup files can run when the turtle returns.

Another idea would be to simply create (or enter) a startup folder and create something like 00_dog.lua which just runs the dog program. This can run into other issues though, if for example the user has some kind of operating system that runs from the main startup.lua, causing dog to never be rerun.

@fatboychummy fatboychummy added enhancement New feature or request help wanted Extra attention is needed labels Oct 30, 2023
@fatboychummy fatboychummy self-assigned this Oct 30, 2023
@fatboychummy fatboychummy transferred this issue from Fatboychummy-CC/etc-programs Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: Todo
Development

No branches or pull requests

1 participant