[kovarex] [1.1.0] on_pre_build flip_horizontal/vertical are ints, not boolean

This subforum contains all the issues which we already resolved.
User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 471
Joined: Sun May 21, 2017 6:28 pm
Contact:

[kovarex] [1.1.0] on_pre_build flip_horizontal/vertical are ints, not boolean

Post by Therax »

The flip_horizontal and flip_vertical fields of the on_pre_build event are documented as being boolean true/false, but in fact are Lua numbers 0 and 1. This is a problem since in Lua 0 is truthy, so

Code: Select all

if ev.flip_horizontal then ... end
does not behave as expected.
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [1.1.0] on_pre_build flip_horizontal/vertical are ints, not boolean

Post by kovarex »

Thanks for the report, fixed for the 1.1.1 release.
Post Reply

Return to “Resolved Problems and Bugs”