Page 1 of 1

[0.12.29]Mod API: set_command build_base arguments incorrect

Posted: Sat Mar 26, 2016 9:42 pm
by Afforess
When issuing a set_command to an entity or unit group of the type defines.command.build_base, the ignore_planner option requires an integer value of 0 or 1, rather than the documented true or false.

Ex:

Code: Select all

            entity.set_command({type = defines.command.build_base, destination = safe_base_pos, ignore_planner = true, distraction = defines.distraction.by_damage})
The documentation suggests this is the right format, but Factorio will error with that command. However:

Code: Select all

            entity.set_command({type = defines.command.build_base, destination = safe_base_pos, ignore_planner = 1, distraction = defines.distraction.by_damage})
This form works.

Oxyd and HanziQ on IRC confirmed the issue. Posted here for reference.

Re: [0.12.29]Mod API: set_command build_base arguments incorrect

Posted: Sun Mar 27, 2016 5:44 pm
by Oxyd
Fixed. In 0.12.30, ignore_planner will take a boolean.