Miniloader (Redux)


UPS-friendly 1x1 loaders.

Content
a month ago
2.0
12.1K
Logistics

g I think blueprint problem can be solve

5 months ago

how about make a hidden entity with inverse directio of original miniloader and can placeable_by the same miniloader item.

5 months ago

Hi,

I am not sure what problem you are talking about. Can you elaborate a bit more?

5 months ago
(updated 5 months ago)

I mean you can make 2 minloader inserter prototype,so one input and one output(hidden)
and magically swap them when making blueprint
and when blueprint is placed,ghost is summoned, the output(hidden) inserter will be revive using item specified by InserterPrototype.placeable_by.
and when revived, create input inserter to replace it.

this is small code that turn entity in blueprint to another entity

local function magicswap(event)
        local player = game.players[event.player_index]
        if not(player and player.cursor_stack.valid_for_read and player.cursor_stack.name == "blueprint") then return; end
        local data=player.cursor_stack.get_blueprint_entities();
        for _,entry in pairs(data) do
            if(entry.name=="burner-inserter") then
                entry.name="inserter";
            end
        end
        player.cursor_stack.set_blueprint_entities(data);
    end
    event_handler.on_event(defines.events.on_player_setup_blueprint ,magicswap );
5 months ago

ok. I am still not sure what problem does that solve. Sorry, I am a bit thick here.

New response