I see, thanks. Sorry if I came over bit agitated, was a long day.
That's OK, no hard feelings on my part. :-)
"layer-11" to "layer-15" were made especially for modding in mind. The only problem will arise if other mods also use the layer for something.
Rail collision_boxes and masks are such a headache.
I wonder why all rails should have at least one collision_box in common. And since that is the case, why not make a "rail-layer" that rails should have. Maybe we could suggest it to Wube.
If "layer-11" to "layer-15" are there for modders, you really can't rule out that other mods will use the same layer -- with unpredictable results. So, yes, a special "rail-layer" sounds very appealing! Would you propose that on the forum? It's your idea after all, I don't want to steal it. :-D
Enough rambling. So unfortunately I have to remove object-layer from rails.
I can make a change so that it only removes object-layer (and not hard code the 3 layers) as I do now, similar as you do.
Removing "object-layer" from the vanilla rails will probably break all other mods that use it …
And probably will also add a final-fixes to add layer-15 to all rails myself.
This seems better -- as long as there isn't a dedicated "rail-layer". If you add "layer-15", please remember to add it to the vanilla rails as well! As their collision_mask is nil during data stage, the correct way to do it would be
collision_mask = {"item-layer", "object-layer", "player-layer", "water-tile", "layer-15"}
Also, I'd recommend a hidden optional dependency on my mod in info.json:
"dependencies": [ "base >= 0.17", "(?)rail-fix-1775" ],
This way, if my mod is installed, you can be sure it will get loaded before yours (and can't overwrite your changes). Also, by making it a hidden dependency, you wouldn't promote my mod -- it's just a means to allow players to use whatever mods they like.