[Suggestion] Factory Redstone Control
LezChap opened this issue ยท 3 comments
Playing the 1.16 version, and I see nothing in the book or delving into the code that allows redstone (or other) control over the factories...so I suggest it be added.
Some ideas:
Heart - Completely turns off the Factory
Mob Controllers or Primary/Secondary Bases - Turns on/off each Mob Controller from spawning individually
Perk - If multiple levels of perk are available, you can use analog redstone power levels to choose a lower one (ie if you have all 3 available, power 0 = no control, 1-5 is Tier 1, 6-10 Tier 2, 11-15 Tier 3)
I had redstone control on the factory heart in previous versions of Woot and it is something that I do need to add to this one. This will allow simple on/off control of the factory.
I like the ideas for other redstone control and something I might consider in later versions (not sure how complicated they would be to actually do)
I don't know the code as well as you do, but it looks like you regularly re-validate the structure (looking for new or replaced perks/mob controllers). Shouldn't be too hard to code a redstone check into that structure validation process?
It appears that putting a lever on the heart and giving a redstone signal, will currently stop the factory - I had added that but completely forgotten about it.
Structure validation only happens when a block is placed/removed or an upgrade is added - they basically cause a hello or goodbye event to be sent to the factory heart and that then schedules a rescan of the factory. Periodic scanning of multiblock structures tends to be frowned upon and an event based mechanism is preferred.
To process the redstone signal on any of the other blocks, would cause a revalidation and reset of the factory recipe, currently losing all progress. It is not impossible, just more effort beyond the simpler heart on/off.