The test in my mod file: control.lua
Code: Select all
script.on_event(defines.events.on_gui_click, function(e)
something = game.entity_prototypes["assembling-machine-1"].crafting_categories
end
but things like this do workError while running event dinges::on_gui_click (ID 1)
LuaEntityPrototype doesn't contain key crafting_categories.
Code: Select all
script.on_event(defines.events.on_gui_click, function(e)
something = game.entity_prototypes["assembling-machine-1"].crafting_speed
end
It clearly is an attribute of the entity in (Factorio\data\base\prototypes\entity\demo-entities.lua)
Code: Select all
crafting_categories = {"crafting"},
crafting_speed = 0.5,
If there is some way to get the value I'm obviously in the wrong ;P.