diff options
author | orwell96 <orwell@bleipb.de> | 2017-11-22 20:46:36 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2017-11-22 20:46:36 +0100 |
commit | 409e2125c9d6ee72090c92dc94c54d0560a80c5d (patch) | |
tree | d5873a5d2ea84dc1697f6565446c3b24cc8e9d1b /advtrains/tracks.lua | |
parent | ce73643b107bb9cd7390f42457634d311b70c761 (diff) | |
download | advtrains-409e2125c9d6ee72090c92dc94c54d0560a80c5d.tar.gz advtrains-409e2125c9d6ee72090c92dc94c54d0560a80c5d.tar.bz2 advtrains-409e2125c9d6ee72090c92dc94c54d0560a80c5d.zip |
Make trackplacer align rails by any tracks, not just by tracks with the same nnpref
This finally fixes the need to rotate atc rails and bumpers.
Also prefers rotation that is closer to the player's look dir (placed bumpers will face the player)
Diffstat (limited to 'advtrains/tracks.lua')
-rw-r--r-- | advtrains/tracks.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/advtrains/tracks.lua b/advtrains/tracks.lua index fdc8ae9..bfa95fe 100644 --- a/advtrains/tracks.lua +++ b/advtrains/tracks.lua @@ -152,6 +152,12 @@ advtrains.ap.t_30deg_straightonly={ trackworker={
["st"]="st",
},
+ trackplacer={
+ st=true,
+ },
+ tpsingle={
+ st=true,
+ },
slopenodes={},
rotation={"", "_30", "_45", "_60"},
increativeinv={"st"},
@@ -177,6 +183,12 @@ advtrains.ap.t_30deg_straightonly_noplacer={ trackworker={
["st"]="st",
},
+ trackplacer={
+ st=true,
+ },
+ tpsingle={
+ st=true,
+ },
slopenodes={},
rotation={"", "_30", "_45", "_60"},
increativeinv={"st"},
@@ -346,6 +358,7 @@ function advtrains.register_tracks(tracktype, def, preset) after_place_node=function(pos)
advtrains.ndb.update(pos)
end,
+ nnpref = def.nodename_prefix,
}, def.common or {})
--make trackplacer base def
advtrains.trackplacer.register_tracktype(def.nodename_prefix, preset.tpdefault)
|