ac-minetest / basic_machines

Simple automation mod for minetest
17 stars 22 forks source link

Mover sorts source x/y coordinates in ascending order. #18

Closed StaceyRieck closed 5 years ago

StaceyRieck commented 6 years ago

If I configure the mover so that the x or y coordinate for source 1 is larger in value than source 2, they will be flipped independently.

Recreating the issue: Place mover and set the source and dest to: s1: 3,0,1 s2: 2,0,2 t: 3,0,0

Click OK and then right-click to view the source/dest again. They would have changed to

s1: 2,0,1 s2: 3,0,2 t: 3,0,0

This has the effect of flipping the corners of the square so that x/y are always in ascending order. While the same area is covered, which doesn't make a difference in some modes, it is problematic in modes where only source 1 is used. For example, in inventory mode, if I set the sources as follows:

s1: 1,0,0 s2: 0,0,0 (unused)

It will be changed to:

s1: 0,0,0 s2: 1,0,0

And the "inventory" selection drop down box will contain the inventory choices for the mover itself (upgrade and fuel) instead of the correct source. In order to work around this, I am currently setting both sources to the same value when the second one is unused.

Experienced this issue on the Survival X server, which I believe is running this fork: https://github.com/JurajVajda/basic_machines

ac-minetest commented 5 years ago

modifying code without understanding can cause bugs.. who knew?