Page 1 of 1

[TOGoS] [0.17.28] autoplace_specification.control returns nil on resource with control specified

Posted: Tue Apr 09, 2019 11:11 pm
by Earendel
Resources are not returning the control used to affect their placement.

https://lua-api.factorio.com/latest/Con ... cification
control :: string (optional): Control prototype name

Code: Select all

["crude-oil"] = {
   autoplace = {
     control = "crude-oil",
     order = "c",
     probability_expression = {...},
     richness_expression = {...}
   },
   ...
/c game.print(game.entity_prototypes["crude-oil"].autoplace_specification.control)
returns nil

My guess is that control is for peaks, but with expressions the control is baked into the expression so it is removed during a validation phase? Even so, if it is specified shouldn't it appear in the sanitized version. There are other things that do carry through even if they have no effect because other properties take precedence.

Re: [TOGoS] [0.17.28] autoplace_specification.control returns nil on resource with control specified

Posted: Tue Apr 30, 2019 1:51 am
by TOGoS
You guessed right. 'control' was arbitrarily not included in the Lua table for non-peak-based AutoplaceSpecifications. It will be in 0.17.35. Thanks for the report!