I've been trying to add compatibility with your mod to make oil infinite again in the ocean version only, however each attempt I've done has resulted in crashes. I am not a coder so I'm only guessing at what to do and I just can't figure it out. Here is each attempt I've done in data final fixes to my mod.
if game.active_mods["cargo-ships"] && settings.global["infinite-offshore-oil"].value == true then
data.raw["resource"]["deep_oil"].infinite = true
end
Apparently && isn't the and this feature for LUA so...
if game.active_mods["cargo-ships"] then
if settings.global["infinite-offshore-oil"].value == true then
data.raw["resource"]["deep_oil"].infinite = true
end
end
Game doesn't like it when I use game.active_mods so....
if data.raw["resource"]["deep_oil"] then
if settings.global["infinite-offshore-oil"].value == true then
data.raw["resource"]["deep_oil"].infinite = true
end
end
Something's wrong with global now so fuck it. I give up.
I may try moving my mod changes to data final fixes so that yours can copy oil before mine changes its infinite status before hand. But perhaps you can give advice on how to use game.active_mods or how to factor an "and" statement into an if else.
My mod; https://mods.factorio.com/mod/VasNoInfinite