diff options
18 files changed, 75 insertions, 1 deletions
diff --git a/models/advtrains_dtrack_bumper.b3d b/models/advtrains_dtrack_bumper.b3d Binary files differnew file mode 100644 index 0000000..a6d9745 --- /dev/null +++ b/models/advtrains_dtrack_bumper.b3d diff --git a/models/advtrains_dtrack_bumper_30.b3d b/models/advtrains_dtrack_bumper_30.b3d Binary files differnew file mode 100644 index 0000000..5f5b3f4 --- /dev/null +++ b/models/advtrains_dtrack_bumper_30.b3d diff --git a/models/advtrains_dtrack_bumper_45.b3d b/models/advtrains_dtrack_bumper_45.b3d Binary files differnew file mode 100644 index 0000000..f13ae75 --- /dev/null +++ b/models/advtrains_dtrack_bumper_45.b3d diff --git a/models/advtrains_dtrack_bumper_60.b3d b/models/advtrains_dtrack_bumper_60.b3d Binary files differnew file mode 100644 index 0000000..59a2285 --- /dev/null +++ b/models/advtrains_dtrack_bumper_60.b3d diff --git a/models/blender/mbb/modern_locomotive.blend b/models/blender/mbb/modern_locomotive.blend Binary files differnew file mode 100644 index 0000000..8e72233 --- /dev/null +++ b/models/blender/mbb/modern_locomotive.blend diff --git a/models/blender/mbb/modern_wagong.blend b/models/blender/mbb/modern_wagong.blend Binary files differnew file mode 100644 index 0000000..d85e841 --- /dev/null +++ b/models/blender/mbb/modern_wagong.blend diff --git a/models/blender/mbb/prellbock.blend b/models/blender/mbb/prellbock.blend Binary files differnew file mode 100644 index 0000000..1c20ab2 --- /dev/null +++ b/models/blender/mbb/prellbock.blend diff --git a/models/blender/mbb/prellbock.blend1 b/models/blender/mbb/prellbock.blend1 Binary files differnew file mode 100644 index 0000000..981538e --- /dev/null +++ b/models/blender/mbb/prellbock.blend1 diff --git a/models/blender/mbb/prellbock.uv.png b/models/blender/mbb/prellbock.uv.png Binary files differnew file mode 100644 index 0000000..7730753 --- /dev/null +++ b/models/blender/mbb/prellbock.uv.png diff --git a/models/blender/mbb/regio-lokomotive.blend b/models/blender/mbb/regio-lokomotive.blend Binary files differnew file mode 100644 index 0000000..210e60e --- /dev/null +++ b/models/blender/mbb/regio-lokomotive.blend diff --git a/models/blender/mbb/regio-waron.blend b/models/blender/mbb/regio-waron.blend Binary files differnew file mode 100644 index 0000000..19b07ce --- /dev/null +++ b/models/blender/mbb/regio-waron.blend diff --git a/models/blender/mbb/signal(2)_hoch.blend b/models/blender/mbb/signal(2)_hoch.blend Binary files differnew file mode 100644 index 0000000..70391f6 --- /dev/null +++ b/models/blender/mbb/signal(2)_hoch.blend diff --git a/models/blender/mbb/signal(2)_unten.blend b/models/blender/mbb/signal(2)_unten.blend Binary files differnew file mode 100644 index 0000000..4e917bc --- /dev/null +++ b/models/blender/mbb/signal(2)_unten.blend diff --git a/models/blender/mbb/signal.blend b/models/blender/mbb/signal.blend Binary files differnew file mode 100644 index 0000000..ae49ab6 --- /dev/null +++ b/models/blender/mbb/signal.blend diff --git a/models/blender/mbb/weichenhebel1.blend b/models/blender/mbb/weichenhebel1.blend Binary files differnew file mode 100644 index 0000000..70b997d --- /dev/null +++ b/models/blender/mbb/weichenhebel1.blend diff --git a/models/blender/mbb/weichenhebel2.blend b/models/blender/mbb/weichenhebel2.blend Binary files differnew file mode 100644 index 0000000..c1c3aac --- /dev/null +++ b/models/blender/mbb/weichenhebel2.blend diff --git a/textures/advtrains_dtrack_rail.png b/textures/advtrains_dtrack_rail.png Binary files differindex 8478cf6..5fb0c67 100644 --- a/textures/advtrains_dtrack_rail.png +++ b/textures/advtrains_dtrack_rail.png @@ -81,7 +81,7 @@ local t_30deg={ ["swlst"]="swrst",
},
rotation={"", "_30", "_45", "_60"},
- increativeinv={vst1=true, vst2=true}
+ increativeinv={vst1=true, vst2=true},
}
local t_45deg={
regstep=2,
@@ -305,6 +305,80 @@ advtrains.register_tracks("default", { formats={vst1={true}, vst2={true}},
}, t_30deg)
+--bumpers. temporary registration. later: integrate to register_tracks.
+function advtrains.register_bumpers(tracktype, def, preset)
+ local common_def=advtrains.merge_tables({
+ description = def.description,
+ drawtype = "mesh",
+ paramtype="light",
+ paramtype2="facedir",
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
+ },
+ rely1=0,
+ rely2=0,
+ railheight=0,
+ drop="advtrains:placetrack_"..tracktype,
+ can_dig=function(pos)
+ return not advtrains.is_train_at_pos(pos)
+ end,
+ after_dig_node=function(pos)
+ advtrains.invalidate_all_paths()
+ advtrains.reset_trackdb_position(pos)
+ end,
+ after_place_node=function(pos)
+ advtrains.reset_trackdb_position(pos)
+ end,
+ }, def.common or {})
+ local function cycle_conns(conns, rotid)
+ local add=(rotid-1)*preset.regstep
+ return {
+ conn1=(conns.conn1+add)%16,
+ conn2=(conns.conn2+add)%16,
+ rely1=conns.rely1 or 0,
+ rely2=conns.rely2 or 0,
+ railheight=conns.railheight or 0,
+ }
+ end
+ for rotid, rotation in ipairs(preset.rotation) do
+ local img_suffix="bumper"..rotation
+ minetest.register_node(def.nodename_prefix.."_".."bumper"..rotation, advtrains.merge_tables(
+ common_def,
+ {
+ mesh = def.shared_model or (def.models_prefix.."_"..img_suffix..def.models_suffix),
+ tiles = {def.shared_texture or (def.texture_prefix.."_"..img_suffix..".png")},
+ --inventory_image = def.texture_prefix.."_"..img_suffix..".png",
+ --wield_image = def.texture_prefix.."_"..img_suffix..".png",
+ description=def.description.."(".."bumper"..rotation..")",
+ on_rightclick=switchfunc,
+ groups = {
+ attached_node=1,
+ --["advtrains_track_"..tracktype]=1, not a rail...
+ dig_immediate=2,
+ },
+ }
+ ))
+
+ advtrains.trackplacer.add_single_conn(def.nodename_prefix, "bumper", rotation, cycle_conns({conn1=0, conn2=8}, rotid))
+ advtrains.trackplacer.add_worked(def.nodename_prefix, "bumper", rotation, preset.trackworker[suffix])
+ end
+end
+
+advtrains.register_bumpers("default", {
+ nodename_prefix="advtrains:dtrack",
+ texture_prefix="advtrains_dtrack",
+ models_prefix="advtrains_dtrack",
+ models_suffix=".b3d",
+ shared_texture="advtrains_dtrack_rail.png",
+ description="New Default Train Track",
+ formats={vst1={true}, vst2={true}},
+}, t_30deg)
+
+
+
+
--TODO legacy
--I know lbms are better for this purpose
for name,rep in pairs({swl_st="swlst", swr_st="swrst", swl_cr="swlcr", swr_cr="swrcr", }) do
|