If I call get_entity_filter on the same item stack it works as expected.
I am not sure if I am using get_tile_filter wrong or not.
sample code is below
Code: Select all
local player = game.get_player(1)
local inv = player.get_main_inventory()
for n = 1, #inv do
itemstack = inv[n]
if itemstack.count > 0 then
if itemstack.name == "deconstruction-planner" then
for i = 1, 30 do
filter = itemstack.get_entity_filter(i) -- returns expected value
log(filter)
filter = itemstack.get_tile_filter(i) -- always returns nil regardless if filter is set or not
log(filter)
end
end
end
end