WIki says LuaEntity.logistic_network is the network the entity is in or nil.
Trying it in code, with the entity being a (modded) wooden chest it complained being a function when i tried to get the item count of an item in the network.
Code: Select all
local logisticsNetwork = origEntity.logistic_network
--snip
logisticsNetwork.get_item_count(module) > 0 -- error here (and crash afterwards)
Code: Select all
local logisticsNetwork = origEntity.logistic_network(origEntity.position, origEntity.force.name)