[1.0.0] util.moveposition only works with array-like positions

Bugs that are actually features.
Post Reply
sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

[1.0.0] util.moveposition only works with array-like positions

Post by sparr »

https://github.com/wube/factorio-data/b ... #L114-L131

This function only works with positions that look like {5,1}, not the kind that look like {x=5,y=1} which come from the API.

I've written a version that honors both types of positions, and also supports the diagonal defined directions, if that would be helpful.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [1.0.0] util.moveposition only works with array-like positions

Post by Klonan »

Its not a bug, it was never specified that it would work as you describe

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [1.0.0] util.moveposition only works with array-like positions

Post by sparr »

It's weird for a function in the core library to call something a "position" but not work with the Position type that the rest of the API returns.

Post Reply

Return to “Not a bug”