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?
Override-problem
-
- Filter Inserter
- Posts: 478
- Joined: Sat Aug 23, 2014 11:43 pm
- Contact:
Re: Override-problem
If i understand your question correctly then you want to do this.
Code: Select all
data.raw.["assembling-machine"]["xyz"].energy = xyz
Waste of bytes : P
Re: Override-problem
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.
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
data.raw["assembling-machine"]["xyz"].energy = xyz
no dots when using [], probably a type from keyboardhack
no dots when using [], probably a type from keyboardhack
Re: Override-problem
Thanks bro. No it works! Very useful!