aboutsummaryrefslogtreecommitdiff
path: root/.editorconfig
Commit message (Expand)AuthorAge
* Add .editorconfig (#11412)hecks2021-07-03
r>context:space:mode:
authororwell96 <mono96.mml@gmail.com>2016-12-20 14:17:39 +0100
committerorwell96 <mono96.mml@gmail.com>2016-12-20 14:17:39 +0100
commitf806ed9eee8c13eb0b4868641311d25257c63f46 (patch)
tree0657366d21caf17881266054baa1dfae2365b9d8 /advtrains
parent05ce694decc0653997f45fa4f9a24b40057dbd01 (diff)
downloadadvtrains-f806ed9eee8c13eb0b4868641311d25257c63f46.tar.gz
advtrains-f806ed9eee8c13eb0b4868641311d25257c63f46.tar.bz2
advtrains-f806ed9eee8c13eb0b4868641311d25257c63f46.zip
Turning mod into a modpack and separating the trains from the core mod
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/atc.lua4
-rw-r--r--advtrains/couple.lua154
-rw-r--r--advtrains/crafting.lua71
-rw-r--r--advtrains/damage.lua26
-rw-r--r--advtrains/debugitems.lua36
-rw-r--r--advtrains/depends.txt2
-rw-r--r--advtrains/description.txt8
-rw-r--r--advtrains/helpers.lua249
-rw-r--r--advtrains/init.lua42
-rw-r--r--advtrains/misc_nodes.lua67
-rw-r--r--advtrains/models/advtrains_dtrack_bumper_st.b3dbin0 -> 32927 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_bumper_st_30.b3dbin0 -> 48546 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_bumper_st_45.b3dbin0 -> 32926 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_bumper_st_60.b3dbin0 -> 48546 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_cr.b3dbin0 -> 27540 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_cr_30.b3dbin0 -> 27543 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_cr_45.b3dbin0 -> 23037 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_cr_60.b3dbin0 -> 23037 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_detector_st.b3dbin0 -> 17157 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_detector_st_30.b3dbin0 -> 32779 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_detector_st_45.b3dbin0 -> 17163 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_detector_st_60.b3dbin0 -> 32779 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_st.b3dbin0 -> 15828 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_st_30.b3dbin0 -> 31447 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_st_45.b3dbin0 -> 15831 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_st_60.b3dbin0 -> 31447 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swlcr.b3dbin0 -> 36743 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swlcr_30.b3dbin0 -> 45922 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swlcr_45.b3dbin0 -> 32112 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swlcr_60.b3dbin0 -> 44864 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swlst.b3dbin0 -> 36743 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swlst_30.b3dbin0 -> 45922 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swlst_45.b3dbin0 -> 32112 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swlst_60.b3dbin0 -> 44864 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swrcr.b3dbin0 -> 36743 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swrcr_30.b3dbin0 -> 44864 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swrcr_45.b3dbin0 -> 32112 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swrcr_60.b3dbin0 -> 45922 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swrst.b3dbin0 -> 36743 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swrst_30.b3dbin0 -> 44864 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swrst_45.b3dbin0 -> 32112 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_swrst_60.b3dbin0 -> 45922 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_vst1.b3dbin0 -> 21495 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_vst1_45.b3dbin0 -> 20739 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_vst2.b3dbin0 -> 25143 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_vst2_45.b3dbin0 -> 20919 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_vst31.b3dbin0 -> 19051 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_vst32.b3dbin0 -> 21635 bytes
-rw-r--r--advtrains/models/advtrains_dtrack_vst33.b3dbin0 -> 28795 bytes
-rw-r--r--advtrains/models/advtrains_modernwagon.b3dbin0 -> 172028 bytes
-rw-r--r--advtrains/models/advtrains_retrosignal_off.b3dbin0 -> 13093 bytes
-rw-r--r--advtrains/models/advtrains_retrosignal_off_30.b3dbin0 -> 13093 bytes
-rw-r--r--advtrains/models/advtrains_retrosignal_off_45.b3dbin0 -> 13093 bytes
-rw-r--r--advtrains/models/advtrains_retrosignal_off_60.b3dbin0 -> 13093 bytes
-rw-r--r--advtrains/models/advtrains_retrosignal_on.b3dbin0 -> 13093 bytes
-rw-r--r--advtrains/models/advtrains_retrosignal_on_30.b3dbin0 -> 13093 bytes
-rw-r--r--advtrains/models/advtrains_retrosignal_on_45.b3dbin0 -> 13093 bytes
-rw-r--r--advtrains/models/advtrains_retrosignal_on_60.b3dbin0 -> 13093 bytes
-rw-r--r--advtrains/models/advtrains_signal.b3dbin0 -> 61544 bytes
-rw-r--r--advtrains/models/advtrains_signal_30.b3dbin0 -> 61544 bytes
-rw-r--r--advtrains/models/advtrains_signal_45.b3dbin0 -> 61544 bytes
-rw-r--r--advtrains/models/advtrains_signal_60.b3dbin0 -> 61544 bytes
-rw-r--r--advtrains/models/advtrains_track_cr.b3dbin0 -> 8023 bytes
-rw-r--r--advtrains/models/advtrains_track_st.b3dbin0 -> 15831 bytes
-rw-r--r--advtrains/models/advtrains_track_st_45.b3dbin0 -> 8935 bytes
-rw-r--r--advtrains/models/blender/engine-with-animation.blendbin0 -> 599504 bytes
-rw-r--r--advtrains/models/blender/gleis/infos/Grafik_weiche.pngbin0 -> 361700 bytes
-rw-r--r--advtrains/models/blender/gleis/infos/breite1
-rw-r--r--advtrains/models/blender/gleis/licence.txt~0
-rw-r--r--advtrains/models/blender/gleis/rail_my.blendbin0 -> 654772 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_my.blend1bin0 -> 674164 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_my_rt.blendbin0 -> 847060 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_my_rt.blend1bin0 -> 767780 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_my_rt_final.blendbin0 -> 1094836 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_my_rt_final.blend1bin0 -> 827052 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_my_rt_switches.blendbin0 -> 2184236 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_my_rt_switches.blend1bin0 -> 1945588 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_my_rt_switches2.blendbin0 -> 2139340 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_my_rt_switches2.blend1bin0 -> 2172972 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_together.blendbin0 -> 1016920 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_together.pngbin0 -> 233544 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_together2.pngbin0 -> 312891 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_together3.pngbin0 -> 309398 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_verticals.blendbin0 -> 550748 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_verticals.blend1bin0 -> 574100 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_verticals3.blendbin0 -> 591800 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_verticals3.blend1bin0 -> 554196 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_verticals45.blendbin0 -> 547788 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_verticals45.blend1bin0 -> 547300 bytes
-rw-r--r--advtrains/models/blender/gleis/rail_verticals45.blend11bin0 -> 547300 bytes
-rw-r--r--advtrains/models/blender/gleis/texturen/rail.pngbin0 -> 2616 bytes
-rw-r--r--advtrains/models/blender/gleis/texturen/uv.pngbin0 -> 2343 bytes
-rw-r--r--advtrains/models/blender/industrial/industry_loc.blendbin0 -> 652640 bytes
-rw-r--r--advtrains/models/blender/industrial/industry_loc.blend1bin0 -> 652640 bytes
-rw-r--r--advtrains/models/blender/industrial/industry_loc.blend11bin0 -> 659096 bytes
-rw-r--r--advtrains/models/blender/industrial/industry_oil_ wagong.blendbin0 -> 693488 bytes
-rw-r--r--advtrains/models/blender/industrial/industry_oil_ wagong.blend1bin0 -> 693488 bytes
-rw-r--r--advtrains/models/blender/industrial/industry_tree_wagong.blendbin0 -> 640056 bytes
-rw-r--r--advtrains/models/blender/industrial/industry_tree_wagong.blend1bin0 -> 640056 bytes
-rw-r--r--advtrains/models/blender/industrial/industry_tree_wagong.pngbin0 -> 316 bytes
-rw-r--r--advtrains/models/blender/locomotive.blendbin0 -> 459600 bytes
-rw-r--r--advtrains/models/blender/magnet_track.blendbin0 -> 516836 bytes
-rw-r--r--advtrains/models/blender/mbb/advtrains_wagon_japan.xcfbin0 -> 814467 bytes
-rw-r--r--advtrains/models/blender/mbb/modern_japanlocomotive.blendbin0 -> 715116 bytes
-rw-r--r--advtrains/models/blender/mbb/modern_japanlocomotive.blend1bin0 -> 715116 bytes
-rw-r--r--advtrains/models/blender/mbb/modern_japanlocomotive.pngbin0 -> 204978 bytes
-rw-r--r--advtrains/models/blender/mbb/modern_japanlocomotive.xcfbin0 -> 957175 bytes
-rw-r--r--advtrains/models/blender/mbb/modern_locomotive.blendbin0 -> 732124 bytes
-rw-r--r--advtrains/models/blender/mbb/modern_wagong.blendbin0 -> 471140 bytes
-rw-r--r--advtrains/models/blender/mbb/modern_wagong.blend1bin0 -> 518316 bytes
-rw-r--r--advtrains/models/blender/mbb/modern_wagong_uv.blendbin0 -> 571364 bytes
-rw-r--r--advtrains/models/blender/mbb/modern_wagong_uv.blend1bin0 -> 575708 bytes
-rw-r--r--advtrains/models/blender/mbb/modern_wagong_uv.pngbin0 -> 189564 bytes
-rw-r--r--advtrains/models/blender/mbb/prellbock.blendbin0 -> 745176 bytes
-rw-r--r--advtrains/models/blender/mbb/prellbock.blend1bin0 -> 485416 bytes
-rw-r--r--advtrains/models/blender/mbb/prellbock.uv.pngbin0 -> 4034 bytes
-rw-r--r--advtrains/models/blender/mbb/regio-lokomotive.blendbin0 -> 704160 bytes
-rw-r--r--advtrains/models/blender/mbb/regio-waron.blendbin0 -> 545620 bytes
-rw-r--r--advtrains/models/blender/mbb/retrosignal.blendbin0 -> 488920 bytes
-rw-r--r--advtrains/models/blender/mbb/retrosignal.blend1bin0 -> 507800 bytes
-rw-r--r--advtrains/models/blender/mbb/signal(2)_hoch.blendbin0 -> 472092 bytes
-rw-r--r--advtrains/models/blender/mbb/signal(2)_unten.blendbin0 -> 472092 bytes
-rw-r--r--advtrains/models/blender/mbb/signal.blendbin0 -> 570336 bytes
-rw-r--r--advtrains/models/blender/mbb/signal.blend1bin0 -> 570336 bytes
-rw-r--r--advtrains/models/blender/mbb/signal.pngbin0 -> 244314 bytes
-rw-r--r--advtrains/models/blender/mbb/signal.xcfbin0 -> 881142 bytes
-rw-r--r--advtrains/models/blender/mbb/signal2.pngbin0 -> 39924 bytes
-rw-r--r--advtrains/models/blender/mbb/tr-logo.pngbin0 -> 197 bytes
-rw-r--r--advtrains/models/blender/mbb/weichenhebel1.blendbin0 -> 493028 bytes
-rw-r--r--advtrains/models/blender/mbb/weichenhebel2.blendbin0 -> 492996 bytes
-rw-r--r--advtrains/models/blender/newlocomotive.blendbin0 -> 603376 bytes
-rw-r--r--advtrains/models/blender/newlocomotive.blend1bin0 -> 603376 bytes
-rw-r--r--advtrains/models/blender/newlocomotive_uvs.pngbin0 -> 175030 bytes
-rw-r--r--advtrains/models/blender/newwagon.blendbin0 -> 542188 bytes
-rw-r--r--advtrains/models/blender/newwagon.blend1bin0 -> 550292 bytes
-rw-r--r--advtrains/models/blender/newwagon.pngbin0 -> 108762 bytes
-rw-r--r--advtrains/models/blender/subway-train.blendbin0 -> 536268 bytes
-rw-r--r--advtrains/models/blender/subway-train.blend1bin0 -> 538188 bytes
-rw-r--r--advtrains/models/blender/subway-train.pngbin0 -> 96773 bytes
-rw-r--r--advtrains/models/blender/subway-train.xcfbin0 -> 92558 bytes
-rw-r--r--advtrains/models/blender/trackplane.blendbin0 -> 462200 bytes
-rw-r--r--advtrains/models/blender/trackvertical1.blendbin0 -> 453656 bytes
-rw-r--r--advtrains/models/blender/trackvertical1.blend1bin0 -> 453344 bytes
-rw-r--r--advtrains/models/blender/trackvertical1.pngbin0 -> 59146 bytes
-rw-r--r--advtrains/models/blender/trackvertical2.blendbin0 -> 459216 bytes
-rw-r--r--advtrains/models/blender/trackvertical2.pngbin0 -> 66755 bytes
-rw-r--r--advtrains/models/oldmodels/locomotive.b3dbin0 -> 181112 bytes
-rw-r--r--advtrains/models/oldmodels/trackvertical1.b3dbin0 -> 629 bytes
-rw-r--r--advtrains/models/oldmodels/trackvertical2.b3dbin0 -> 869 bytes
-rw-r--r--advtrains/models/trackplane.b3dbin0 -> 262 bytes
-rw-r--r--advtrains/pseudoload.lua180
-rw-r--r--advtrains/readme.txt23
-rw-r--r--advtrains/signals.lua76
-rw-r--r--advtrains/textures/advtrains_couple.pngbin0 -> 265 bytes
-rw-r--r--advtrains/textures/advtrains_discouple.pngbin0 -> 307 bytes
-rw-r--r--advtrains/textures/advtrains_dtrack_bumper_placer.pngbin0 -> 2213 bytes
-rw-r--r--advtrains/textures/advtrains_dtrack_detector_placer.pngbin0 -> 1253 bytes
-rw-r--r--advtrains/textures/advtrains_dtrack_placer.pngbin0 -> 5831 bytes
-rw-r--r--advtrains/textures/advtrains_dtrack_rail.pngbin0 -> 2810 bytes
-rw-r--r--advtrains/textures/advtrains_dtrack_rail_detector_on.pngbin0 -> 2844 bytes
-rw-r--r--advtrains/textures/advtrains_dtrack_slopeplacer.pngbin0 -> 2415 bytes
-rw-r--r--advtrains/textures/advtrains_newlocomotive.xcfbin0 -> 7462378 bytes
-rw-r--r--advtrains/textures/advtrains_platform.pngbin0 -> 193 bytes
-rw-r--r--advtrains/textures/advtrains_retrosignal.pngbin0 -> 8496 bytes
-rw-r--r--advtrains/textures/advtrains_retrosignal_inv.pngbin0 -> 2242 bytes
-rw-r--r--advtrains/textures/advtrains_signal_inv.pngbin0 -> 856 bytes
-rw-r--r--advtrains/textures/advtrains_signal_off.pngbin0 -> 5882 bytes
-rw-r--r--advtrains/textures/advtrains_signal_on.pngbin0 -> 5884 bytes
-rw-r--r--advtrains/textures/advtrains_track_cr.pngbin0 -> 33370 bytes
-rw-r--r--advtrains/textures/advtrains_track_cr_45.pngbin0 -> 33938 bytes
-rw-r--r--advtrains/textures/advtrains_track_placer.pngbin0 -> 32349 bytes
-rw-r--r--advtrains/textures/advtrains_track_st.pngbin0 -> 20405 bytes
-rw-r--r--advtrains/textures/advtrains_track_st_45.pngbin0 -> 39977 bytes
-rw-r--r--advtrains/textures/advtrains_track_swlcr.pngbin0 -> 33378 bytes
-rw-r--r--advtrains/textures/advtrains_track_swlcr_45.pngbin0 -> 45772 bytes
-rw-r--r--advtrains/textures/advtrains_track_swlst.pngbin0 -> 32321 bytes
-rw-r--r--advtrains/textures/advtrains_track_swlst_45.pngbin0 -> 46408 bytes
-rw-r--r--advtrains/textures/advtrains_track_swrcr.pngbin0 -> 33670 bytes
-rw-r--r--advtrains/textures/advtrains_track_swrcr_45.pngbin0 -> 46865 bytes
-rw-r--r--advtrains/textures/advtrains_track_swrst.pngbin0 -> 32654 bytes
-rw-r--r--advtrains/textures/advtrains_track_swrst_45.pngbin0 -> 47636 bytes
-rw-r--r--advtrains/textures/advtrains_trackworker.pngbin0 -> 328 bytes
-rw-r--r--advtrains/textures/drwho_screwdriver.pngbin0 -> 328 bytes
-rw-r--r--advtrains/textures/larger rails.xcfbin0 -> 1239132 bytes
-rw-r--r--advtrains/trackplacer.lua282
-rw-r--r--advtrains/tracks.lua693
-rw-r--r--advtrains/trainhud.lua109
-rw-r--r--advtrains/trainlogic.lua895
-rw-r--r--advtrains/wagons.lua607
189 files changed, 3525 insertions, 0 deletions
diff --git a/advtrains/atc.lua b/advtrains/atc.lua
new file mode 100644
index 0000000..0afddb0
--- /dev/null
+++ b/advtrains/atc.lua
@@ -0,0 +1,4 @@
+--atc.lua
+--registers and controls the ATC system
+
+--(simple)mesecon detector rails
diff --git a/advtrains/couple.lua b/advtrains/couple.lua
new file mode 100644
index 0000000..a846c8b
--- /dev/null
+++ b/advtrains/couple.lua
@@ -0,0 +1,154 @@
+--couple.lua
+--defines couple entities.
+
+--advtrains:discouple
+--set into existing trains to split them when punched.
+--they are attached to the wagons.
+--[[fields
+wagon
+
+wagons keep their couple entity minetest-internal id inside the field discouple_id. if it refers to nowhere, they will spawn a new one if player is near
+]]
+local print=function(t, ...) minetest.log("action", table.concat({t, ...}, " ")) minetest.chat_send_all(table.concat({t, ...}, " ")) end
+
+
+minetest.register_entity("advtrains:discouple", {
+ visual="sprite",
+ textures = {"advtrains_discouple.png"},
+ collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
+ visual_size = {x=1, y=1},
+ initial_sprite_basepos = {x=0, y=0},
+
+ is_discouple=true,
+ on_activate=function(self, staticdata)
+ if staticdata=="DISCOUPLE" then
+ --couple entities have no right to exist further...
+ self.object:remove()
+ return
+ end
+ self.object:set_armor_groups({immortal=1})
+ end,
+ get_staticdata=function() return "DISCOUPLE" end,
+ on_punch=function(self, player)
+ --only if player owns at least one wagon next to this
+ local own=player:get_player_name()
+ if self.wagon.owner and self.wagon.owner~=own then
+ local train=advtrains.trains[self.wagon.train_id]
+ local nextwgn_id=train.trainparts[self.wagon.pos_in_trainparts-1]
+ for aoi, le in pairs(minetest.luaentities) do
+ if le and le.is_wagon then
+ if le.unique_id==nextwgn_id then
+ if le.owner and le.owner~=own then
+ minetest.chat_send_player(own, "You need to own at least one neighboring wagon to destroy this couple.")
+ return
+ end
+ end
+ end
+ end
+ end
+ advtrains.split_train_at_wagon(self.wagon)--found in trainlogic.lua
+ end,
+ on_step=function(self, dtime)
+ local t=os.clock()
+ if not self.wagon then
+ self.object:remove()
+ return
+ end
+ --getyaw seems to be a reliable method to check if an object is loaded...if it returns nil, it is not.
+ if not self.wagon.object:getyaw() then
+ self.object:remove()
+ return
+ end
+ local velocityvec=self.wagon.object:getvelocity()
+ self.updatepct_timer=(self.updatepct_timer or 0)-dtime
+ if not self.old_velocity_vector or not vector.equals(velocityvec, self.old_velocity_vector) or self.updatepct_timer<=0 then--only send update packet if something changed
+ local flipsign=self.wagon.wagon_flipped and -1 or 1
+ self.object:setpos(vector.add(self.wagon.object:getpos(), {y=0, x=-math.sin(self.wagon.object:getyaw())*self.wagon.wagon_span*flipsign, z=math.cos(self.wagon.object:getyaw())*self.wagon.wagon_span*flipsign}))
+ self.object:setvelocity(velocityvec)
+ self.updatepct_timer=2
+ end
+ printbm("discouple_step", t)
+ end,
+})
+
+--advtrains:couple
+--when two trains overlap with their end-positions, this entity will be spawned and both trains set its id into appropiate fields for them to know when to free them again. The entity will destroy automatically when it recognizes that any of the trains left the common position.
+--[[fields
+train_id_1
+train_id_2
+train1_is_backpos
+train2_is_backpos
+]]
+
+
+minetest.register_entity("advtrains:couple", {
+ visual="sprite",
+ textures = {"advtrains_couple.png"},
+ collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
+ visual_size = {x=1, y=1},
+ initial_sprite_basepos = {x=0, y=0},
+
+ is_couple=true,
+ on_activate=function(self, staticdata)
+ if staticdata=="COUPLE" then
+ --couple entities have no right to exist further...
+ self.object:remove()
+ return
+ end
+ end,
+ get_staticdata=function(self) return "COUPLE" end,
+ on_rightclick=function(self)
+ if not self.train_id_1 or not self.train_id_2 then return end
+
+ local id1, id2=self.train_id_1, self.train_id_2
+
+ if self.train1_is_backpos and not self.train2_is_backpos then
+ advtrains.do_connect_trains(id1, id2)
+ --case 2 (second train is front)
+ elseif self.train2_is_backpos and not self.train1_is_backpos then
+ advtrains.do_connect_trains(id2, id1)
+ --case 3
+ elseif self.train1_is_backpos and self.train2_is_backpos then
+ advtrains.invert_train(id2)
+ advtrains.do_connect_trains(id1, id2)
+ --case 4
+ elseif not self.train1_is_backpos and not self.train2_is_backpos then
+ advtrains.invert_train(id1)
+ advtrains.do_connect_trains(id1, id2)
+ end
+ self.object:remove()
+ end,
+ on_step=function(self, dtime)
+ local t=os.clock()
+ if not self.train_id_1 or not self.train_id_2 then print("wtf no train ids?")return end
+ local train1=advtrains.trains[self.train_id_1]
+ local train2=advtrains.trains[self.train_id_2]
+ if not train1 or not train2 or not train1.path or not train2.path or not train1.index or not train2.index then
+ self.object:remove()
+ return
+ end
+
+ local tp1
+ if not self.train1_is_backpos then
+ tp1=advtrains.get_real_index_position(train1.path, train1.index)
+ else
+ tp1=advtrains.get_real_index_position(train1.path, advtrains.get_train_end_index(train1))
+ end
+ local tp2
+ if not self.train2_is_backpos then
+ tp2=advtrains.get_real_index_position(train2.path, train2.index)
+ else
+ tp2=advtrains.get_real_index_position(train2.path, advtrains.get_train_end_index(train2))
+ end
+ if not tp1 or not tp2 or not (vector.distance(tp1,tp2)<0.5) then
+ self.object:remove()
+ return
+ else
+ local pos_median=advtrains.pos_median(tp1, tp2)
+ if not vector.equals(pos_median, self.object:getpos()) then
+ self.object:setpos(pos_median)
+ end
+ end
+ printbm("couple step", t)
+ end,
+})
diff --git a/advtrains/crafting.lua b/advtrains/crafting.lua
new file mode 100644
index 0000000..5ba12ce
--- /dev/null
+++ b/advtrains/crafting.lua
@@ -0,0 +1,71 @@
+--advtrains by orwell96, see readme.txt and license.txt
+--crafting.lua
+--registers crafting recipes
+
+--tracks
+minetest.register_craft({
+ output = 'advtrains:dtrack_placer 50',
+ recipe = {
+ {'default:steel_ingot', 'group:stick', 'default:steel_ingot'},
+ {'default:steel_ingot', 'group:stick', 'default:steel_ingot'},
+ {'default:steel_ingot', 'group:stick', 'default:steel_ingot'},
+ },
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = 'advtrains:dtrack_slopeplacer 2',
+ recipe = {
+ "advtrains:dtrack_placer",
+ "advtrains:dtrack_placer",
+ "default:gravel",
+ },
+})
+
+minetest.register_craft({
+ output = 'advtrains:dtrack_bumper_placer 2',
+ recipe = {
+ {'default:wood', 'dye:red'},
+ {'default:steel_ingot', 'default:steel_ingot'},
+ {'advtrains:dtrack_placer', 'advtrains:dtrack_placer'},
+ },
+})
+minetest.register_craft({
+ type="shapeless",
+ output = 'advtrains:dtrack_detector_off_placer',
+ recipe = {
+ "advtrains:dtrack_placer",
+ "mesecons:wire_00000000_off"
+ },
+})
+--signals
+minetest.register_craft({
+ output = 'advtrains:retrosignal_off 2',
+ recipe = {
+ {'dye:red', 'default:steel_ingot', 'default:steel_ingot'},
+ {'', '', 'default:steel_ingot'},
+ {'', '', 'default:steel_ingot'},
+ },
+})
+minetest.register_craft({
+ output = 'advtrains:signal_off 2',
+ recipe = {
+ {'', 'dye:red', 'default:steel_ingot'},
+ {'', 'dye:dark_green', 'default:steel_ingot'},
+ {'', '', 'default:steel_ingot'},
+ },
+})
+
+--trackworker
+minetest.register_craft({
+ output = 'advtrains:trackworker',
+ recipe = {
+ {'default:diamond'},
+ {'screwdriver:screwdriver'},
+ {'default:steel_ingot'},
+ },
+})
+
+
+
+--misc_nodes
+--crafts for platforms see misc_nodes.lua
diff --git a/advtrains/damage.lua b/advtrains/damage.lua
new file mode 100644
index 0000000..b39fe67
--- /dev/null
+++ b/advtrains/damage.lua
@@ -0,0 +1,26 @@
+--damage.lua
+--a globalstep that damages players overrolled by trains.
+
+advtrains.player_to_train_mapping={}
+
+local tmr=0
+minetest.register_globalstep(function(dtime)
+ tmr=tmr-dtime
+ if tmr<=0 then
+
+ for _, player in pairs(minetest.get_connected_players()) do
+ local pos=player:getpos()
+ for _, object in pairs(minetest.get_objects_inside_radius(pos, 1)) do
+ local le=object:get_luaentity()
+ if le and le.is_wagon and le.initialized and le:train() then
+ if (not advtrains.player_to_train_mapping[player:get_player_name()] or le.train_id~=advtrains.player_to_train_mapping[player:get_player_name()]) and math.abs(le:train().velocity)>2 then
+ --player:punch(object, 1000, {damage={fleshy=3*math.abs(le:train().velocity)}})
+ player:set_hp(player:get_hp()-math.abs(le:train().velocity)-3)
+ end
+ end
+ end
+ end
+
+ tmr=0.5
+ end
+end)
diff --git a/advtrains/debugitems.lua b/advtrains/debugitems.lua
new file mode 100644
index 0000000..b3164ff
--- /dev/null
+++ b/advtrains/debugitems.lua
@@ -0,0 +1,36 @@
+minetest.register_tool("advtrains:tunnelborer",
+{
+ description = "tunnelborer",
+ groups = {cracky=1}, -- key=name, value=rating; rating=1..3.
+ inventory_image = "drwho_screwdriver.png",
+ wield_image = "drwho_screwdriver.png",
+ stack_max = 1,
+ range = 7.0,
+
+ on_place = function(itemstack, placer, pointed_thing)
+
+ end,
+ --[[
+ ^ Shall place item and return the leftover itemstack
+ ^ default: minetest.item_place ]]
+ on_use = function(itemstack, user, pointed_thing)
+ if pointed_thing.type=="node" then
+ for x=-1,1 do
+ for y=-1,1 do
+ for z=-1,1 do
+ minetest.remove_node(vector.add(pointed_thing.under, {x=x, y=y, z=z}))
+ end
+ end
+ end
+ end
+ end,
+--[[
+^ default: nil
+^ Function must return either nil if no item shall be removed from
+inventory, or an itemstack to replace the original itemstack.
+e.g. itemstack:take_item(); return itemstack
+^ Otherwise, the function is free to do what it wants.
+^ The default functions handle regular use cases.
+]]
+}
+)
diff --git a/advtrains/depends.txt b/advtrains/depends.txt
new file mode 100644
index 0000000..20aa884
--- /dev/null
+++ b/advtrains/depends.txt
@@ -0,0 +1,2 @@
+default
+mesecons? \ No newline at end of file
diff --git a/advtrains/description.txt b/advtrains/description.txt
new file mode 100644
index 0000000..ecc5d58
--- /dev/null
+++ b/advtrains/description.txt
@@ -0,0 +1,8 @@
+Advanced Trains v1.3.0, by orwell and contributors. Also see readme.
+Good-looking, realistic trains for minetest.
+
+For crafting recipes, see manual.pdf
+
+Website: http://advtrains.bleipb.de/
+Manual: https://github.com/orwell96/advtrains/blob/master/manual.pdf
+Forum : https://forum.minetest.net/viewtopic.php?f=11&t=14726 \ No newline at end of file
diff --git a/advtrains/helpers.lua b/advtrains/helpers.lua
new file mode 100644
index 0000000..6a8175f
--- /dev/null
+++ b/advtrains/helpers.lua
@@ -0,0 +1,249 @@
+--advtrains by orwell96, see readme.txt
+local print=function(t) minetest.log("action", t) minetest.chat_send_all(t) end
+
+advtrains.dir_trans_tbl={
+ [0]={x=0, z=1},
+ [1]={x=1, z=2},
+ [2]={x=1, z=1},
+ [3]={x=2, z=1},
+ [4]={x=1, z=0},
+ [5]={x=2, z=-1},
+ [6]={x=1, z=-1},
+ [7]={x=1, z=-2},
+ [8]={x=0, z=-1},
+ [9]={x=-1, z=-2},
+ [10]={x=-1, z=-1},
+ [11]={x=-2, z=-1},
+ [12]={x=-1, z=0},
+ [13]={x=-2, z=1},
+ [14]={x=-1, z=1},
+ [15]={x=-1, z=2},
+}
+
+function advtrains.dirCoordSet(coord, dir)
+ local x,z
+ if advtrains.dir_trans_tbl[dir] then
+ x,z=advtrains.dir_trans_tbl[dir].x, advtrains.dir_trans_tbl[dir].z
+ else
+ error("advtrains: in helpers.lua/dirCoordSet() given dir="..(dir or "nil"))
+ end
+ return {x=coord.x+x, y=coord.y, z=coord.z+z}
+end
+function advtrains.dirToCoord(dir)
+ return advtrains.dirCoordSet({x=0, y=0, z=0}, dir)
+end
+
+function advtrains.maxN(list, expectstart)
+ local n=expectstart or 0
+ while list[n] do
+ n=n+1
+ end
+ return n-1
+end
+
+function advtrains.minN(list, expectstart)
+ local n=expectstart or 0
+ while list[n] do
+ n=n-1
+ end
+ return n+1
+end
+
+--vertical_transmit:
+--[[
+rely1, rely2 tell to which height the connections are pointed to. 1 means it will go up the next node
+
+]]
+
+function advtrains.conway(midreal, prev, traintype)--in order prev,mid,return
+ local mid=advtrains.round_vector_floor_y(midreal)
+ local drives_on=advtrains.all_traintypes[traintype].drives_on
+
+ if not advtrains.get_rail_info_at(advtrains.round_vector_floor_y(prev), traintype) then
+ return nil
+ end
+
+ local midnode_ok, middir1, middir2, midrely1, midrely2=advtrains.get_rail_info_at(advtrains.round_vector_floor_y(mid), traintype)
+ if not midnode_ok then
+ return nil
+ end
+
+ local next, chkdir, chkrely, y_offset
+ y_offset=0
+ --print("[advtrains] in order mid1,mid2",middir1,middir2)
+ --try if it is dir1
+ local cor1=advtrains.dirCoordSet(mid, middir2)--<<<<
+ if math.floor(cor1.x+0.5)==math.floor(prev.x+0.5) and math.floor(cor1.z+0.5)==math.floor(prev.z+0.5) then--this was previous
+ next=advtrains.dirCoordSet(mid, middir1)
+ if midrely1>=1 then
+ next.y=next.y+1
+ --print("[advtrains]found midrely1 to be >=1: next is now "..(next and minetest.pos_to_string(next) or "nil"))
+ y_offset=1
+ end
+ chkdir=middir1
+ chkrely=midrely1
+ --print("[advtrains]dir2 applied next pos:",minetest.pos_to_string(next),"(chkdir is ",chkdir,")")
+ end
+ --dir2???
+ local cor2=advtrains.dirCoordSet(mid, middir1)--<<<<
+ if math.floor(cor2.x+0.5)==math.floor(prev.x+0.5) and math.floor(cor2.z+0.5)==math.floor(prev.z+0.5) then
+ next=advtrains.dirCoordSet(mid, middir2)--dir2 wird überprüft, alles gut.
+ if midrely2>=1 then
+ next.y=next.y+1
+ --print("[advtrains]found midrely2 to be >=1: next is now "..(next and minetest.pos_to_string(next) or "nil"))
+ y_offset=1
+ end
+ chkdir=middir2
+ chkrely=midrely2
+ --print("[advtrains] dir2 applied next pos:",minetest.pos_to_string(next),"(chkdir is ",chkdir,")")
+ end
+ --print("[advtrains]dir applied next pos: "..(next and minetest.pos_to_string(next) or "nil").."(chkdir is "..(chkdir or "nil")..", y-offset "..y_offset..")")
+ --is there a next
+ if not next then
+ --print("[advtrains]in conway: no next rail(nil), returning!")
+ return nil
+ end
+
+ local nextnode_ok, nextdir1, nextdir2, nextrely1, nextrely2, nextrailheight=advtrains.get_rail_info_at(advtrains.round_vector_floor_y(next), traintype)
+
+ --is it a rail?
+ if(not nextnode_ok) then
+ --print("[advtrains]in conway: next "..minetest.pos_to_string(next).." not a rail, trying one node below!")
+ next.y=next.y-1
+ y_offset=y_offset-1
+
+ nextnode_ok, nextdir1, nextdir2, nextrely1, nextrely2, nextrailheight=advtrains.get_rail_info_at(advtrains.round_vector_floor_y(next), traintype)
+ if(not nextnode_ok) then
+ --print("[advtrains]in conway: one below "..minetest.pos_to_string(next).." is not a rail either, returning!")
+ return nil
+ end
+ end
+
+ --is this next rail connecting to the mid?
+ if not ( (((nextdir1+8)%16)==chkdir and nextrely1==chkrely-y_offset) or (((nextdir2+8)%16)==chkdir and nextrely2==chkrely-y_offset) ) then
+ --print("[advtrains]in conway: next "..minetest.pos_to_string(next).." not connecting, trying one node below!")
+ next.y=next.y-1
+ y_offset=y_offset-1
+
+ nextnode_ok, nextdir1, nextdir2, nextrely1, nextrely2, nextrailheight=advtrains.get_rail_info_at(advtrains.round_vector_floor_y(next), traintype)
+ if(not nextnode_ok) then
+ --print("[advtrains]in conway: (at connecting if check again) one below "..minetest.pos_to_string(next).." is not a rail either, returning!")
+ return nil
+ end
+ if not ( (((nextdir1+8)%16)==chkdir and nextrely1==chkrely) or (((nextdir2+8)%16)==chkdir and nextrely2==chkrely) ) then
+ --print("[advtrains]in conway: one below "..minetest.pos_to_string(next).." rail not connecting, returning!")
+ --print("[advtrains] in order mid1,2,next1,2,chkdir "..middir1.." "..middir2.." "..nextdir1.." "..nextdir2.." "..chkdir)
+ return nil
+ end
+ end
+
+ --print("[advtrains]conway found rail.")
+ return vector.add(advtrains.round_vector_floor_y(next), {x=0, y=nextrailheight, z=0}), chkdir
+end
+--TODO use this
+function advtrains.oppd(dir)
+ return ((dir+8)%16)
+end
+
+function advtrains.round_vector_floor_y(vec)
+ return {x=math.floor(vec.x+0.5), y=math.floor(vec.y), z=math.floor(vec.z+0.5)}
+end
+
+function advtrains.yawToDirection(yaw, conn1, conn2)
+ if not conn1 or not conn2 then
+ error("given nil to yawToDirection: conn1="..(conn1 or "nil").." conn2="..(conn1 or "nil"))
+ end
+ local yaw1=math.pi*(conn1/4)
+ local yaw2=math.pi*(conn2/4)
+ if advtrains.minAngleDiffRad(yaw, yaw1)<advtrains.minAngleDiffRad(yaw, yaw2) then--change to > if weird behavior
+ return conn2
+ else
+ return conn1
+ end
+end
+
+function advtrains.minAngleDiffRad(r1, r2)
+ local try1=r2-r1
+ local try2=(r2+2*math.pi)-r1
+ local try3=r2-(r1+2*math.pi)
+ if math.min(math.abs(try1), math.abs(try2), math.abs(try3))==math.abs(try1) then
+ return try1
+ end
+ if math.min(math.abs(try1), math.abs(try2), math.abs(try3))==math.abs(try2) then
+ return try2
+ end
+ if math.min(math.abs(try1), math.abs(try2), math.abs(try3))==math.abs(try3) then
+ return try3
+ end
+end
+function advtrains.dumppath(path)
+ if not path then print("dumppath: no path(nil)") return end
+ local min=advtrains.minN(path)
+ local max=advtrains.maxN(path)
+ for i=min, max do print("["..i.."] "..(path[i] and minetest.pos_to_string(path[i]) or "nil")) end
+end
+
+function advtrains.merge_tables(a, ...)
+ local new={}
+ for _,t in ipairs({a,...}) do
+ for k,v in pairs(t) do new[k]=v end
+ end
+ return new
+end
+function advtrains.yaw_from_3_positions(prev, curr, next)
+ local pts=minetest.pos_to_string
+ --print("p3 "..pts(prev)..pts(curr)..pts(next))
+ local prev2curr=math.atan2((curr.x-prev.x), (prev.z-curr.z))
+ local curr2next=math.atan2((next.x-curr.x), (curr.z-next.z))
+ --print("y3 "..(prev2curr*360/(2*math.pi)).." "..(curr2next*360/(2*math.pi)))
+ return prev2curr+(advtrains.minAngleDiffRad(prev2curr, curr2next)/2)
+end
+function advtrains.get_wagon_yaw(front, first, second, back, pct)
+ local pts=minetest.pos_to_string
+ --print("p "..pts(front)..pts(first)..pts(second)..pts(back))
+ local y2=advtrains.yaw_from_3_positions(second, first, front)
+ local y1=advtrains.yaw_from_3_positions(back, second, first)
+ --print("y "..(y1*360/(2*math.pi)).." "..(y2*360/(2*math.pi)))
+ return y1+advtrains.minAngleDiffRad(y1, y2)*pct
+end
+function advtrains.get_real_index_position(path, index)
+ if not path or not index then return end
+
+ local first_pos=path[math.floor(index)]
+ local second_pos=path[math.floor(index)+1]
+
+ if not first_pos or not second_pos then return nil end
+
+ local factor=index-math.floor(index)
+ local actual_pos={x=first_pos.x-(first_pos.x-second_pos.x)*factor, y=first_pos.y-(first_pos.y-second_pos.y)*factor, z=first_pos.z-(first_pos.z-second_pos.z)*factor,}
+ return actual_pos
+end
+function advtrains.pos_median(pos1, pos2)
+ return {x=pos1.x-(pos1.x-pos2.x)*0.5, y=pos1.y-(pos1.y-pos2.y)*0.5, z=pos1.z-(pos1.z-pos2.z)*0.5}
+end
+function advtrains.abs_ceil(i)
+ return math.ceil(math.abs(i))*math.sign(i)
+end
+
+function advtrains.serialize_inventory(inv)
+ local ser={}
+ local liszts=inv:get_lists()
+ for lisztname, liszt in pairs(liszts) do
+ ser[lisztname]={}
+ for idx, item in ipairs(liszt) do
+ local istring=item:to_string()
+ if istring~="" then
+ ser[lisztname][idx]=istring
+ end
+ end
+ end
+ return minetest.serialize(ser)
+end
+function advtrains.deserialize_inventory(sers, inv)
+ local ser=minetest.deserialize(sers)
+ if ser then
+ inv:set_lists(ser)
+ return true
+ end
+ return false
+end
diff --git a/advtrains/init.lua b/advtrains/init.lua
new file mode 100644
index 0000000..41b624e
--- /dev/null
+++ b/advtrains/init.lua
@@ -0,0 +1,42 @@
+--advtrains
+
+advtrains={}
+
+advtrains.modpath = minetest.get_modpath("advtrains")
+
+--print=function(text)
+-- minetest.log("action", tostring(text) or "<non-string>")
+--end
+print = function(t) minetest.log("action", t) minetest.chat_send_all(t) end
+
+dofile(advtrains.modpath.."/helpers.lua");
+dofile(advtrains.modpath.."/debugitems.lua");
+
+advtrains.meseconrules =
+{{x=0, y=0, z=-1},
+ {x=1, y=0, z=0},
+ {x=-1, y=0, z=0},
+ {x=0, y=0, z=1},
+ {x=1, y=1, z=0},
+ {x=1, y=-1, z=0},
+ {x=-1, y=1, z=0},
+ {x=-1, y=-1, z=0},
+ {x=0, y=1, z=1},
+ {x=0, y=-1, z=1},
+ {x=0, y=1, z=-1},
+ {x=0, y=-1, z=-1},
+ {x=0, y=-2, z=0}}
+dofile(advtrains.modpath.."/trainlogic.lua")
+dofile(advtrains.modpath.."/trainhud.lua")
+dofile(advtrains.modpath.."/trackplacer.lua")
+dofile(advtrains.modpath.."/tracks.lua")
+dofile(advtrains.modpath.."/atc.lua")
+dofile(advtrains.modpath.."/wagons.lua")
+
+dofile(advtrains.modpath.."/pseudoload.lua")
+dofile(advtrains.modpath.."/couple.lua")
+dofile(advtrains.modpath.."/damage.lua")
+
+dofile(advtrains.modpath.."/signals.lua")
+dofile(advtrains.modpath.."/misc_nodes.lua")
+dofile(advtrains.modpath.."/crafting.lua")
diff --git a/advtrains/misc_nodes.lua b/advtrains/misc_nodes.lua
new file mode 100644
index 0000000..93829f0
--- /dev/null
+++ b/advtrains/misc_nodes.lua
@@ -0,0 +1,67 @@
+--all nodes that do not fit in any other category
+
+function advtrains.register_platform(preset)
+ local ndef=minetest.registered_nodes[preset]
+ if not ndef then
+ minetest.log("warning", "[advtrains] register_platform couldn't find preset node "..preset)
+ return
+ end
+ local btex=ndef.tiles
+ if type(btex)=="table" then
+ btex=btex[1]
+ end
+ local desc=ndef.description or ""
+ local nodename=string.match(preset, ":(.+)$")
+ minetest.register_node("advtrains:platform_low_"..nodename, {
+ description = desc.." Platform (low)",
+ tiles = {btex.."^advtrains_platform.png", btex, btex, btex, btex, btex},
+ groups = {cracky = 1, not_blocking_trains = 1, platform=1},
+ sounds = default.node_sound_stone_defaults(),
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.1, -0.1, 0.5, 0 , 0.5},
+ {-0.5, -0.5, 0 , 0.5, -0.1, 0.5}
+ },
+ },
+ paramtype2="facedir",
+ paramtype = "light",
+ sunlight_propagates = true,
+ })
+ minetest.register_node("advtrains:platform_high_"..nodename, {
+ description = desc.." Platform (high)",
+ tiles = {btex.."^advtrains_platform.png", btex, btex, btex, btex, btex},
+ groups = {cracky = 1, not_blocking_trains = 1, platform=2},
+ sounds = default.node_sound_stone_defaults(),
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5, 0.3, -0.1, 0.5, 0.5, 0.5},
+ {-0.5, -0.5, 0 , 0.5, 0.3, 0.5}
+ },
+ },
+ paramtype2="facedir",
+ paramtype = "light",
+ sunlight_propagates = true,
+ })
+ minetest.register_craft({
+ type="shapeless",
+ output = "advtrains:platform_high_"..nodename.." 4",
+ recipe = {
+ "dye:yellow", preset, preset
+ },
+ })
+ minetest.register_craft({
+ type="shapeless",
+ output = "advtrains:platform_low_"..nodename.." 4",
+ recipe = {
+ "dye:yellow", preset
+ },
+ })
+end
+
+
+advtrains.register_platform("default:stonebrick")
+advtrains.register_platform("default:sandstonebrick")
diff --git a/advtrains/models/advtrains_dtrack_bumper_st.b3d b/advtrains/models/advtrains_dtrack_bumper_st.b3d
new file mode 100644
index 0000000..a6d9745
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_bumper_st.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_bumper_st_30.b3d b/advtrains/models/advtrains_dtrack_bumper_st_30.b3d
new file mode 100644
index 0000000..5f5b3f4
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_bumper_st_30.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_bumper_st_45.b3d b/advtrains/models/advtrains_dtrack_bumper_st_45.b3d
new file mode 100644
index 0000000..f13ae75
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_bumper_st_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_bumper_st_60.b3d b/advtrains/models/advtrains_dtrack_bumper_st_60.b3d
new file mode 100644
index 0000000..59a2285
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_bumper_st_60.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_cr.b3d b/advtrains/models/advtrains_dtrack_cr.b3d
new file mode 100644
index 0000000..159717e
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_cr.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_cr_30.b3d b/advtrains/models/advtrains_dtrack_cr_30.b3d
new file mode 100644
index 0000000..09cdb1f
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_cr_30.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_cr_45.b3d b/advtrains/models/advtrains_dtrack_cr_45.b3d
new file mode 100644
index 0000000..176da81
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_cr_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_cr_60.b3d b/advtrains/models/advtrains_dtrack_cr_60.b3d
new file mode 100644
index 0000000..00313c8
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_cr_60.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_detector_st.b3d b/advtrains/models/advtrains_dtrack_detector_st.b3d
new file mode 100644
index 0000000..893c8cd
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_detector_st.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_detector_st_30.b3d b/advtrains/models/advtrains_dtrack_detector_st_30.b3d
new file mode 100644
index 0000000..2e59e93
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_detector_st_30.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_detector_st_45.b3d b/advtrains/models/advtrains_dtrack_detector_st_45.b3d
new file mode 100644
index 0000000..c73166f
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_detector_st_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_detector_st_60.b3d b/advtrains/models/advtrains_dtrack_detector_st_60.b3d
new file mode 100644
index 0000000..b6bc9af
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_detector_st_60.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_st.b3d b/advtrains/models/advtrains_dtrack_st.b3d
new file mode 100644
index 0000000..f3e2753
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_st.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_st_30.b3d b/advtrains/models/advtrains_dtrack_st_30.b3d
new file mode 100644
index 0000000..7a35c8d
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_st_30.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_st_45.b3d b/advtrains/models/advtrains_dtrack_st_45.b3d
new file mode 100644
index 0000000..b2a1702
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_st_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_st_60.b3d b/advtrains/models/advtrains_dtrack_st_60.b3d
new file mode 100644
index 0000000..0a59f77
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_st_60.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swlcr.b3d b/advtrains/models/advtrains_dtrack_swlcr.b3d
new file mode 100644
index 0000000..1adc23f
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swlcr.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swlcr_30.b3d b/advtrains/models/advtrains_dtrack_swlcr_30.b3d
new file mode 100644
index 0000000..7d8373b
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swlcr_30.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swlcr_45.b3d b/advtrains/models/advtrains_dtrack_swlcr_45.b3d
new file mode 100644
index 0000000..9679b9e
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swlcr_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swlcr_60.b3d b/advtrains/models/advtrains_dtrack_swlcr_60.b3d
new file mode 100644
index 0000000..3efc924
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swlcr_60.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swlst.b3d b/advtrains/models/advtrains_dtrack_swlst.b3d
new file mode 100644
index 0000000..93841a4
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swlst.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swlst_30.b3d b/advtrains/models/advtrains_dtrack_swlst_30.b3d
new file mode 100644
index 0000000..e9a90c7
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swlst_30.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swlst_45.b3d b/advtrains/models/advtrains_dtrack_swlst_45.b3d
new file mode 100644
index 0000000..49c707c
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swlst_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swlst_60.b3d b/advtrains/models/advtrains_dtrack_swlst_60.b3d
new file mode 100644
index 0000000..c9a6ffe
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swlst_60.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swrcr.b3d b/advtrains/models/advtrains_dtrack_swrcr.b3d
new file mode 100644
index 0000000..ee29b62
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swrcr.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swrcr_30.b3d b/advtrains/models/advtrains_dtrack_swrcr_30.b3d
new file mode 100644
index 0000000..ba065e1
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swrcr_30.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swrcr_45.b3d b/advtrains/models/advtrains_dtrack_swrcr_45.b3d
new file mode 100644
index 0000000..7f9dc43
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swrcr_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swrcr_60.b3d b/advtrains/models/advtrains_dtrack_swrcr_60.b3d
new file mode 100644
index 0000000..b8ffa61
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swrcr_60.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swrst.b3d b/advtrains/models/advtrains_dtrack_swrst.b3d
new file mode 100644
index 0000000..0b3e7ad
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swrst.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swrst_30.b3d b/advtrains/models/advtrains_dtrack_swrst_30.b3d
new file mode 100644
index 0000000..4aea19b
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swrst_30.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swrst_45.b3d b/advtrains/models/advtrains_dtrack_swrst_45.b3d
new file mode 100644
index 0000000..4182fe5
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swrst_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_swrst_60.b3d b/advtrains/models/advtrains_dtrack_swrst_60.b3d
new file mode 100644
index 0000000..6d2c891
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_swrst_60.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_vst1.b3d b/advtrains/models/advtrains_dtrack_vst1.b3d
new file mode 100644
index 0000000..c9d7427
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_vst1.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_vst1_45.b3d b/advtrains/models/advtrains_dtrack_vst1_45.b3d
new file mode 100644
index 0000000..14d438c
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_vst1_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_vst2.b3d b/advtrains/models/advtrains_dtrack_vst2.b3d
new file mode 100644
index 0000000..c128650
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_vst2.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_vst2_45.b3d b/advtrains/models/advtrains_dtrack_vst2_45.b3d
new file mode 100644
index 0000000..263276d
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_vst2_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_vst31.b3d b/advtrains/models/advtrains_dtrack_vst31.b3d
new file mode 100644
index 0000000..df0f383
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_vst31.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_vst32.b3d b/advtrains/models/advtrains_dtrack_vst32.b3d
new file mode 100644
index 0000000..01d2978
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_vst32.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_dtrack_vst33.b3d b/advtrains/models/advtrains_dtrack_vst33.b3d
new file mode 100644
index 0000000..7fe418d
--- /dev/null
+++ b/advtrains/models/advtrains_dtrack_vst33.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_modernwagon.b3d b/advtrains/models/advtrains_modernwagon.b3d
new file mode 100644
index 0000000..aacddca
--- /dev/null
+++ b/advtrains/models/advtrains_modernwagon.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_retrosignal_off.b3d b/advtrains/models/advtrains_retrosignal_off.b3d
new file mode 100644
index 0000000..3d231dd
--- /dev/null
+++ b/advtrains/models/advtrains_retrosignal_off.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_retrosignal_off_30.b3d b/advtrains/models/advtrains_retrosignal_off_30.b3d
new file mode 100644
index 0000000..da258e1
--- /dev/null
+++ b/advtrains/models/advtrains_retrosignal_off_30.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_retrosignal_off_45.b3d b/advtrains/models/advtrains_retrosignal_off_45.b3d
new file mode 100644
index 0000000..338224a
--- /dev/null
+++ b/advtrains/models/advtrains_retrosignal_off_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_retrosignal_off_60.b3d b/advtrains/models/advtrains_retrosignal_off_60.b3d
new file mode 100644
index 0000000..c560ca1
--- /dev/null
+++ b/advtrains/models/advtrains_retrosignal_off_60.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_retrosignal_on.b3d b/advtrains/models/advtrains_retrosignal_on.b3d
new file mode 100644
index 0000000..3d19439
--- /dev/null
+++ b/advtrains/models/advtrains_retrosignal_on.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_retrosignal_on_30.b3d b/advtrains/models/advtrains_retrosignal_on_30.b3d
new file mode 100644
index 0000000..98f8a92
--- /dev/null
+++ b/advtrains/models/advtrains_retrosignal_on_30.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_retrosignal_on_45.b3d b/advtrains/models/advtrains_retrosignal_on_45.b3d
new file mode 100644
index 0000000..414e121
--- /dev/null
+++ b/advtrains/models/advtrains_retrosignal_on_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_retrosignal_on_60.b3d b/advtrains/models/advtrains_retrosignal_on_60.b3d
new file mode 100644
index 0000000..a51529a
--- /dev/null
+++ b/advtrains/models/advtrains_retrosignal_on_60.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_signal.b3d b/advtrains/models/advtrains_signal.b3d
new file mode 100644
index 0000000..7f69560
--- /dev/null
+++ b/advtrains/models/advtrains_signal.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_signal_30.b3d b/advtrains/models/advtrains_signal_30.b3d
new file mode 100644
index 0000000..0b949a7
--- /dev/null
+++ b/advtrains/models/advtrains_signal_30.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_signal_45.b3d b/advtrains/models/advtrains_signal_45.b3d
new file mode 100644
index 0000000..ccaebf4
--- /dev/null
+++ b/advtrains/models/advtrains_signal_45.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_signal_60.b3d b/advtrains/models/advtrains_signal_60.b3d
new file mode 100644
index 0000000..cf41e6d
--- /dev/null
+++ b/advtrains/models/advtrains_signal_60.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_track_cr.b3d b/advtrains/models/advtrains_track_cr.b3d
new file mode 100644
index 0000000..b0f5e4b
--- /dev/null
+++ b/advtrains/models/advtrains_track_cr.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_track_st.b3d b/advtrains/models/advtrains_track_st.b3d
new file mode 100644
index 0000000..10b5d90
--- /dev/null
+++ b/advtrains/models/advtrains_track_st.b3d
Binary files differ
diff --git a/advtrains/models/advtrains_track_st_45.b3d b/advtrains/models/advtrains_track_st_45.b3d
new file mode 100644
index 0000000..32505a1
--- /dev/null
+++ b/advtrains/models/advtrains_track_st_45.b3d
Binary files differ
diff --git a/advtrains/models/blender/engine-with-animation.blend b/advtrains/models/blender/engine-with-animation.blend
new file mode 100644
index 0000000..2649587
--- /dev/null
+++ b/advtrains/models/blender/engine-with-animation.blend
Binary files differ
diff --git a/advtrains/models/blender/gleis/infos/Grafik_weiche.png b/advtrains/models/blender/gleis/infos/Grafik_weiche.png
new file mode 100644
index 0000000..6674eb3
--- /dev/null
+++ b/advtrains/models/blender/gleis/infos/Grafik_weiche.png
Binary files differ
diff --git a/advtrains/models/blender/gleis/infos/breite b/advtrains/models/blender/gleis/infos/breite
new file mode 100644
index 0000000..b2862c6
--- /dev/null
+++ b/advtrains/models/blender/gleis/infos/breite
@@ -0,0 +1 @@
+1435mm
diff --git a/advtrains/models/blender/gleis/licence.txt~ b/advtrains/models/blender/gleis/licence.txt~
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/advtrains/models/blender/gleis/licence.txt~
diff --git a/advtrains/models/blender/gleis/rail_my.blend b/advtrains/models/blender/gleis/rail_my.blend
new file mode 100644
index 0000000..3c741bc
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_my.blend
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_my.blend1 b/advtrains/models/blender/gleis/rail_my.blend1
new file mode 100644
index 0000000..6322856
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_my.blend1
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_my_rt.blend b/advtrains/models/blender/gleis/rail_my_rt.blend
new file mode 100644
index 0000000..8372a0c
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_my_rt.blend
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_my_rt.blend1 b/advtrains/models/blender/gleis/rail_my_rt.blend1
new file mode 100644
index 0000000..7d0978e
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_my_rt.blend1
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_my_rt_final.blend b/advtrains/models/blender/gleis/rail_my_rt_final.blend
new file mode 100644
index 0000000..6a9a088
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_my_rt_final.blend
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_my_rt_final.blend1 b/advtrains/models/blender/gleis/rail_my_rt_final.blend1
new file mode 100644
index 0000000..1f346ae
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_my_rt_final.blend1
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_my_rt_switches.blend b/advtrains/models/blender/gleis/rail_my_rt_switches.blend
new file mode 100644
index 0000000..fdce427
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_my_rt_switches.blend
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_my_rt_switches.blend1 b/advtrains/models/blender/gleis/rail_my_rt_switches.blend1
new file mode 100644
index 0000000..04370ba
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_my_rt_switches.blend1
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_my_rt_switches2.blend b/advtrains/models/blender/gleis/rail_my_rt_switches2.blend
new file mode 100644
index 0000000..9562e4d
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_my_rt_switches2.blend
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_my_rt_switches2.blend1 b/advtrains/models/blender/gleis/rail_my_rt_switches2.blend1
new file mode 100644
index 0000000..07a155f
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_my_rt_switches2.blend1
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_together.blend b/advtrains/models/blender/gleis/rail_together.blend
new file mode 100644
index 0000000..cff51ea
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_together.blend
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_together.png b/advtrains/models/blender/gleis/rail_together.png
new file mode 100644
index 0000000..386cd5c
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_together.png
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_together2.png b/advtrains/models/blender/gleis/rail_together2.png
new file mode 100644
index 0000000..3effe34
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_together2.png
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_together3.png b/advtrains/models/blender/gleis/rail_together3.png
new file mode 100644
index 0000000..4a183c1
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_together3.png
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_verticals.blend b/advtrains/models/blender/gleis/rail_verticals.blend
new file mode 100644
index 0000000..45c37e1
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_verticals.blend
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_verticals.blend1 b/advtrains/models/blender/gleis/rail_verticals.blend1
new file mode 100644
index 0000000..320f30b
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_verticals.blend1
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_verticals3.blend b/advtrains/models/blender/gleis/rail_verticals3.blend
new file mode 100644
index 0000000..5d62959
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_verticals3.blend
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_verticals3.blend1 b/advtrains/models/blender/gleis/rail_verticals3.blend1
new file mode 100644
index 0000000..893f2ea
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_verticals3.blend1
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_verticals45.blend b/advtrains/models/blender/gleis/rail_verticals45.blend
new file mode 100644
index 0000000..a1589e3
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_verticals45.blend
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_verticals45.blend1 b/advtrains/models/blender/gleis/rail_verticals45.blend1
new file mode 100644
index 0000000..6b44d1c
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_verticals45.blend1
Binary files differ
diff --git a/advtrains/models/blender/gleis/rail_verticals45.blend11 b/advtrains/models/blender/gleis/rail_verticals45.blend11
new file mode 100644
index 0000000..48316e8
--- /dev/null
+++ b/advtrains/models/blender/gleis/rail_verticals45.blend11
Binary files differ
diff --git a/advtrains/models/blender/gleis/texturen/rail.png b/advtrains/models/blender/gleis/texturen/rail.png
new file mode 100644
index 0000000..8478cf6
--- /dev/null
+++ b/advtrains/models/blender/gleis/texturen/rail.png
Binary files differ
diff --git a/advtrains/models/blender/gleis/texturen/uv.png b/advtrains/models/blender/gleis/texturen/uv.png
new file mode 100644
index 0000000..fb0af3e
--- /dev/null
+++ b/advtrains/models/blender/gleis/texturen/uv.png
Binary files differ
diff --git a/advtrains/models/blender/industrial/industry_loc.blend b/advtrains/models/blender/industrial/industry_loc.blend
new file mode 100644
index 0000000..1a6cb2b
--- /dev/null
+++ b/advtrains/models/blender/industrial/industry_loc.blend
Binary files differ
diff --git a/advtrains/models/blender/industrial/industry_loc.blend1 b/advtrains/models/blender/industrial/industry_loc.blend1
new file mode 100644
index 0000000..af54c3f
--- /dev/null
+++ b/advtrains/models/blender/industrial/industry_loc.blend1
Binary files differ
diff --git a/advtrains/models/blender/industrial/industry_loc.blend11 b/advtrains/models/blender/industrial/industry_loc.blend11
new file mode 100644
index 0000000..a089a65
--- /dev/null
+++ b/advtrains/models/blender/industrial/industry_loc.blend11
Binary files differ
diff --git a/advtrains/models/blender/industrial/industry_oil_ wagong.blend b/advtrains/models/blender/industrial/industry_oil_ wagong.blend
new file mode 100644
index 0000000..30bde51
--- /dev/null
+++ b/advtrains/models/blender/industrial/industry_oil_ wagong.blend
Binary files differ
diff --git a/advtrains/models/blender/industrial/industry_oil_ wagong.blend1 b/advtrains/models/blender/industrial/industry_oil_ wagong.blend1
new file mode 100644
index 0000000..849971d
--- /dev/null
+++ b/advtrains/models/blender/industrial/industry_oil_ wagong.blend1
Binary files differ
diff --git a/advtrains/models/blender/industrial/industry_tree_wagong.blend b/advtrains/models/blender/industrial/industry_tree_wagong.blend
new file mode 100644
index 0000000..23de208
--- /dev/null
+++ b/advtrains/models/blender/industrial/industry_tree_wagong.blend
Binary files differ
diff --git a/advtrains/models/blender/industrial/industry_tree_wagong.blend1 b/advtrains/models/blender/industrial/industry_tree_wagong.blend1
new file mode 100644
index 0000000..bf2c9ed
--- /dev/null
+++ b/advtrains/models/blender/industrial/industry_tree_wagong.blend1
Binary files differ
diff --git a/advtrains/models/blender/industrial/industry_tree_wagong.png b/advtrains/models/blender/industrial/industry_tree_wagong.png
new file mode 100644
index 0000000..87109dd
--- /dev/null
+++ b/advtrains/models/blender/industrial/industry_tree_wagong.png
Binary files differ
diff --git a/advtrains/models/blender/locomotive.blend b/advtrains/models/blender/locomotive.blend
new file mode 100644
index 0000000..8fd6059
--- /dev/null
+++ b/advtrains/models/blender/locomotive.blend
Binary files differ
diff --git a/advtrains/models/blender/magnet_track.blend b/advtrains/models/blender/magnet_track.blend
new file mode 100644
index 0000000..0ab14e7
--- /dev/null
+++ b/advtrains/models/blender/magnet_track.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/advtrains_wagon_japan.xcf b/advtrains/models/blender/mbb/advtrains_wagon_japan.xcf
new file mode 100644
index 0000000..4fc88c0
--- /dev/null
+++ b/advtrains/models/blender/mbb/advtrains_wagon_japan.xcf
Binary files differ
diff --git a/advtrains/models/blender/mbb/modern_japanlocomotive.blend b/advtrains/models/blender/mbb/modern_japanlocomotive.blend
new file mode 100644
index 0000000..6eb8f3d
--- /dev/null
+++ b/advtrains/models/blender/mbb/modern_japanlocomotive.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/modern_japanlocomotive.blend1 b/advtrains/models/blender/mbb/modern_japanlocomotive.blend1
new file mode 100644
index 0000000..a2e745d
--- /dev/null
+++ b/advtrains/models/blender/mbb/modern_japanlocomotive.blend1
Binary files differ
diff --git a/advtrains/models/blender/mbb/modern_japanlocomotive.png b/advtrains/models/blender/mbb/modern_japanlocomotive.png
new file mode 100644
index 0000000..b80d16f
--- /dev/null
+++ b/advtrains/models/blender/mbb/modern_japanlocomotive.png
Binary files differ
diff --git a/advtrains/models/blender/mbb/modern_japanlocomotive.xcf b/advtrains/models/blender/mbb/modern_japanlocomotive.xcf
new file mode 100644
index 0000000..bb28534
--- /dev/null
+++ b/advtrains/models/blender/mbb/modern_japanlocomotive.xcf
Binary files differ
diff --git a/advtrains/models/blender/mbb/modern_locomotive.blend b/advtrains/models/blender/mbb/modern_locomotive.blend
new file mode 100644
index 0000000..8e72233
--- /dev/null
+++ b/advtrains/models/blender/mbb/modern_locomotive.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/modern_wagong.blend b/advtrains/models/blender/mbb/modern_wagong.blend
new file mode 100644
index 0000000..f32710a
--- /dev/null
+++ b/advtrains/models/blender/mbb/modern_wagong.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/modern_wagong.blend1 b/advtrains/models/blender/mbb/modern_wagong.blend1
new file mode 100644
index 0000000..376831c
--- /dev/null
+++ b/advtrains/models/blender/mbb/modern_wagong.blend1
Binary files differ
diff --git a/advtrains/models/blender/mbb/modern_wagong_uv.blend b/advtrains/models/blender/mbb/modern_wagong_uv.blend
new file mode 100644
index 0000000..4c10fb3
--- /dev/null
+++ b/advtrains/models/blender/mbb/modern_wagong_uv.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/modern_wagong_uv.blend1 b/advtrains/models/blender/mbb/modern_wagong_uv.blend1
new file mode 100644
index 0000000..ce77416
--- /dev/null
+++ b/advtrains/models/blender/mbb/modern_wagong_uv.blend1
Binary files differ
diff --git a/advtrains/models/blender/mbb/modern_wagong_uv.png b/advtrains/models/blender/mbb/modern_wagong_uv.png
new file mode 100644
index 0000000..68018ea
--- /dev/null
+++ b/advtrains/models/blender/mbb/modern_wagong_uv.png
Binary files differ
diff --git a/advtrains/models/blender/mbb/prellbock.blend b/advtrains/models/blender/mbb/prellbock.blend
new file mode 100644
index 0000000..1c20ab2
--- /dev/null
+++ b/advtrains/models/blender/mbb/prellbock.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/prellbock.blend1 b/advtrains/models/blender/mbb/prellbock.blend1
new file mode 100644
index 0000000..981538e
--- /dev/null
+++ b/advtrains/models/blender/mbb/prellbock.blend1
Binary files differ
diff --git a/advtrains/models/blender/mbb/prellbock.uv.png b/advtrains/models/blender/mbb/prellbock.uv.png
new file mode 100644
index 0000000..7730753
--- /dev/null
+++ b/advtrains/models/blender/mbb/prellbock.uv.png
Binary files differ
diff --git a/advtrains/models/blender/mbb/regio-lokomotive.blend b/advtrains/models/blender/mbb/regio-lokomotive.blend
new file mode 100644
index 0000000..210e60e
--- /dev/null
+++ b/advtrains/models/blender/mbb/regio-lokomotive.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/regio-waron.blend b/advtrains/models/blender/mbb/regio-waron.blend
new file mode 100644
index 0000000..19b07ce
--- /dev/null
+++ b/advtrains/models/blender/mbb/regio-waron.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/retrosignal.blend b/advtrains/models/blender/mbb/retrosignal.blend
new file mode 100644
index 0000000..b795215
--- /dev/null
+++ b/advtrains/models/blender/mbb/retrosignal.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/retrosignal.blend1 b/advtrains/models/blender/mbb/retrosignal.blend1
new file mode 100644
index 0000000..94af470
--- /dev/null
+++ b/advtrains/models/blender/mbb/retrosignal.blend1
Binary files differ
diff --git a/advtrains/models/blender/mbb/signal(2)_hoch.blend b/advtrains/models/blender/mbb/signal(2)_hoch.blend
new file mode 100644
index 0000000..70391f6
--- /dev/null
+++ b/advtrains/models/blender/mbb/signal(2)_hoch.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/signal(2)_unten.blend b/advtrains/models/blender/mbb/signal(2)_unten.blend
new file mode 100644
index 0000000..4e917bc
--- /dev/null
+++ b/advtrains/models/blender/mbb/signal(2)_unten.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/signal.blend b/advtrains/models/blender/mbb/signal.blend
new file mode 100644
index 0000000..135c7b4
--- /dev/null
+++ b/advtrains/models/blender/mbb/signal.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/signal.blend1 b/advtrains/models/blender/mbb/signal.blend1
new file mode 100644
index 0000000..63a8c99
--- /dev/null
+++ b/advtrains/models/blender/mbb/signal.blend1
Binary files differ
diff --git a/advtrains/models/blender/mbb/signal.png b/advtrains/models/blender/mbb/signal.png
new file mode 100644
index 0000000..779cdda
--- /dev/null
+++ b/advtrains/models/blender/mbb/signal.png
Binary files differ
diff --git a/advtrains/models/blender/mbb/signal.xcf b/advtrains/models/blender/mbb/signal.xcf
new file mode 100644
index 0000000..f667739
--- /dev/null
+++ b/advtrains/models/blender/mbb/signal.xcf
Binary files differ
diff --git a/advtrains/models/blender/mbb/signal2.png b/advtrains/models/blender/mbb/signal2.png
new file mode 100644
index 0000000..7af4e2d
--- /dev/null
+++ b/advtrains/models/blender/mbb/signal2.png
Binary files differ
diff --git a/advtrains/models/blender/mbb/tr-logo.png b/advtrains/models/blender/mbb/tr-logo.png
new file mode 100644
index 0000000..9bc0f10
--- /dev/null
+++ b/advtrains/models/blender/mbb/tr-logo.png
Binary files differ
diff --git a/advtrains/models/blender/mbb/weichenhebel1.blend b/advtrains/models/blender/mbb/weichenhebel1.blend
new file mode 100644
index 0000000..70b997d
--- /dev/null
+++ b/advtrains/models/blender/mbb/weichenhebel1.blend
Binary files differ
diff --git a/advtrains/models/blender/mbb/weichenhebel2.blend b/advtrains/models/blender/mbb/weichenhebel2.blend
new file mode 100644
index 0000000..c1c3aac
--- /dev/null
+++ b/advtrains/models/blender/mbb/weichenhebel2.blend
Binary files differ
diff --git a/advtrains/models/blender/newlocomotive.blend b/advtrains/models/blender/newlocomotive.blend
new file mode 100644
index 0000000..858882b
--- /dev/null
+++ b/advtrains/models/blender/newlocomotive.blend
Binary files differ
diff --git a/advtrains/models/blender/newlocomotive.blend1 b/advtrains/models/blender/newlocomotive.blend1
new file mode 100644
index 0000000..4b8b24f
--- /dev/null
+++ b/advtrains/models/blender/newlocomotive.blend1
Binary files differ
diff --git a/advtrains/models/blender/newlocomotive_uvs.png b/advtrains/models/blender/newlocomotive_uvs.png
new file mode 100644
index 0000000..879be65
--- /dev/null
+++ b/advtrains/models/blender/newlocomotive_uvs.png
Binary files differ
diff --git a/advtrains/models/blender/newwagon.blend b/advtrains/models/blender/newwagon.blend
new file mode 100644
index 0000000..1cedc55
--- /dev/null
+++ b/advtrains/models/blender/newwagon.blend
Binary files differ
diff --git a/advtrains/models/blender/newwagon.blend1 b/advtrains/models/blender/newwagon.blend1
new file mode 100644
index 0000000..eb30fde
--- /dev/null
+++ b/advtrains/models/blender/newwagon.blend1
Binary files differ
diff --git a/advtrains/models/blender/newwagon.png b/advtrains/models/blender/newwagon.png
new file mode 100644
index 0000000..812bc32
--- /dev/null
+++ b/advtrains/models/blender/newwagon.png
Binary files differ
diff --git a/advtrains/models/blender/subway-train.blend b/advtrains/models/blender/subway-train.blend
new file mode 100644
index 0000000..690d87b
--- /dev/null
+++ b/advtrains/models/blender/subway-train.blend
Binary files differ
diff --git a/advtrains/models/blender/subway-train.blend1 b/advtrains/models/blender/subway-train.blend1
new file mode 100644
index 0000000..86d1f92
--- /dev/null
+++ b/advtrains/models/blender/subway-train.blend1
Binary files differ
diff --git a/advtrains/models/blender/subway-train.png b/advtrains/models/blender/subway-train.png
new file mode 100644
index 0000000..d0b9731
--- /dev/null
+++ b/advtrains/models/blender/subway-train.png
Binary files differ
diff --git a/advtrains/models/blender/subway-train.xcf b/advtrains/models/blender/subway-train.xcf
new file mode 100644
index 0000000..775b87c
--- /dev/null
+++ b/advtrains/models/blender/subway-train.xcf
Binary files differ
diff --git a/advtrains/models/blender/trackplane.blend b/advtrains/models/blender/trackplane.blend
new file mode 100644
index 0000000..79365f7
--- /dev/null
+++ b/advtrains/models/blender/trackplane.blend
Binary files differ
diff --git a/advtrains/models/blender/trackvertical1.blend b/advtrains/models/blender/trackvertical1.blend
new file mode 100644
index 0000000..fca6742
--- /dev/null
+++ b/advtrains/models/blender/trackvertical1.blend
Binary files differ
diff --git a/advtrains/models/blender/trackvertical1.blend1 b/advtrains/models/blender/trackvertical1.blend1
new file mode 100644
index 0000000..b146b56
--- /dev/null
+++ b/advtrains/models/blender/trackvertical1.blend1
Binary files differ
diff --git a/advtrains/models/blender/trackvertical1.png b/advtrains/models/blender/trackvertical1.png
new file mode 100644
index 0000000..a998dcb
--- /dev/null
+++ b/advtrains/models/blender/trackvertical1.png
Binary files differ
diff --git a/advtrains/models/blender/trackvertical2.blend b/advtrains/models/blender/trackvertical2.blend
new file mode 100644
index 0000000..a066b84
--- /dev/null
+++ b/advtrains/models/blender/trackvertical2.blend
Binary files differ
diff --git a/advtrains/models/blender/trackvertical2.png b/advtrains/models/blender/trackvertical2.png
new file mode 100644
index 0000000..43142f9
--- /dev/null
+++ b/advtrains/models/blender/trackvertical2.png
Binary files differ
diff --git a/advtrains/models/oldmodels/locomotive.b3d b/advtrains/models/oldmodels/locomotive.b3d
new file mode 100644
index 0000000..5e16be3
--- /dev/null
+++ b/advtrains/models/oldmodels/locomotive.b3d
Binary files differ
diff --git a/advtrains/models/oldmodels/trackvertical1.b3d b/advtrains/models/oldmodels/trackvertical1.b3d
new file mode 100644
index 0000000..5620f60
--- /dev/null
+++ b/advtrains/models/oldmodels/trackvertical1.b3d
Binary files differ
diff --git a/advtrains/models/oldmodels/trackvertical2.b3d b/advtrains/models/oldmodels/trackvertical2.b3d
new file mode 100644
index 0000000..22dbb20
--- /dev/null
+++ b/advtrains/models/oldmodels/trackvertical2.b3d
Binary files differ
diff --git a/advtrains/models/trackplane.b3d b/advtrains/models/trackplane.b3d
new file mode 100644
index 0000000..b4728c3
--- /dev/null
+++ b/advtrains/models/trackplane.b3d
Binary files differ
diff --git a/advtrains/pseudoload.lua b/advtrains/pseudoload.lua
new file mode 100644
index 0000000..8511811
--- /dev/null
+++ b/advtrains/pseudoload.lua
@@ -0,0 +1,180 @@
+local print=function(t) minetest.log("action", t) minetest.chat_send_all(t) end
+
+--pseudoload.lua
+--responsible for keeping up a database of all rail nodes existant in the world, regardless of whether the mapchunk is loaded.
+
+advtrains.trackdb={}
+--trackdb[tt][y][x][z]={conn1, conn2, rely1, rely2, railheight}
+--serialization format:
+--(2byte x)(2byte y)(2byte z)(4bits conn1, 4bits conn2)[(plain rely1)|(plain rely2)|(plain railheight)]\n
+--[] may be missing if 0,0,0
+
+--load initially
+
+--[[ TODO temporary outcomment
+
+--delayed since all traintypes need to be registered
+minetest.after(0, function()
+
+for tt, _ in pairs(advtrains.all_traintypes) do
+ local pl_fpath=minetest.get_worldpath().."/advtrains_trackdb_"..tt
+ advtrains.trackdb[tt]={}
+ local file, err = io.open(pl_fpath, "r")
+ if not file then
+ local er=err or "Unknown Error"
+ print("[advtrains]Failed loading advtrains trackdb save file "..er)
+ else
+ --custom format to save memory
+ while true do
+ local xbytes=file:read(2)
+ if not xbytes or #xbytes<2 then
+ break --eof reached
+ end
+ print(xbytes)
+ local ybytes=file:read(2)
+ local zbytes=file:read(2)
+ local x=(string.byte(xbytes[1])-128)*256+(string.byte(xbytes[2]))
+ local y=(string.byte(ybytes[1])-128)*256+(string.byte(ybytes[2]))
+ local z=(string.byte(zbytes[1])-128)*256+(string.byte(zbytes[2]))
+
+ local conn1=string.byte(file:read(1))
+ local conn1=string.byte(file:read(1))
+
+ if not advtrains.trackdb[tt][y] then advtrains.trackdb[tt][y]={} end
+ if not advtrains.trackdb[tt][y][x] then advtrains.trackdb[tt][y][x]={} end
+
+ local rest=file.read("*l")
+ if rest~="" then
+ local rely1, rely2, railheight=string.match(rest, "([^|]+)|([^|]+)|([^|]+)")
+ if rely1 and rely2 and railheight then
+ advtrains.trackdb[tt][y][x][z]={
+ conn1=conn1, conn2=conn2,
+ rely1=rely1, rely2=rely2,
+ railheight=railheight
+ }
+ else
+ advtrains.trackdb[tt][y][x][z]={
+ conn1=conn1, conn2=conn2
+ }
+ end
+ else
+ advtrains.trackdb[tt][y][x][z]={
+ conn1=conn1, conn2=conn2
+ }
+ end
+ end
+ file:close()
+ end
+end
+
+--end minetest.after
+end)
+
+function advtrains.save_trackdb()
+ for tt, _ in pairs(advtrains.all_traintypes) do
+ local pl_fpath=minetest.get_worldpath().."/advtrains_trackdb_"..tt
+ local file, err = io.open(pl_fpath, "w")
+ if not file then
+ local er=err or "Unknown Error"
+ print("[advtrains]Failed saving advtrains trackdb save file "..er)
+ else
+ --custom format to save memory
+ for y,tyl in pairs(advtrains.trackdb[tt]) do
+ for x,txl in pairs(tyl) do
+ for z,rail in pairs(txl) do
+ print("write "..x.." "..y.." "..z.." "..minetest.serialize(rail))
+ file:write(string.char(math.floor(x/256)+128)..string.char((x%256)))
+ file:write(string.char(math.floor(y/256)+128)..string.char((y%256)))
+ file:write(string.char(math.floor(z/256)+128)..string.char((z%256)))
+ file:write(string.char(rail.conn1))
+ file:write(string.char(rail.conn2))
+ if (rail.rely1 and rail.rely1~=0) or (rail.rely2 and rail.rely2~=0) or (rail.railheight and rail.railheight~=0) then
+ file:write(rail.rely1.."|"..rail.rely2.."|"..rail.railheight)
+ end
+ file:write("\n")
+ end
+ end
+ end
+ file:close()
+ end
+ end
+end
+]]--end temp outcomment
+advtrains.trackdb={}
+advtrains.fpath_tdb=minetest.get_worldpath().."/advtrains_trackdb"
+local file, err = io.open(advtrains.fpath_tdb, "r")
+if not file then
+ local er=err or "Unknown Error"
+ print("[advtrains]Failed loading advtrains save file "..er)
+else
+ local tbl = minetest.deserialize(file:read("*a"))
+ if type(tbl) == "table" then
+ advtrains.trackdb=tbl
+ end
+ file:close()
+end
+function advtrains.save_trackdb()
+ local datastr = minetest.serialize(advtrains.trackdb)
+ if not datastr then
+ minetest.log("error", "[advtrains] Failed to serialize trackdb data!")
+ return
+ end
+ local file, err = io.open(advtrains.fpath_tdb, "w")
+ if err then
+ return err
+ end
+ file:write(datastr)
+ file:close()
+end
+
+--get_node with pseudoload.
+--returns:
+--true, conn1, conn2, rely1, rely2, railheight in case everything's right.
+--false if it's not a rail or the train does not drive on this rail, but it is loaded or
+--nil if the node is neither loaded nor in trackdb
+--the distraction between false and nil will be needed only in special cases.(train initpos)
+function advtrains.get_rail_info_at(pos, traintype)
+ local node=minetest.get_node_or_nil(pos)
+ if not node then
+ --try raildb
+ local rdp=vector.round(pos)
+ local dbe=(advtrains.trackdb[traintype] and advtrains.trackdb[traintype][rdp.y] and advtrains.trackdb[traintype][rdp.y][rdp.x] and advtrains.trackdb[traintype][rdp.y][rdp.x][rdp.z])
+ if dbe then
+ return true, dbe.conn1, dbe.conn2, dbe.rely1 or 0, dbe.rely2 or 0, dbe.railheight or 0
+ else
+ return nil
+ end
+ end
+ local nodename=node.name
+ if(not advtrains.is_track_and_drives_on(nodename, advtrains.all_traintypes[traintype].drives_on)) then
+ return false
+ end
+ local conn1, conn2, rely1, rely2, railheight=advtrains.get_track_connections(node.name, node.param2)
+
+ --already in trackdb?
+ local rdp=vector.round(pos)
+ if not (advtrains.trackdb[traintype] and advtrains.trackdb[traintype][rdp.y] and advtrains.trackdb[traintype][rdp.y][rdp.x] and advtrains.trackdb[traintype][rdp.y][rdp.x][rdp.z]) then--TODO is this necessary?
+ if not advtrains.trackdb[traintype] then advtrains.trackdb[traintype]={} end
+ if not advtrains.trackdb[traintype][rdp.y] then advtrains.trackdb[traintype][rdp.y]={} end
+ if not advtrains.trackdb[traintype][rdp.y][rdp.x] then advtrains.trackdb[traintype][rdp.y][rdp.x]={} end
+ advtrains.trackdb[traintype][rdp.y][rdp.x][rdp.z]={
+ conn1=conn1, conn2=conn2,
+ rely1=rely1, rely2=rely2,
+ railheight=railheight
+ }
+ end
+
+ return true, conn1, conn2, rely1, rely2, railheight
+end
+function advtrains.reset_trackdb_position(pos)
+ local rdp=vector.round(pos)
+ for tt, _ in pairs(advtrains.all_traintypes) do
+ if not advtrains.trackdb[tt] then advtrains.trackdb[tt]={} end
+ if not advtrains.trackdb[tt][rdp.y] then advtrains.trackdb[tt][rdp.y]={} end
+ if not advtrains.trackdb[tt][rdp.y][rdp.x] then advtrains.trackdb[tt][rdp.y][rdp.x]={} end
+ advtrains.trackdb[tt][rdp.y][rdp.x][rdp.z]=nil
+ advtrains.get_rail_info_at(pos, tt)--to restore it.
+ end
+end
+
+
diff --git a/advtrains/readme.txt b/advtrains/readme.txt
new file mode 100644
index 0000000..ad093bd
--- /dev/null
+++ b/advtrains/readme.txt
@@ -0,0 +1,23 @@
+
+## ADVTRAINS ## realistic trains in Minetest!
+by orwell96 and contributors(see below)
+
+For up-to-date information, visit https://forum.minetest.net/viewtopic.php?f=9&t=14726
+
+
+Manual:
+If manual.pdf is not present (which is the case when you downloaded the zip file), see https://github.com/orwell96/advtrains/blob/master/manual.pdf
+
+License of code: LGPL 2.1
+License of media: CC-BY-NC-SA 3.0
+
+Contributions:
+
+Gravel Texture : from Minetest Game
+Initial rail model/texture : DS-minetest
+Models for signals/bumpers : mbb
+Steam engine / wagon texture: mbb
+Industrial engine/wagons : mbb
+Inventory images : mbb
+Small code contributions : NaruTrey / gpcf
+Mod Description : hajo \ No newline at end of file
diff --git a/advtrains/signals.lua b/advtrains/signals.lua
new file mode 100644
index 0000000..8be65e0
--- /dev/null
+++ b/advtrains/signals.lua
@@ -0,0 +1,76 @@
+--advtrains by orwell96
+--signals.lua
+for r,f in pairs({on="off", off="on"}) do
+
+ advtrains.trackplacer.register_tracktype("advtrains:retrosignal", "")
+ advtrains.trackplacer.register_tracktype("advtrains:signal", "")
+
+ for rotid, rotation in ipairs({"", "_30", "_45", "_60"}) do
+ local crea=1
+ if rotid==1 and r=="off" then crea=0 end
+
+ minetest.register_node("advtrains:retrosignal_"..r..rotation, {
+ drawtype = "mesh",
+ paramtype="light",
+ paramtype2="facedir",
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = {-1/4, -1/2, -1/4, 1/4, 2, 1/4},
+ },
+ mesh = "advtrains_retrosignal_"..r..rotation..".b3d",
+ tiles = {"advtrains_retrosignal.png"},
+ inventory_image="advtrains_retrosignal_inv.png",
+ drop="advtrains:retrosignal_off",
+ description="Lampless Signal ("..r..rotation..")",
+ on_rightclick=switchfunc,
+ sunlight_propagates=true,
+ groups = {
+ choppy=3,
+ not_blocking_trains=1,
+ not_in_creative_inventory=crea,
+ },
+ mesecons = {effector = {
+ ["action_"..f] = function (pos, node)
+ minetest.swap_node(pos, {name = "advtrains:retrosignal_"..f..rotation, param2 = node.param2})
+ end
+ }},
+ on_rightclick=function(pos, node, clicker)
+ minetest.swap_node(pos, {name = "advtrains:retrosignal_"..f..rotation, param2 = node.param2})
+ end,
+ })
+ advtrains.trackplacer.add_worked("advtrains:retrosignal", r, rotation, nil)
+ minetest.register_node("advtrains:signal_"..r..rotation, {
+ drawtype = "mesh",
+ paramtype="light",
+ paramtype2="facedir",
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = {-1/4, -1/2, -1/4, 1/4, 2, 1/4},
+ },
+ mesh = "advtrains_signal"..rotation..".b3d",
+ tiles = {"advtrains_signal_"..r..".png"},
+ inventory_image="advtrains_signal_inv.png",
+ drop="advtrains:signal_off",
+ description="Signal ("..r..rotation..")",
+ on_rightclick=switchfunc,
+ groups = {
+ choppy=3,
+ not_blocking_trains=1,
+ not_in_creative_inventory=crea,
+ },
+ light_source = 1,
+ sunlight_propagates=true,
+ mesecons = {effector = {
+ ["action_"..f] = function (pos, node)
+ minetest.swap_node(pos, {name = "advtrains:signal_"..f..rotation, param2 = node.param2})
+ end
+ }},
+ on_rightclick=function(pos, node, clicker)
+ minetest.swap_node(pos, {name = "advtrains:signal_"..f..rotation, param2 = node.param2})
+ end,
+ })
+ advtrains.trackplacer.add_worked("advtrains:signal", r, rotation, nil)
+ end
+end
diff --git a/advtrains/textures/advtrains_couple.png b/advtrains/textures/advtrains_couple.png
new file mode 100644
index 0000000..9e997e4
--- /dev/null
+++ b/advtrains/textures/advtrains_couple.png
Binary files differ
diff --git a/advtrains/textures/advtrains_discouple.png b/advtrains/textures/advtrains_discouple.png
new file mode 100644
index 0000000..b27c4fb
--- /dev/null
+++ b/advtrains/textures/advtrains_discouple.png
Binary files differ
diff --git a/advtrains/textures/advtrains_dtrack_bumper_placer.png b/advtrains/textures/advtrains_dtrack_bumper_placer.png
new file mode 100644
index 0000000..27191fe
--- /dev/null
+++ b/advtrains/textures/advtrains_dtrack_bumper_placer.png
Binary files differ
diff --git a/advtrains/textures/advtrains_dtrack_detector_placer.png b/advtrains/textures/advtrains_dtrack_detector_placer.png
new file mode 100644
index 0000000..e6c6ad6
--- /dev/null
+++ b/advtrains/textures/advtrains_dtrack_detector_placer.png
Binary files differ
diff --git a/advtrains/textures/advtrains_dtrack_placer.png b/advtrains/textures/advtrains_dtrack_placer.png
new file mode 100644
index 0000000..c49777c
--- /dev/null
+++ b/advtrains/textures/advtrains_dtrack_placer.png
Binary files differ
diff --git a/advtrains/textures/advtrains_dtrack_rail.png b/advtrains/textures/advtrains_dtrack_rail.png
new file mode 100644
index 0000000..568e533
--- /dev/null
+++ b/advtrains/textures/advtrains_dtrack_rail.png
Binary files differ
diff --git a/advtrains/textures/advtrains_dtrack_rail_detector_on.png b/advtrains/textures/advtrains_dtrack_rail_detector_on.png
new file mode 100644
index 0000000..3ae0dac
--- /dev/null
+++ b/advtrains/textures/advtrains_dtrack_rail_detector_on.png
Binary files differ
diff --git a/advtrains/textures/advtrains_dtrack_slopeplacer.png b/advtrains/textures/advtrains_dtrack_slopeplacer.png
new file mode 100644
index 0000000..1d456b0
--- /dev/null
+++ b/advtrains/textures/advtrains_dtrack_slopeplacer.png
Binary files differ
diff --git a/advtrains/textures/advtrains_newlocomotive.xcf b/advtrains/textures/advtrains_newlocomotive.xcf
new file mode 100644
index 0000000..9ad5187
--- /dev/null
+++ b/advtrains/textures/advtrains_newlocomotive.xcf