Pipe connection position rounding

Place to report issues and suggest improvements to the API documentation.
sparr
Smart Inserter
Smart Inserter
Posts: 1519
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Pipe connection position rounding

Post by sparr »

I recently discovered that pyanodons mods define some tank entities with pipe connections that have small offsets from my expectations, +/- 0.4 or 0.7 from the usual centers of tiles. https://github.com/pyanodon/pyindustry/ ... ua#L45-L60

I learned on Discord that some rounding is done to match up the connection positions to other entity connection positions, but it's not clear to me how that rounding works. Someone suggested it's always to tile centers. Someone else suggested it's to the nearest 0.5 (i.e. tile centers, tile corners, and the middles of tile edges).

It would be nice if the docs described how this works. I need this info so I can correctly handle mods with weird pipe definitions, like the big pipes in schall pipe scaling, pymods unusual offsets, etc.
Post Reply

Return to “Documentation Improvement Requests”