From 409e2125c9d6ee72090c92dc94c54d0560a80c5d Mon Sep 17 00:00:00 2001 From: orwell96 Date: Wed, 22 Nov 2017 20:46:36 +0100 Subject: 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) --- advtrains/tracks.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'advtrains/tracks.lua') 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) -- cgit v1.2.3