Open kuxynator opened 1 week ago
Here is the relevant code
remote_api.get_factory_by_entity = function(entity)
if entity == nil then return nil end
return storage.factories_by_entity[entity.unit_number]
end
It seems that the entity userdata requires a unit_number defined.
there is a unit number
and I call this in on_built_entity
event, if that helps
the error occurs as soon as space-age is active. it works without sapce-age new game w/o space age > works open the same save with spage-age > nil new game w/ space age > nil
entiy is userdata: {name = "factory-1", type = "storage-tank"}
we had the same problem before, but we didn't find out which mod was causing it. but now we can't ignore spage age ;-)