aboutsummaryrefslogtreecommitdiff
path: root/trainlogic.lua
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-11-06 23:21:03 +0100
committerorwell96 <mono96.mml@gmail.com>2016-11-06 23:21:03 +0100
commit6a0186f0424d1aad8a43029aebceffb6081b6822 (patch)
tree9983911b7941c23d2197e2a15596a62c0bc77a97 /trainlogic.lua
parent72766b974c6e5c834d2afbebffbff0feb591e8db (diff)
downloadadvtrains-6a0186f0424d1aad8a43029aebceffb6081b6822.tar.gz
advtrains-6a0186f0424d1aad8a43029aebceffb6081b6822.tar.bz2
advtrains-6a0186f0424d1aad8a43029aebceffb6081b6822.zip
integrate mbb's new train models
and correct some wagon_spans, wagon/engine scalings and file names issue with collisions needs to be fixed.
Diffstat (limited to 'trainlogic.lua')
-rw-r--r--trainlogic.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/trainlogic.lua b/trainlogic.lua
index 5db366e..37d7b86 100644
--- a/trainlogic.lua
+++ b/trainlogic.lua
@@ -325,11 +325,12 @@ function advtrains.train_step(id, train, dtime)
end
--move
+ --TODO 3,5 + 0.7
train.index=train.index and train.index+((train.velocity/(train.path_dist[math.floor(train.index)] or 1))*dtime) or 0
end
---the 'leader' concept has been overthrown, we won't rely on MT's "buggy object management"
+
--structure of train table:
--[[
trains={
@@ -501,6 +502,7 @@ function advtrains.add_wagon_to_train(wagon, train_id, index)
--this is not the usual case!!!
--we may set initialized because the wagon has no chance to step()
wagon.initialized=true
+ --TODO is this art or can we throw it away?
advtrains.update_trainpart_properties(train_id)
end
function advtrains.update_trainpart_properties(train_id, invert_flipstate)
@@ -788,6 +790,10 @@ end
local nonblocknodes={
"default:fence_wood",
+ "default:fence_acacia_wood",
+ "default:fence_aspen_wood",
+ "default:fence_pine_wood",
+ "default:fence_junglewood",
"default:torch",
"default:sign_wall",