Mountains deprecated


Place mountains over resources fields.

Content
8 years ago
0.13 - 0.14
9
Mining

g Changing to water

8 years ago
(updated 8 years ago)

Hi. Cool mod.

Found a problem, every item is removed if you change a tile to water - but not your new "small-minable-rock". It is still left out in the water.

Especially obvious in combo with Water Maze mod:
https://forums.factorio.com/viewtopic.php?f=94&t=21568

Edit:

Now I have to do this after Water-Maze creation:

for x = x1 - k, x2 + k do
for y = y1 - k, y2 + k do
if surface.get_tile(x, y).name == "water" or surface.get_tile(x, y).name == "deepwater" then
area = {{x - 1, y - 1}, {x + 1, y + 1}}
for _, entity in ipairs(surface.find_entities_filtered{
area = area, name = "small-minable-rock"}) do
entity.destroy()
end
end
end
end

Edit2: Similar to this you could remove mountains near player start (so you wont get stuck):

local function player_created(event)
local player = game.players[event.player_index]
local pos = player.position
local area = {{pos.x - 16, pos.y - 16}, {pos.x + 16, pos.y + 16}}

for _, entityNames in ipairs({"mountain", "small-minable-rock"}) do
for
_, entity in ipairs(player.surface.find_entities_filtered{
area = area, name = entityNames}) do
entity.destroy()
end
end

8 years ago

What do you mean by "change a tile to water" are you talking about landfill?

I pretty much gave up about trying to be compatible with other mod that use chunk generation events to do stuff.. The api just don't allow this kind of freedom.

I want to try at some point to add something like a 10-20 tick delay between the chunk generation event and the creation of the mountain to be somewhat compatible with RSO, but I'm not even sure that would work.

Someone need to make a shared library that deal with chunk generation event and then call every mod that subscribe to it in order, so that you can wait for another mod to finish modifying the terrain before doing it.

Or I would be ok with just having a remote interface in RSO that do it, but I've checked and everything is hardcoded in that mod. And my mod didn't get popular enough to bother will all the work it would take to fix this, beside maybe just trying to add a delay and cross finger that RSO can do it's stuff in less than X amount of tick.

8 years ago
(updated 8 years ago)

"Similar to this you could remove mountains near player start (so you wont get stuck):"

Is it that much of an issue? I thought it was funny when it happened. And you can craft 2 pickaxes at the start should be enough to get you out of anywhere.

The problem with removing the stone is it can still keep you stuck in the middle of a mountain.. Maybe I could move the player to the right or left until I found a spot without mountain or water instead.

But it's a lot of work for something that don't really cause that much problem, I think.

New response