Trying to create underground belts in a mod.
Right at the first I ran into the problem of setting the belt_to_ground_type of a belt.
For testing I run the following code
Code: Select all
/c
local p = {game.player.selected.position.x+1,game.player.selected.position.y+1}
local ne = game.player.surface.create_entity({name="underground-belt", force = "player", position=p , direction = 4, belt_to_ground_type = "output"})
game.player.print("ok..".. ne.name.." "..ne.belt_to_ground_type)
For completeness.. Using belt_to_ground_type = "input" also creates an input.
Any hints on solving this ?