aboutsummaryrefslogtreecommitdiff
path: root/moretrains_vintage
diff options
context:
space:
mode:
Diffstat (limited to 'moretrains_vintage')
-rw-r--r--moretrains_vintage/blend/moretrains_draisine.blendbin0 -> 714760 bytes
-rw-r--r--moretrains_vintage/blend/moretrains_minecart.blendbin0 -> 706488 bytes
-rwxr-xr-xmoretrains_vintage/depends.txt2
-rw-r--r--moretrains_vintage/init.lua106
-rw-r--r--moretrains_vintage/models/moretrains_draisine.b3dbin0 -> 35329 bytes
-rw-r--r--moretrains_vintage/models/moretrains_minecart.b3dbin0 -> 32829 bytes
-rwxr-xr-xmoretrains_vintage/textures/moretrains_draisine_inv.pngbin0 -> 1505 bytes
-rwxr-xr-xmoretrains_vintage/textures/moretrains_minecart_inv.pngbin0 -> 1819 bytes
-rwxr-xr-xmoretrains_vintage/textures/moretrains_vintage.pngbin0 -> 5376 bytes
9 files changed, 108 insertions, 0 deletions
diff --git a/moretrains_vintage/blend/moretrains_draisine.blend b/moretrains_vintage/blend/moretrains_draisine.blend
new file mode 100644
index 0000000..2797662
--- /dev/null
+++ b/moretrains_vintage/blend/moretrains_draisine.blend
Binary files differ
diff --git a/moretrains_vintage/blend/moretrains_minecart.blend b/moretrains_vintage/blend/moretrains_minecart.blend
new file mode 100644
index 0000000..3ba7029
--- /dev/null
+++ b/moretrains_vintage/blend/moretrains_minecart.blend
Binary files differ
diff --git a/moretrains_vintage/depends.txt b/moretrains_vintage/depends.txt
new file mode 100755
index 0000000..f3443eb
--- /dev/null
+++ b/moretrains_vintage/depends.txt
@@ -0,0 +1,2 @@
+advtrains
+intllib?
diff --git a/moretrains_vintage/init.lua b/moretrains_vintage/init.lua
new file mode 100644
index 0000000..74d5a37
--- /dev/null
+++ b/moretrains_vintage/init.lua
@@ -0,0 +1,106 @@
+local S
+if minetest.get_modpath("intllib") then
+ S = intllib.Getter()
+else
+ S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end
+end
+
+advtrains.register_wagon("moretrains_draisine", {
+ mesh="moretrains_draisine.b3d",
+ textures = {"moretrains_vintage.png"},
+ drives_on={default=true},
+ max_speed=3,
+ seats = {
+ {
+ name=S("Driver stand"),
+ attach_offset={x=0, y=-2, z=13},
+ view_offset={x=0, y=1.5, z=0},
+ group="dstand",
+ },
+ {
+ name="1",
+ attach_offset={x=-4, y=-2, z=0},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ {
+ name="2",
+ attach_offset={x=4, y=-2, z=0},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ {
+ name="3",
+ attach_offset={x=-4, y=-2, z=-8},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ {
+ name="4",
+ attach_offset={x=4, y=-2, z=-8},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ },
+ seat_groups = {
+ dstand={
+ name = "Driver Stand",
+ access_to = {"pass"},
+ require_doors_open=true,
+ driving_ctrl_access=true,
+ },
+ pass={
+ name = "Passenger area",
+ access_to = {"dstand"},
+ require_doors_open=true,
+ },
+ },
+ assign_to_seat_group = {"dstand", "pass"},
+ visual_size = {x=1, y=1},
+ wagon_span=1.06,
+ is_locomotive=true,
+ collisionbox = {-0.8,-0.5,-0.7, 0.8,2,0.7},
+ drops={"default:wood"},
+}, S("Draisine"), "moretrains_draisine_inv.png")
+
+
+advtrains.register_wagon("moretrains_minecart", {
+ mesh="moretrains_minecart.b3d",
+ textures = {"moretrains_vintage.png"},
+ drives_on={default=true},
+ max_speed=6,
+ seats = {},
+ visual_size = {x=1, y=1},
+ wagon_span=1.06,
+ collisionbox = {-0.8,-0.5,-0.7, 0.8,2,0.7},
+ drops={"default:wood"},
+ has_inventory = true,
+ get_inventory_formspec = function(self, pname, invname)
+ return "size[8,11]"..
+ "list["..invname..";box;0,0;8,3;]"..
+ "list[current_player;main;0,5;8,4;]"..
+ "listring[]"
+ end,
+ inventory_list_sizes = {
+ box=1*4,
+ },
+}, S("Minecart"), "moretrains_minecart_inv.png")
+
+--minetest.register_craft({
+-- output = 'advtrains:moretrains_draisine',
+-- recipe = {
+-- {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
+-- {'default:glass', 'dye:green', 'default:glass'},
+-- {'advtrains:wheel', '', 'advtrains:wheel'},
+-- },
+--})
+
+--minetest.register_craft({
+-- output = 'advtrains:moretrains_minecart',
+-- recipe = {
+-- {'default:steel_ingot', 'default:steel_ingot', ''},
+-- {'default:glass', 'dye:green', 'default:glass'},
+-- {'advtrains:wheel', 'advtrains:wheel', 'advtrains:wheel'},
+-- },
+--})
+
diff --git a/moretrains_vintage/models/moretrains_draisine.b3d b/moretrains_vintage/models/moretrains_draisine.b3d
new file mode 100644
index 0000000..d1a7362
--- /dev/null
+++ b/moretrains_vintage/models/moretrains_draisine.b3d
Binary files differ
diff --git a/moretrains_vintage/models/moretrains_minecart.b3d b/moretrains_vintage/models/moretrains_minecart.b3d
new file mode 100644
index 0000000..d470ebb
--- /dev/null
+++ b/moretrains_vintage/models/moretrains_minecart.b3d
Binary files differ
diff --git a/moretrains_vintage/textures/moretrains_draisine_inv.png b/moretrains_vintage/textures/moretrains_draisine_inv.png
new file mode 100755
index 0000000..5ec3c88
--- /dev/null
+++ b/moretrains_vintage/textures/moretrains_draisine_inv.png
Binary files differ
diff --git a/moretrains_vintage/textures/moretrains_minecart_inv.png b/moretrains_vintage/textures/moretrains_minecart_inv.png
new file mode 100755
index 0000000..13b247e
--- /dev/null
+++ b/moretrains_vintage/textures/moretrains_minecart_inv.png
Binary files differ
diff --git a/moretrains_vintage/textures/moretrains_vintage.png b/moretrains_vintage/textures/moretrains_vintage.png
new file mode 100755
index 0000000..f4f80d8
--- /dev/null
+++ b/moretrains_vintage/textures/moretrains_vintage.png
Binary files differ