diff options
25 files changed, 74 insertions, 22 deletions
diff --git a/models/advtrains_engine_industrial.b3d b/models/advtrains_engine_industrial.b3d Binary files differnew file mode 100644 index 0000000..071da18 --- /dev/null +++ b/models/advtrains_engine_industrial.b3d diff --git a/models/advtrains_engine_japan.b3d b/models/advtrains_engine_japan.b3d Binary files differindex 5b97349..a925b42 100644 --- a/models/advtrains_engine_japan.b3d +++ b/models/advtrains_engine_japan.b3d diff --git a/models/wagon.b3d b/models/advtrains_wagon.b3d Binary files differindex 5c8214c..5c8214c 100644 --- a/models/wagon.b3d +++ b/models/advtrains_wagon.b3d diff --git a/models/advtrains_wagon_japan.b3d b/models/advtrains_wagon_japan.b3d Binary files differindex 9e5ac52..7970438 100644 --- a/models/advtrains_wagon_japan.b3d +++ b/models/advtrains_wagon_japan.b3d diff --git a/models/advtrains_wagon_tank.b3d b/models/advtrains_wagon_tank.b3d Binary files differnew file mode 100644 index 0000000..af2604b --- /dev/null +++ b/models/advtrains_wagon_tank.b3d diff --git a/models/advtrains_wagon_wood.b3d b/models/advtrains_wagon_wood.b3d Binary files differnew file mode 100644 index 0000000..0e7fb4b --- /dev/null +++ b/models/advtrains_wagon_wood.b3d diff --git a/models/blender/industrial/industry_loc.blend b/models/blender/industrial/industry_loc.blend Binary files differnew file mode 100644 index 0000000..af54c3f --- /dev/null +++ b/models/blender/industrial/industry_loc.blend diff --git a/models/blender/industrial/industry_loc.blend1 b/models/blender/industrial/industry_loc.blend1 Binary files differnew file mode 100644 index 0000000..a694c88 --- /dev/null +++ b/models/blender/industrial/industry_loc.blend1 diff --git a/models/blender/industrial/industry_loc.blend11 b/models/blender/industrial/industry_loc.blend11 Binary files differnew file mode 100644 index 0000000..a089a65 --- /dev/null +++ b/models/blender/industrial/industry_loc.blend11 diff --git a/models/blender/industrial/industry_oil_ wagong.blend b/models/blender/industrial/industry_oil_ wagong.blend Binary files differnew file mode 100644 index 0000000..30bde51 --- /dev/null +++ b/models/blender/industrial/industry_oil_ wagong.blend diff --git a/models/blender/industrial/industry_oil_ wagong.blend1 b/models/blender/industrial/industry_oil_ wagong.blend1 Binary files differnew file mode 100644 index 0000000..849971d --- /dev/null +++ b/models/blender/industrial/industry_oil_ wagong.blend1 diff --git a/models/blender/industrial/industry_tree_wagong.blend b/models/blender/industrial/industry_tree_wagong.blend Binary files differnew file mode 100644 index 0000000..23de208 --- /dev/null +++ b/models/blender/industrial/industry_tree_wagong.blend diff --git a/models/blender/industrial/industry_tree_wagong.blend1 b/models/blender/industrial/industry_tree_wagong.blend1 Binary files differnew file mode 100644 index 0000000..bf2c9ed --- /dev/null +++ b/models/blender/industrial/industry_tree_wagong.blend1 diff --git a/models/blender/industrial/industry_tree_wagong.png b/models/blender/industrial/industry_tree_wagong.png Binary files differnew file mode 100644 index 0000000..87109dd --- /dev/null +++ b/models/blender/industrial/industry_tree_wagong.png diff --git a/models/blender/mbb/modern_japanlocomotive.blend b/models/blender/mbb/modern_japanlocomotive.blend Binary files differindex f0b2714..a2e745d 100644 --- a/models/blender/mbb/modern_japanlocomotive.blend +++ b/models/blender/mbb/modern_japanlocomotive.blend diff --git a/models/blender/mbb/modern_japanlocomotive.blend1 b/models/blender/mbb/modern_japanlocomotive.blend1 Binary files differindex 4f75626..f0b2714 100644 --- a/models/blender/mbb/modern_japanlocomotive.blend1 +++ b/models/blender/mbb/modern_japanlocomotive.blend1 diff --git a/textures/advtrains_engine_industrial.png b/textures/advtrains_engine_industrial.png Binary files differnew file mode 100644 index 0000000..38a872f --- /dev/null +++ b/textures/advtrains_engine_industrial.png diff --git a/textures/advtrains_engine_industrial_inv.png b/textures/advtrains_engine_industrial_inv.png Binary files differnew file mode 100644 index 0000000..be4e80f --- /dev/null +++ b/textures/advtrains_engine_industrial_inv.png diff --git a/textures/advtrains_wagon_box_inv.png b/textures/advtrains_wagon_box_inv.png Binary files differnew file mode 100644 index 0000000..480f245 --- /dev/null +++ b/textures/advtrains_wagon_box_inv.png diff --git a/textures/advtrains_wagon_tank.png b/textures/advtrains_wagon_tank.png Binary files differnew file mode 100644 index 0000000..79b1316 --- /dev/null +++ b/textures/advtrains_wagon_tank.png diff --git a/textures/advtrains_wagon_tank_inv.png b/textures/advtrains_wagon_tank_inv.png Binary files differnew file mode 100644 index 0000000..03401be --- /dev/null +++ b/textures/advtrains_wagon_tank_inv.png diff --git a/textures/advtrains_wagon_wood.png b/textures/advtrains_wagon_wood.png Binary files differnew file mode 100644 index 0000000..acc6f72 --- /dev/null +++ b/textures/advtrains_wagon_wood.png diff --git a/textures/advtrains_wagon_wood_inv.png b/textures/advtrains_wagon_wood_inv.png Binary files differnew file mode 100644 index 0000000..87109dd --- /dev/null +++ b/textures/advtrains_wagon_wood_inv.png diff --git a/trainlogic.lua b/trainlogic.lua index 5db366e..37d7b86 100644 --- a/trainlogic.lua +++ b/trainlogic.lua @@ -325,11 +325,12 @@ function advtrains.train_step(id, train, dtime) end --move + --TODO 3,5 + 0.7 train.index=train.index and train.index+((train.velocity/(train.path_dist[math.floor(train.index)] or 1))*dtime) or 0 end ---the 'leader' concept has been overthrown, we won't rely on MT's "buggy object management" + --structure of train table: --[[ trains={ @@ -501,6 +502,7 @@ function advtrains.add_wagon_to_train(wagon, train_id, index) --this is not the usual case!!! --we may set initialized because the wagon has no chance to step() wagon.initialized=true + --TODO is this art or can we throw it away? advtrains.update_trainpart_properties(train_id) end function advtrains.update_trainpart_properties(train_id, invert_flipstate) @@ -788,6 +790,10 @@ end local nonblocknodes={ "default:fence_wood", + "default:fence_acacia_wood", + "default:fence_aspen_wood", + "default:fence_pine_wood", + "default:fence_junglewood", "default:torch", "default:sign_wall", @@ -625,7 +625,7 @@ advtrains.register_wagon("newlocomotive", "steam",{ drops={"default:steelblock 4"},
}, "Steam Engine", "advtrains_newlocomotive_inv.png")
advtrains.register_wagon("wagon_default", "steam",{
- mesh="wagon.b3d",
+ mesh="advtrains_wagon.b3d",
textures = {"advtrains_wagon.png"},
seats = {
{
@@ -640,7 +640,7 @@ advtrains.register_wagon("wagon_default", "steam",{ drops={"default:steelblock 4"},
}, "Passenger Wagon", "advtrains_wagon_inv.png")
advtrains.register_wagon("wagon_box", "steam",{
- mesh="wagon.b3d",
+ mesh="advtrains_wagon.b3d",
textures = {"advtrains_wagon_box.png"},
seats = {},
visual_size = {x=1, y=1},
@@ -657,7 +657,7 @@ advtrains.register_wagon("wagon_box", "steam",{ inventory_list_sizes = {
box=8*6,
},
-}, "Box Wagon", "advtrains_wagon_inv.png")
+}, "Box Wagon", "advtrains_wagon_box_inv.png")
advtrains.register_train_type("electric", {"regular", "default"}, 20)
@@ -673,7 +673,7 @@ advtrains.register_wagon("engine_japan", "electric",{ },
},
visual_size = {x=1, y=1},
- wagon_span=2,
+ wagon_span=2.4,
is_locomotive=true,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
drops={"default:steelblock 4"},
@@ -690,11 +690,72 @@ advtrains.register_wagon("wagon_japan", "electric",{ },
},
visual_size = {x=1, y=1},
- wagon_span=2,
+ wagon_span=2.4,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
drops={"default:steelblock 4"},
}, "Japanese Train Wagon", "blue.png")
+advtrains.register_wagon("engine_industrial", "electric",{
+ mesh="advtrains_engine_industrial.b3d",
+ textures = {"advtrains_engine_industrial.png"},
+ seats = {
+ {
+ name="Driver Stand (left)",
+ attach_offset={x=-5, y=10, z=-10},
+ view_offset={x=0, y=10, z=0},
+ driving_ctrl_access=true,
+ },
+ {
+ name="Driver Stand (right)",
+ attach_offset={x=5, y=10, z=-10},
+ view_offset={x=0, y=10, z=0},
+ driving_ctrl_access=true,
+ },
+ },
+ visual_size = {x=1, y=1},
+ wagon_span=2.6,
+ is_locomotive=true,
+ collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
+ drops={"default:steelblock 4"},
+}, "Industrial Train Engine", "advtrains_engine_industrial_inv.png")
+advtrains.register_wagon("wagon_tank", "electric",{
+ mesh="advtrains_wagon_tank.b3d",
+ textures = {"advtrains_wagon_tank.png"},
+ seats = {},
+ visual_size = {x=1, y=1},
+ wagon_span=1.8,
+ collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
+ drops={"default:steelblock 4"},
+ has_inventory = true,
+ get_inventory_formspec = function(self)
+ return "size[8,11]"..
+ "list[detached:advtrains_wgn_"..self.unique_id..";box;0,0;8,6;]"..
+ "list[current_player;main;0,7;8,4;]"..
+ "listring[]"
+ end,
+ inventory_list_sizes = {
+ box=8*6,
+ },
+}, "Industrial tank wagon", "advtrains_wagon_tank_inv.png")
+advtrains.register_wagon("wagon_wood", "electric",{
+ mesh="advtrains_wagon_wood.b3d",
+ textures = {"advtrains_wagon_wood.png"},
+ seats = {},
+ visual_size = {x=1, y=1},
+ wagon_span=1.8,
+ collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
+ drops={"default:steelblock 4"},
+ has_inventory = true,
+ get_inventory_formspec = function(self)
+ return "size[8,11]"..
+ "list[detached:advtrains_wgn_"..self.unique_id..";box;0,0;8,6;]"..
+ "list[current_player;main;0,7;8,4;]"..
+ "listring[]"
+ end,
+ inventory_list_sizes = {
+ box=8*6,
+ },
+}, "Industrial wood wagon", "advtrains_wagon_wood_inv.png")
advtrains.register_train_type("subway", {"default"}, 15)
@@ -715,21 +776,6 @@ advtrains.register_wagon("subway_wagon", "subway",{ is_locomotive=true,
drops={"default:steelblock 4"},
}, "Subway Passenger Wagon", "advtrains_subway_train_inv.png")
---[[
-advtrains.register_wagon("wagontype1",{on_rightclick=function(self, clicker)
- if clicker:get_player_control().sneak then
- advtrains.disconnect_train_before_wagon(self)
- return
- end
- --just debugging. look for first active wagon and attach to it.
- for _,v in pairs(minetest.luaentities) do
- if v.is_wagon and v.unique_id and v.unique_id~=self.unique_id then
- self.train_id=v.unique_id
- end
- end
- if not self.train_id then minetest.chat_send_all("not found") return end
- minetest.chat_send_all(self.train_id.." found and attached.")
-end})
-]]
+
|