Drawbridges across rails (gates that one can walk on)
Posted: Mon Aug 10, 2020 2:36 pm
TL;DR
Make it possible for gates to be used to design drawbridges across rails (specifically water-ways in cargo-ships mod) that open when a train (ship) approaches and close when a player approaches and allow players to pass when closed.What ?
1) Add a way to invert the open/close behaviour for eigther players or trains approaching.One way would be to have separate aproach distance settings for players and trains with a negative number inverting the behaviour. A simple flag to invert the behavior for either the player or train would suffice too but would be less flexible.
Obviously when the gate closes when a player approaches it should be passable to players when closed and impassable when open. Same for trains. Whatever state the approaching causes should be the passable state.
2) a flag giving the default state of the gate
Should the gate be open or closed if neither player nor train is near?
If the gate is used as a defensible structure against other players ship entering your base then they must be closed per default. But if they are not ment for defence an open gate would look better, especially across water. You don't want to block of water flow all the time.
3) allow players to walk across the gate even if the tile below is water
The tile below can be changed to water-shallow so this isn't that important.
It's more the visual effect I'm after. So if I have to set the gate to not collide with anything I'm fine with that too as long as the behavior on approach is selectable.
Why ?
With the cargo-ship mod one can place rails on water and have ships drive along them. The problem is that one can not cross them. The player can not walk on water and the ships (and rails) can't be on land so placing landfill is out.So I would like to have water gates or small drawbridges across the rails. If the water gate is closed (or the drawbrige lowered) the ship would collide with it but the player could walk on it. If the water gate is open (or the drawbridge raised) the ship can pass through but the player is blocked. When a player approaches the gates should close (the drawbridge lowers) while when a ship approaches the gate should open (the drawbridge raise).
As you see the behavior for the train (ship) and player are opposed. The existing gates has them in sync.