P.U.M.P.

by Xcone

P.U.M.P. (Prevent Unwanted Manual Pump-placement) adds a selection-tool with which you can select oil wells, and then plans the layout of pumpjacks and pipes for you.

Utilities
a month ago
0.18 - 2.0
70.7K
Mining Fluids Blueprints

b "PUMP does not support mixed resources" when Ghost tiles are in the selection area

5 months ago

This might be a good fix, though there's def other ways to do it. Tested and it worked without crashing or anything.
line 180 ish in control.lua

    for i, entity in pairs(entities_in_selection) do
        if entity.name == "tile-ghost" then goto continue end
        if first_entity == nil then
            first_entity = entity
        else
            if entity.name ~= first_entity.name then
                return {"failure.mixed-resources"}
            end
        end
        ::continue::
    end
5 months ago

noticed this issue when trying to use PUMP on a sulfuric acid patch that had concrete ghosts in the selection area.

4 months ago

Hi, sorry for the late reply, and thank you for the report.
I'm surprised this is an issue. But here it is.

The selection-tool should be filtered to resources only. In fact, I've just double checked the workings of the selection-tool-setup to see if by accident tile-ghosts were added as a selectable entity, but they're not. So I'm not entirely sure why the selectiontool includes them.

I've briefly tried to tweak the settings of the tool to try and exclude the tile ghosts, to no avail. I actually think this might be a bug in the game itself.

I'll try to find some time soon to fidget some more; and if I can't get the selectiontool filter to work as I need it, I'll try to workaround it in a similar manner as your code suggestion does it.

4 months ago

I've just uploaded a v2.1.10 which fixes this issue.

New response