Belt Upgrader

by Mylon

Roboports automatically upgrade belts, splitters, underground belts, inserters, and assemblers within their reach.

Utilities
6 hours ago
0.14 - 2.0
20.0K
Logistics Logistic network

g Error while running event: BeltUpgrader::on_tick (ID 0)

7 years ago

Error while running event: BeltUpgrader::on_tick (ID 0)
Unknown item name: fast-factory-inlet
stacktraceback:
BeltUpgrader/control.lua:342: in function 'creep'
BeltUpgrader/control.lua:113: in function 'checkRoboports'
BeltUpgrader/control.lua:500: infunction <BeltUpgrader/control.lua:495

I think this is a conflict with the factorismo2 mod because of the name fast-factory-inlet

no idea though. i'm going to try throwing in an if statement to skip that iteration if the name == fast-factory-inlet but I've never programmed lua before.

7 years ago

the following in control.lua does in fact fix the problem

for n,p in pairs(global.belts) do
    if p.name ~= "fast-factory-inlet" then
        local maximum = roboport.logistic_network.get_item_count(p.name)
        for i, belts in pairs(beltlist) do
            if maximum > 0 and count < maximum and p.belt_speed > belts.prototype.belt_speed then --Replace
                if not belts.to_be_deconstructed(force) then
                    local ghost = roboport.surface.create_entity{name="entity-ghost", position=belts.position, inner_name=p.name, direction = belts.direction, force=roboport.force}
                    table.insert(global.ghosts, ghost)
                    --belts.order_deconstruction(force)
                    count = count + 1
                    --game.print(count .. " " .. amount)

                    if count >= amount then --Out of bots.
                        return
                    end
                end
            end
        end
    end
end
7 years ago

this did not resolve my issue,

7 years ago

I added a special check for Factorissimo2. Try the latest version.

New response