There is no game.prototype_entity["assembling-machine-2"].crafting_categories even though I'm staring right at it in the raw files (Factorio\data\base\prototypes\entity) and there seems to be no way to access that piece of data. Does anyone know another way to access that data? I've now spend around a hour trying to find another way but it seems impossible.
Otherwise I'm thinking about asking the devs to add it since it's already in the data files but somehow inaccessible through the control.lua.
[Solved] Prototype entity attribute seems to be missing
[Solved] Prototype entity attribute seems to be missing
Last edited by kikker450 on Mon May 08, 2017 8:46 am, edited 1 time in total.
Re: Prototype entity attribute seems to be missing
I don't see the crafting_categories property in LuaEntityPrototype either, so you would need a small workaround for accessing it at control.lua stage.
Take a look at this. Using this you can read the data.raw table at runtime:
Take a look at this. Using this you can read the data.raw table at runtime:
Code: Select all
data.raw["assembling-machine"]["assembling-machine-2"].crafting_categories
My mods:
Re: Prototype entity attribute seems to be missing
That mod is a giant hack - I don't advise ever using it.321freddy wrote:I don't see the crafting_categories property in LuaEntityPrototype either, so you would need a small workaround for accessing it at control.lua stage.
Take a look at this. Using this you can read the data.raw table at runtime:Code: Select all
data.raw["assembling-machine"]["assembling-machine-2"].crafting_categories
If some property isn't available simply request it and I'll add it for the next version of the game (see: viewtopic.php?f=65&t=46735)
If you want to get ahold of me I'm almost always on Discord.