PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

[Feature Request] Consistent behaviour for foreach puzzle piece

duncanwebb opened this issue ยท 3 comments

commented

Would it be possible for the foreach puzzle piece to behave like the dig puzzle piece?

Say a area is defined as 3x3 so if the first coordinate was n-e the other coordinate would be s-w and the drone could iterate either horizontally or vertically like:
west-east

3 2 1
6 5 4
9 8 7

or north-south

7 4 1
8 5 2
9 6 3

I have a program to demonstrate this in a 2x2 where the behaviour is different depending on where the drone is placed. https://pastebin.com/MF0Masqh

Thanks again

commented

I just pushed a change which might help a little, not certain. It should make the algorithm that determines iteration order a little more deterministic:

  • When sorting by distance, it will now always sort from the centre of the block that the drone is currently in.
  • If the distance from the drone to two blocks is too close to call, then it will sort by blockpos: first by the Y position, then by the Z position & finally by the X position.

Not sure if this will help, but worth testing out. Any deeper changes to the area sorting system would be way more intrusive, need a lot of GUI work, and could have potentially destabilising effects on the code in general. So I'm reluctant to change too much more here for now...

Anyway this is now in build 353 from https://jenkins.k-4u.nl/job/PneumaticCraft-Repressurized/ if you'd like to have a play. Just be aware that this build also includes Tough As Nails integration, so be careful if working near any hot or cold PNC machines (or make some Air Conditioning Upgrades for your Pneumatic Chestplate!)

commented

Done some initial tests and so far it looks consistent, will perform more. Many thanks for this.

I like the air conditioning upgrades too, very useful for this pack.

commented

Added in 0.11.0 release