I didn’t get much done this weekend as I was ill. You can’t have it all! But I have managed to get a few small things done; namely reset.

Currently this was quite a simple job – I just had to thread it through the system in the same way as other things before

  • Created a new Options page in React that has a bit of information about the current application and spaces for buttons like reset – this is tacked onto the bottom of the main page for now.
  • Created a new message type SystemMessage for this sort of message, with some subtypes such as hard reset and soft reset. I suspect
  • Added a handler for my reset link that sends a soft reset message to the worker.
  • Added a confirm dialog (just using the basic browser confirm dialog) before sending the message
  • Handled the message in the worker by calling the reset function that already exists.
  • After handling the message, send an update state for everything.

All in all that was quite easy, which is nice as that pretty much proves the concept that it should be simple to add new features. I also added in a buildings screen, which currently is a bit inactive.

I still have no hard reset, but at the moment there’s nothing that’s not reset in the soft reset! When testing it seems to work; it has the added bonus that I can see the exploration happening in each step – only in the console as I don’t have any graphical feedback yet – as I have also added the unlocks as exploration happens.

So this is just a small step, but it’s always good to have some progress!

Leave a Reply

Your email address will not be published. Required fields are marked *