Stockpile

Stockpile

141k Downloads

Implement Parent-based multiblocks

branchpanic opened this issue ยท 4 comments

commented

Internal draft for #42 and beyond. All names subject to change. I'm aware that there's an issue with type erasure below but I'll figure it out when I get to it.

  • Barrels will have a new Parent component (maybe LBA attribute?)
  • When a barrel is placed...
    • next to a controller...
      • record the controller's position in the barrel
      • record the barrel's position in the controller
    • next to a barrel...
      • if that barrel has a set parent, copy it
      • record the barrel's position in the controller
  • When a barrel is destroyed...
    • remove its position from the controller
    • clear the tag in the barrel (we don't want it to persist)
    • check to see if neighbors are contiguous. if not...
      • figure out which ones need to be disconnected and clear the associations between all of them
  • When the controller is destroyed...
    • clear all associations
  • When inserting into a barrel...
    • hook in if there's a remainder stack and give it to the controller to distribute to any other barrels

Again this is just a sketch of how things will go, so optimizations will come in due time.

commented

Any progress on this? It's a major feature to have for automation of a centralized storage system, and I believe would benefit the mod greatly. If not, how can I start contributing?

commented

The gist is that I'm still working through this (the core is mostly done and optimization is the main remaining challenge) and plan to ship it as one of the last feature updates of the mod. I had to refocus on the 1.15 update for a while, but can return to this relatively soon.

For now I'm not sure if there's any way to contribute but if something comes up I'll certainly update the issue.

commented

Awesome! Keep up the good work :)

commented

Blocked by #75, but basically everything is right now