Saving redstone power of ICs
LadyCailinBot opened this issue ยท 10 comments
CRAFTBOOK-2444 - Reported by noneandnonly
I set up a redstone circuit that is an endless cycle which should get power once and then pass it forever. It's times with Pulser by having long delays of waiting as well as long times of outputting redstone.
The problem is that my circuit/the whole cycle breaks when the server restarts and the reason is pretty obvious. CraftBook doesn't save redstone power in the ICs so when the server restarts it doesn't know what was powered and what wasn't, so it just resets them all.
What I am asking for is a way to save the powered ICs when the server stops and then start the ICs after a startup again (doesn't have to save the timing/delay though, it's enough to know if the IC was powered or not. I can't reset the cycle by hand every time).
All it probably needs is a text file which saves the location of the ICs which were powered when the server shut down and then when the plugin gets loaded start that IC again.
Edit1: The first suggestion I got on IRC was to break redstone or push a block over a redstone torch with a piston, to cause a redstone update, but this will not work in this case because my circuit is 98% based on ICs, redstone's just needed to pass the power (sometimes just for two ticks).
It would be a really great pleasure to me if you could do this,
Folas
Comment by me4502
I personally have a few issues with how it would work. But i'd have to talk with Dark_Arc.
Comment by noneandnonly
Would be so amazing if you could really do that. Thanks for thinking about it (again?).
Comment by Dark_Arc
Hm... It's an interesting concept, we could do something kind of freaky and have the sign change from say "[MC1000]" to "{MC1000}" when powered in the future... That could be a solution... But the thing is I don't think the current IC system would work for this well at all, and by the time we have a new IC system there will either be a better solution, or we will have IC blocks and could just store the charge anyways...
Comment by me4502
If the bukkit metadata was persistent, we could use that.. but it isn't. I don't want to make a database.
Comment by noneandnonly
How about an optional database then? Add a parameter in the config which is "false" by default but you can turn it on if you want to.
When is that "new IC system" going to be released to public :)?
Comment by me4502
We don't exactly have one yet. I still don't like the idea of a Database.. FalseBook used one and it caused more harm than good. And if we had one, it'd be SQLite.
Comment by noneandnonly
Thus it's not essentials you can keep it as just an option (with big warnings in the config if you want to turn it to "true" for example) and otherwise it will still go the old way. No harm to people that didn't inform themselves and only a risk to people that would like to have it (like me).
Comment by noneandnonly
Why don't you change the text on the IC (like Dark_Arc suggested first)?
You also have (had?) that on chunk anchors, so what's the problem with this idea?
Comment by me4502
I find that untidy, also we would need to have 2 matcher arguments.