Pump Anywhere

by plexpt

Pump anywhere allows offshore pumps to be placed anywhere. support 2.0 and sa

Tweaks
a month ago
2.0 - 2.1
7.25K

b Fix a bug with incorrect fluid pumping

12 days ago

So, I'll be brief. Due to a code error, the pump can pump water where it shouldn't—for example, on a Vulcanus, if it's on a foundation.
You need to replace the entire data-final-fixes.lua code with this:

local pump = data.raw['offshore-pump']['offshore-pump']

if not pump then
return
end

pump.tile_buildability_rules = nil;

local no_fluid = {
["foundation"] = true,
["concrete"] = true,
["hazard-concrete-left"] = true,
["hazard-concrete-right"] = true,
["refined-concrete"] = true,
["refined-hazard-concrete-left"] = true,
["refined-hazard-concrete-right"] = true,
["ice-platform"] = true,
["landfill"] = true,
}

local volcanus = {
["lava"] = true,
["lava-hot"] = true,
["volcanic-cracks"] = true,
["volcanic-cracks-hot"] = true,
["volcanic-cracks-warm"] = true,
["volcanic-smooth-stone"] = true,
["volcanic-smooth-stone-warm"] = true,
}

local fulgora = {
["fulgoran-dust"] = true,
["oil-ocean-deep-2"] = true
}

for k, tile in pairs(data.raw["tile"]) do
if tile and not tile["fluid"] and not no_fluid[tile.name] then
if volcanus[tile.name] or string.find(tile.name, "^volcanic-") then
tile["fluid"] = "lava"
else
if fulgora[tile.name] or string.find(tile.name, "^fulgoran-") then
tile["fluid"] = "heavy-oil"
else
tile["fluid"] = "water"
end
end
end
end

It's up to you to accept or reject the solution. I'm just proposing a solution to the bug.

New response