Mining Fluids - Every Ore needs fluids to mine.


Every Ore needs fluids to mine, and you get offshore pumps and pipes when start the game.

Content
5 years ago
0.16 - 0.17
10
Mining

g Some Changes to the Script

6 years ago
(updated 6 years ago)

Hey. I added angels and mad clowns ores to your script. I also fixed an error when bobs is installed, but its ores are disabled.

function disableEquipment()
data.raw["recipe"]["burner-mining-drill"] = nil
end

function extendVanilla()
if data.raw["resource"]["iron-ore"] then
data.raw["resource"]["iron-ore"].minable.required_fluid = "water"
data.raw["resource"]["iron-ore"].minable.fluid_amount = 10
end

if data.raw["resource"]["copper-ore"] then
    data.raw["resource"]["copper-ore"].minable.required_fluid = "steam"
    data.raw["resource"]["copper-ore"].minable.fluid_amount = 10
end

if data.raw["resource"]["stone"] then
    data.raw["resource"]["stone"].minable.required_fluid = "steam"
    data.raw["resource"]["stone"].minable.fluid_amount = 10
end

if data.raw["resource"]["coal"] then
    data.raw["resource"]["coal"].minable.required_fluid = "water"
    data.raw["resource"]["coal"].minable.fluid_amount = 10
end

end

function extendBobs()
if data.raw["resource"]["zinc-ore"] then
data.raw["resource"]["zinc-ore"].minable.required_fluid = "water"
data.raw["resource"]["zinc-ore"].minable.fluid_amount = 10
end

if data.raw["resource"]["tungsten-ore"] then
    data.raw["resource"]["tungsten-ore"].minable.required_fluid = "water"
    data.raw["resource"]["tungsten-ore"].minable.fluid_amount = 10
end


if data.raw["resource"]["tin-ore"] then
    data.raw["resource"]["tin-ore"].minable.required_fluid = "water"
    data.raw["resource"]["tin-ore"].minable.fluid_amount = 10
end


if data.raw["resource"]["sulfur"] then
    data.raw["resource"]["sulfur"].minable.required_fluid = "steam"
    data.raw["resource"]["sulfur"].minable.fluid_amount = 10
end


if data.raw["resource"]["sort-gem-ore"] then
    data.raw["resource"]["sort-gem-ore"].minable.required_fluid = "water"
    data.raw["resource"]["sort-gem-ore"].minable.fluid_amount = 10
end


if data.raw["resource"]["silver-ore"] then
    data.raw["resource"]["silver-ore"].minable.required_fluid = "steam"
    data.raw["resource"]["silver-ore"].minable.fluid_amount = 10
end


if data.raw["resource"]["rutile"] then
    data.raw["resource"]["rutile"].minable.required_fluid = "water"
    data.raw["resource"]["rutile"].minable.fluid_amount = 10
end


if data.raw["resource"]["quartz"] then
    data.raw["resource"]["quartz"].minable.required_fluid = "water"
    data.raw["resource"]["quartz"].minable.fluid_amount = 10
end


if data.raw["resource"]["nickel-ore"] then
    data.raw["resource"]["nickel-ore"].minable.required_fluid = "steam"
    data.raw["resource"]["nickel-ore"].minable.fluid_amount = 10
end


if data.raw["resource"]["lead-ore"] then
    data.raw["resource"]["lead-ore"].minable.required_fluid = "water"
    data.raw["resource"]["lead-ore"].minable.fluid_amount = 10
end


if data.raw["resource"]["gold-ore"] then
    data.raw["resource"]["gold-ore"].minable.required_fluid = "steam"
    data.raw["resource"]["gold-ore"].minable.fluid_amount = 10
end


if data.raw["resource"]["gem-ore"] then
    data.raw["resource"]["gem-ore"].minable.required_fluid = "steam"
    data.raw["resource"]["gem-ore"].minable.fluid_amount = 10
end



if data.raw["resource"]["cobalt-ore"] then
    data.raw["resource"]["cobalt-ore"].minable.required_fluid = "water"
    data.raw["resource"]["cobalt-ore"].minable.fluid_amount = 10
end

if data.raw["resource"]["bauxite"] then
    data.raw["resource"]["bauxite"].minable.required_fluid = "water"
    data.raw["resource"]["bauxite"].minable.fluid_amount = 10
end

end

function extendAngles()
if data.raw["resource"]["angels-ore1"] then
data.raw["resource"]["angels-ore1"].minable.required_fluid = "water"
data.raw["resource"]["angels-ore1"].minable.fluid_amount = 10
end
if data.raw["resource"]["angels-ore2"] then
data.raw["resource"]["angels-ore2"].minable.required_fluid = "water"
data.raw["resource"]["angels-ore2"].minable.fluid_amount = 10
end
if data.raw["resource"]["angels-ore3"] then
data.raw["resource"]["angels-ore3"].minable.required_fluid = "steam"
data.raw["resource"]["angels-ore3"].minable.fluid_amount = 10
end
if data.raw["resource"]["angels-ore4"] then
data.raw["resource"]["angels-ore4"].minable.required_fluid = "steam"
data.raw["resource"]["angels-ore4"].minable.fluid_amount = 10
end
if data.raw["resource"]["angels-ore5"] then
data.raw["resource"]["angels-ore5"].minable.required_fluid = "steam"
data.raw["resource"]["angels-ore5"].minable.fluid_amount = 10
end
if data.raw["resource"]["angels-ore6"] then
data.raw["resource"]["angels-ore6"].minable.required_fluid = "steam"
data.raw["resource"]["angels-ore6"].minable.fluid_amount = 10
end
end

function extendMadClown()
if data.raw["resource"]["clowns-ore1"] then
data.raw["resource"]["clowns-ore1"].minable.required_fluid = "steam"
data.raw["resource"]["clowns-ore1"].minable.fluid_amount = 10
end
if data.raw["resource"]["clowns-ore2"] then
data.raw["resource"]["clowns-ore2"].minable.required_fluid = "steam"
data.raw["resource"]["clowns-ore2"].minable.fluid_amount = 10
end
if data.raw["resource"]["clowns-ore3"] then
data.raw["resource"]["clowns-ore3"].minable.required_fluid = "steam"
data.raw["resource"]["clowns-ore3"].minable.fluid_amount = 10
end
if data.raw["resource"]["clowns-ore4"] then
data.raw["resource"]["clowns-ore4"].minable.required_fluid = "steam"
data.raw["resource"]["clowns-ore4"].minable.fluid_amount = 10
end
if data.raw["resource"]["clowns-ore5"] then
data.raw["resource"]["clowns-ore5"].minable.required_fluid = "steam"
data.raw["resource"]["clowns-ore5"].minable.fluid_amount = 10
end
if data.raw["resource"]["clowns-ore6"] then
data.raw["resource"]["clowns-ore6"].minable.required_fluid = "steam"
data.raw["resource"]["clowns-ore6"].minable.fluid_amount = 10
end
if data.raw["resource"]["clowns-ore7"] then
data.raw["resource"]["clowns-ore7"].minable.required_fluid = "steam"
data.raw["resource"]["clowns-ore7"].minable.fluid_amount = 10
end
if data.raw["resource"]["clowns-ore8"] then
data.raw["resource"]["clowns-ore8"].minable.required_fluid = "steam"
data.raw["resource"]["clowns-ore8"].minable.fluid_amount = 10
end
if data.raw["resource"]["clowns-ore9"] then
data.raw["resource"]["clowns-ore9"].minable.required_fluid = "steam"
data.raw["resource"]["clowns-ore9"].minable.fluid_amount = 10
end
end

disableEquipment()
extendVanilla()
extendBobs()
extendAngles()
extendMadClown()

6 years ago
(updated 6 years ago)

Man, I just put your code in the mod! I hope I did it right! I guess I could have deleted the other code instead of just adding its below.

Thank you very much for this, I could not have done so well... THANK YOU !!!

6 years ago

I was away for a while, and will be again too.

I put everything into functions which get called at the end of the file (see last 5 lines). The functions include all the changes you made. So you can replace all code with the one here.

Plus I added a few nil checks, since some products get disabled (e.g. angles seems to change bobs). If you leave the old lines, the mod crashes with those mods enabled. That was the original reason why I made the changes.

6 years ago

Ooops.. my bad! Sorry for my noobnes hehehehe, now i get it... Put your code now! Thanks Max!

6 years ago

No reason to appologize. Thanks for your work. I never would have thought of how cool having fluids for all mining setups would be : )
The mining setups look so much cooler now.

New response