get_control_behavior

Place to get help with not working mods / modding interface.
Post Reply
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

get_control_behavior

Post by darkfrei »

Hi all!

There is function of Constant Combinator:
ConstantCombinatorControlBehavior.parameters
It means, if I need this parameters, it looks like:

Code: Select all

local parameters = entity.get_control_behavior().parameters.parameters
and this table is like

Code: Select all

{count = 1, index = 1, signal = {name ="signal-ID", type = "virtual"}}, -- if full
{count = 1, index = 2, signal = {type = "item"}}, -- if empty
Why we have this .parameters.parameters? Why not just .parameters?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: get_control_behavior

Post by Rseding91 »

It's an artifact of how blueprints export as strings. I could fix it but it will break every mod that uses it this way.
If you want to get ahold of me I'm almost always on Discord.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: get_control_behavior

Post by DaveMcW »

Sounds like a good fix for 0.16 then. :D

Post Reply

Return to “Modding help”