Train tunnels

by Godmave

Tunnels for trains

Content
4 years ago
0.17 - 1.1
13.9K
Trains

b I can't walk across corner tracks

4 years ago

I confirmed that this mod when removed lets me walk over the corners of rails. what is happening and can it be fixed?

4 years ago
(updated 4 years ago)

That's this bit of code in data.lua:
--add collision mask to curved rails
local defaultRailMask = {"object-layer", "item-layer", "floor-layer", "water-tile"}
for railName,_ in pairs(data.raw["curved-rail"]) do
if not data.raw["curved-rail"][railName].collision_mask then
data.raw["curved-rail"][railName].collision_mask = defaultRailMask
end
table.insert(data.raw["curved-rail"][railName].collision_mask, "layer-13")
end
I don't know why it needs to be done, I've removed it and everything works fine
edit: Mostly everything works fine, it's just a few weird effects when you enter a tunnel sideways

4 years ago

thanks, but i don't have this mod any more.....

4 years ago

The mask is there so you can not place tunnel entrances on curves.
But I got no problem with walking over corners either. So ...

New response