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

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 703
Joined: Sun Nov 23, 2014 11:57 am
Contact:

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

Post 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.

TOGoS
Former Staff
Former Staff
Posts: 85
Joined: Fri Jun 24, 2016 2:29 pm
Contact:

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

Post 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!

Post Reply

Return to “Resolved Problems and Bugs”