Page 1 of 1

Override-problem

Posted: Sat Feb 27, 2016 12:27 pm
by Nasabot
In my mod I had some problem with override. Lets look at 2 different cases:

data.raw.recipe["xyz"].ingredients = xyz
and
data.raw.assembling-machine["xyz"].energy = xyz

The problem is, that the assembling machine override seam to not work because of the "-".(and a lot of entities have its type defined like this) Its possible to bypass this problem by substituting an assembling machine with a new entity, but this is a tedious and untidy process.

Does anybody know if there is possibility to solve this?

Re: Override-problem

Posted: Sat Feb 27, 2016 12:35 pm
by keyboardhack
If i understand your question correctly then you want to do this.

Code: Select all

data.raw.["assembling-machine"]["xyz"].energy = xyz

Re: Override-problem

Posted: Sat Feb 27, 2016 5:27 pm
by Nasabot
Yes, you understood my question, but unfortunatly this does not work.
I tried several different combinations like
data.raw.("assembling-machine")["xyz"].energy = xyz
data.raw.[assembling-machine]].["xyz"].energy = xyz
etc.
Does not work.

Re: Override-problem

Posted: Sat Feb 27, 2016 5:29 pm
by Choumiko
data.raw["assembling-machine"]["xyz"].energy = xyz

no dots when using [], probably a type from keyboardhack ;)

Re: Override-problem

Posted: Sat Feb 27, 2016 8:47 pm
by Nasabot
Thanks bro. No it works! Very useful!