This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Sebra's profile picture

[1.3]State restored at save/load (easy way)

Started by Sebra, 29 February 2012 - 03:04 PM
Sebra #1
Posted 29 February 2012 - 04:04 PM
I want many things of this great mod, but not sure to fill all ideas in one thread.
This one is easiest and one of most needed.
I understand impossibility of storing whole damp and full state of each comp in game. So I suggest to save and load just On/Off and rs/bundled output states. Think about save/load as a global reset. This way each turned on turtle/comp will have a chance to restore it's state/task by using startup properly. I hope it is easy enough to be done without problems.
Hawk777 #2
Posted 29 February 2012 - 08:54 PM
On/off state is already saved. Saving bundled output state seems like probably a reasonable request IMO; if you don't want it saved, you can always set them all to zero at the start of your program. On the other hand, for the time being, you could easily work around it by writing a wrapper around redstone.setBundledOutput() that also saves the states of the six directions to a file on disk each time they're changed and then, at startup, reapply those states.
Matchlighter #3
Posted 05 March 2012 - 04:50 AM
Theoretically, it isn't too difficult to save the current Environment, which is a large step. The more difficult part would be where it currently in the code (which might actully be supported in LuaJ.