More precise type information for has_flag

curiosity
Filter Inserter
Filter Inserter
Posts: 484
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

More precise type information for has_flag

Post by curiosity »

Right now the type of the parameter is listed as string whereas in fact it's one of the respective string literals (and the game will error if you try to pass any other string). This affects all instances of the method (including ghost_has_flag).
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: More precise type information for has_flag

Post by Bilka »

Thanks for pointing this out, all has_flag and ghost_has_flag methods will have better types for the next version. The types of the Flags concepts have been split similarly to how CollisionMask and CollisionMaskLayer are separate types for the dictionary and the union of strings.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Resolved Requests”