Set belt_to_ground_type?
Posted: Thu Mar 24, 2016 3:09 am
So I am trying to make a new item (extraction-belt), implemented as a transport-belt-to-ground.
I have this in my Entity.lua:
and this in my control.lua (where I am creating the extraction-belt entity):
every time I place one in game, it outputs" belt to ground type: input".
Is there any way to set it up as an input, or do I need a work-around?
I have this in my Entity.lua:
Code: Select all
belt_to_ground_type = "output",
Code: Select all
script.on_event(defines.events.on_built_entity, function(event)
if event.created_entity.name == "extraction-belt" then
table.insert(global.belt_extractors, event.created_entity)
game.get_player(1).print("belt to ground type: " .. event.created_entity.belt_to_ground_type)
end
end)
Is there any way to set it up as an input, or do I need a work-around?