EntityPrototype.remove_decoratives bool coercion

User avatar
BrainGamer_
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Sun Nov 14, 2021 9:52 pm
Contact:

EntityPrototype.remove_decoratives bool coercion

Post by BrainGamer_ »

Document that EntityPrototype.remove_decoratives coerces the boolean values true / false to "true" / "false" respectively.

Additionally since apparently a lot of these coercion cases have been removed in 1.2/2.0/younameit removing this case aswell might be good.
Alternatively change the type to be a union of "automatic" or bool instead of "automatic" or "true" or "false".

Feel free to move this thread to the appropriate forum of course.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14413
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: EntityPrototype.remove_decoratives bool coercion

Post by Rseding91 »

BrainGamer_ wrote: Mon Feb 12, 2024 11:03 pm ... removing this case aswell might be good.
I can confirm it is removed in 2.0 as part of the generic prototype-construction-does-not-auto-coerce.
If you want to get ahold of me I'm almost always on Discord.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: EntityPrototype.remove_decoratives bool coercion

Post by Bilka »

Thank you for noting this here, added for the next doc release, including a deprecation notice.
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”