Search found 2 matches
- Sat Jan 28, 2023 6:10 pm
- Forum: Modding help
- Topic: Luaentityprototype doesnt contain key energy_source, even though it is filtered for craftingmachine
- Replies: 3
- Views: 884
Re: Luaentityprototype doesnt contain key energy_source, even though it is filtered for craftingmachine
Yeah, but its filtered for crafting machine, which does have that key
- Sat Jan 28, 2023 5:33 pm
- Forum: Modding help
- Topic: Luaentityprototype doesnt contain key energy_source, even though it is filtered for craftingmachine
- Replies: 3
- Views: 884
Luaentityprototype doesnt contain key energy_source, even though it is filtered for craftingmachine
for _, entity in pairs(game.get_filtered_entity_prototypes({{filter = "crafting-machine"}})) do
if entity.energy_source == "burner" and need_fuel(entity) == false then
_fuel_list[entity.name] = _fuel
end
Kmachine[entity.name] = true
end
the above code causes the error "LuaEntityPrototype ...