diff options
author | Blockhead <jbis1337@hotmail.com> | 2020-08-16 02:39:58 +1000 |
---|---|---|
committer | Gabriel PĂ©rez-Cerezo <gabriel@gpcf.eu> | 2020-08-21 16:02:02 +0200 |
commit | b707f20ba20a7cd542b9ccc9c939f55a9b88400c (patch) | |
tree | e7b6b60a7edc41819dca1e2e9c43426afb60af14 /advtrains_train_track/init.lua | |
parent | b75752a3e08a02664a077892ff32e653589b9166 (diff) | |
download | advtrains-b707f20ba20a7cd542b9ccc9c939f55a9b88400c.tar.gz advtrains-b707f20ba20a7cd542b9ccc9c939f55a9b88400c.tar.bz2 advtrains-b707f20ba20a7cd542b9ccc9c939f55a9b88400c.zip |
Add two new sets of diamond crossing types
Add two new sets of diamond crossings in addition to the current set
of perpendicular crossings. Also cleans up the inside edges on the
perpendicular set models. All of these varieties have their mirror
images, which was previously a problem with the 45/90 crossing.
The naming convention for all of these rail types is this: when facing
east and param2=0, the angle and direction of the two crossing rails is
indicated. So 30l45r means 30 degrees left and 45 degrees right. The
mirror image of that would be 30r45l.
There is a recipe for each set of crossing types and the trackworker can
change geometry within types with left cick, and rotate between two 90
degree rotations with right-click. When left-clicking, the angles move
in an intuitive fashion like rotating rails.
* The perpendicular set (already existing) has rails that cross at 90
degrees.
* The 90+x set has 90 degree (straight, node aligned) rails plus a rail
intersecting that at 30, 45 or 60 degrees.
* The diagonal set has both rails not axis-aligned, for example 30r-45l,
60l60r. The latter is quite useful for scissors crossovers.
Diffstat (limited to 'advtrains_train_track/init.lua')
-rw-r--r-- | advtrains_train_track/init.lua | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/advtrains_train_track/init.lua b/advtrains_train_track/init.lua index a14335f..d6b8e52 100644 --- a/advtrains_train_track/init.lua +++ b/advtrains_train_track/init.lua @@ -41,18 +41,21 @@ minetest.register_craft({ {'', 'advtrains:dtrack_placer', ''} } }) --- 45-90( + +-- 90plusx +-- When you face east and param2=0, then this set of rails has a rail at 90 +-- degrees to the viewer, plus another rail crossing at 30, 45 or 60 degrees. advtrains.register_tracks("default", { - nodename_prefix="advtrains:dtrack_xing4590", + nodename_prefix="advtrains:dtrack_xing90plusx", texture_prefix="advtrains_dtrack_xing4590", - models_prefix="advtrains_dtrack_xing4590", + models_prefix="advtrains_dtrack_xing90plusx", models_suffix=".obj", shared_texture="advtrains_dtrack_shared.png", - description=attrans("45/90 Degree Diamond Crossing Track"), + description=attrans("90+Angle Diamond Crossing Track"), formats = {} -}, advtrains.ap.t_9045crossing) +}, advtrains.ap.t_90plusx_crossing) minetest.register_craft({ - output = 'advtrains:dtrack_xing4590_placer 2', + output = 'advtrains:dtrack_xing90plusx_placer 2', recipe = { {'advtrains:dtrack_placer', '', ''}, {'advtrains:dtrack_placer', 'advtrains:dtrack_placer', 'advtrains:dtrack_placer'}, @@ -60,6 +63,32 @@ minetest.register_craft({ } }) +-- Diagonal +-- This set of rail crossings is named based on the angle of each intersecting +-- direction when facing east and param2=0. Rails with l/r swapped are mirror +-- images. For example, 30r45l is the mirror image of 30l45r. +advtrains.register_tracks("default", { + nodename_prefix="advtrains:dtrack_xingdiag", + texture_prefix="advtrains_dtrack_xingdiag", + models_prefix="advtrains_dtrack_xingdiag", + models_suffix=".obj", + shared_texture="advtrains_dtrack_shared.png", + description=attrans("Diagonal Diamond Crossing Track"), + formats = {}, +}, advtrains.ap.t_diagonalcrossing) +minetest.register_craft({ + output = 'advtrains:dtrack_xingdiag_placer 2', + recipe = { + {'advtrains:dtrack_placer', '', 'advtrains:dtrack_placer'}, + {'', 'advtrains:dtrack_placer', ''}, + {'advtrains:dtrack_placer', '', 'advtrains:dtrack_placer'} + } +}) +---- Not included: very shallow crossings like (30/60)+45. +---- At an angle of only 18.4 degrees, the models would not +---- translate well to a block game. +-- END crossings + --slopes advtrains.register_tracks("default", { nodename_prefix="advtrains:dtrack", |