Train restriction

Place to get help with not working mods / modding interface.
Post Reply
User avatar
SLywnow
Inserter
Inserter
Posts: 30
Joined: Sat Apr 25, 2020 7:37 pm
Contact:

Train restriction

Post by SLywnow »

I want to make my own mode of transport based on the train. The main problem is that I need that my transport could not ride on the rails from the original game, but only on mine, and accordingly the train from the original game could not ride on my rails, it is desirable not to come into conflict with mods like Realistic electric train
I looked in the documentation, I don't see a variable that would determine which rails a train can travel on.
Is this even possible? Cargo Ships is not considered, it simply States that the ship can only be placed on the water, same as rails, in other respects it is a normal railway.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Train restriction

Post by DaveMcW »

No, it's not possible.

Cargo ships uses collision mask to restrict placement, but if you build a connecting path between water and land, ships will travel on rails.

robot256
Filter Inserter
Filter Inserter
Posts: 605
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Train restriction

Post by robot256 »

Right, the only way is for script to perform the check every time an entity is placed to ensure it matches, and delete it otherwise.

Post Reply

Return to “Modding help”