Cursed Multi tasking Construction Robots

by L0771

Construction robots can build/mine more builds at same time. 1 block each technology level.

Utilities
3 years ago
0.17 - 1.0
16

b Crashed while robot attempted to build a miniloader

5 years ago

The mod Cursed Better Construction Robots caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Cursed-BCR::on_robot_built_entity (ID 14)
Unknown item name: miniloader-inserter
stack traceback:
Cursed-BCR/control.lua:42: in function 'build'
Cursed-BCR/control.lua:15: in function <Cursed-BCR/control.lua:9>
stack traceback:
[C]: in function 'get_item_count'
Cursed-BCR/control.lua:42: in function 'build'
Cursed-BCR/control.lua:15: in function <Cursed-BCR/control.lua:9>

5 years ago
(updated 5 years ago)

It looks like the crash is due to entity_name != item_name for miniload-inserters; the following seems to do the lookup of the item name without too much trouble:

        for _,item in ipairs(event.created_entity.prototype.items_to_place_this) do
          -- if more than one kind of thing is used to build the entity, don't touch this
          if name then return end
          -- if more than one item is used to build the entity, don't touch this
          if item.count > 1 then return end
          name = item.name
        end

Edit: fix tyop

5 years ago

Done, i don't test it :)

And now can deconstruct entities too.

5 years ago

Cool. =)

New response