aboutsummaryrefslogtreecommitdiff
path: root/moretrains_nightline
diff options
context:
space:
mode:
Diffstat (limited to 'moretrains_nightline')
-rw-r--r--moretrains_nightline/depends.txt4
-rw-r--r--moretrains_nightline/init.lua148
-rw-r--r--moretrains_nightline/locale/de.txt3
-rw-r--r--moretrains_nightline/mod.conf5
-rw-r--r--moretrains_nightline/models/moretrains_nightline_couchette.b3dbin0 -> 732699 bytes
-rw-r--r--moretrains_nightline/models/moretrains_nightline_seat_car.b3dbin0 -> 1144345 bytes
-rw-r--r--moretrains_nightline/textures/moretrains_nightline_couchette.pngbin0 -> 57313 bytes
-rw-r--r--moretrains_nightline/textures/moretrains_nightline_couchette_inv.pngbin0 -> 6364 bytes
-rw-r--r--moretrains_nightline/textures/moretrains_nightline_seat_car.pngbin0 -> 58142 bytes
-rw-r--r--moretrains_nightline/textures/moretrains_nightline_seat_car_inv.pngbin0 -> 6373 bytes
10 files changed, 160 insertions, 0 deletions
diff --git a/moretrains_nightline/depends.txt b/moretrains_nightline/depends.txt
new file mode 100644
index 0000000..733ed78
--- /dev/null
+++ b/moretrains_nightline/depends.txt
@@ -0,0 +1,4 @@
+advtrains
+advtrains_train_track
+intllib?
+moreores?
diff --git a/moretrains_nightline/init.lua b/moretrains_nightline/init.lua
new file mode 100644
index 0000000..6dfe26a
--- /dev/null
+++ b/moretrains_nightline/init.lua
@@ -0,0 +1,148 @@
+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
+
+local bed = 'wool:white'
+if minetest.get_modpath("beds") then
+ bed = 'beds:bed'
+end
+
+local door = 'default:steel_ingot'
+if minetest.get_modpath("doors") then
+ door = 'doors:door_steel'
+end
+
+advtrains.register_wagon("moretrains_nightline_couchette", {
+ mesh="moretrains_nightline_couchette.b3d",
+ textures = {"moretrains_nightline_couchette.png"},
+ drives_on={default=true},
+ max_speed=20,
+ seats = {
+ {
+ name="1",
+ attach_offset={x=0, y=-2, z=17},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ {
+ name="2",
+ attach_offset={x=0, y=-2, z=6},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ {
+ name="3",
+ attach_offset={x=0, y=-2, z=-6},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ {
+ name="4",
+ attach_offset={x=0, y=-2, z=-17},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ },
+ seat_groups = {
+ pass={
+ name = "Passenger area",
+ access_to = {},
+ require_doors_open=true,
+ },
+ },
+ doors={
+ open={
+ [-1]={frames={x=21, y=30}, time=1},
+ [1]={frames={x=1, y=10}, time=1}
+ },
+ close={
+ [-1]={frames={x=30, y=41}, time=1},
+ [1]={frames={x=10, y=20}, time=1}
+ }
+ },
+ door_entry={-2, 2},
+ assign_to_seat_group = {"pass"},
+ visual_size = {x=1, y=1},
+ wagon_span=3,
+ collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
+ drops={"default:steelblock"},
+}, S("Night Line Couchette Wagon"), "moretrains_nightline_couchette_inv.png")
+
+minetest.register_craft({
+ output = 'advtrains:moretrains_nightline_couchette',
+ recipe = {
+ {'default:steelblock', 'dye:blue', 'default:steelblock'},
+ {'default:glass', bed, door},
+ {'advtrains:wheel', 'default:steelblock', 'advtrains:wheel'},
+ },
+})
+
+advtrains.register_wagon("moretrains_nightline_seat_car", {
+ mesh="moretrains_nightline_seat_car.b3d",
+ textures = {"moretrains_nightline_seat_car.png"},
+ drives_on={default=true},
+ max_speed=20,
+ seats = {
+ {
+ name="1",
+ attach_offset={x=0, y=-2, z=17},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ {
+ name="2",
+ attach_offset={x=0, y=-2, z=6},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ {
+ name="3",
+ attach_offset={x=0, y=-2, z=-6},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ {
+ name="4",
+ attach_offset={x=0, y=-2, z=-17},
+ view_offset={x=0, y=-2, z=0},
+ group="pass",
+ },
+ },
+ seat_groups = {
+ pass={
+ name = "Passenger area",
+ access_to = {},
+ require_doors_open=true,
+ },
+ },
+ doors={
+ open={
+ [-1]={frames={x=21, y=30}, time=1},
+ [1]={frames={x=1, y=10}, time=1}
+ },
+ close={
+ [-1]={frames={x=30, y=41}, time=1},
+ [1]={frames={x=10, y=20}, time=1}
+ }
+ },
+ door_entry={-2, 2},
+ assign_to_seat_group = {"pass"},
+ visual_size = {x=1, y=1},
+ wagon_span=3,
+ collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
+ drops={"default:steelblock"},
+}, S("Night Line Seat Wagon"), "moretrains_nightline_seat_car_inv.png")
+
+minetest.register_craft({
+ output = 'advtrains:moretrains_nightline_seat_car',
+ recipe = {
+ {'default:steelblock', 'dye:blue', 'default:steelblock'},
+ {'default:glass', 'wool:blue', door},
+ {'advtrains:wheel', 'default:steelblock', 'advtrains:wheel'},
+ },
+})
+
+
diff --git a/moretrains_nightline/locale/de.txt b/moretrains_nightline/locale/de.txt
new file mode 100644
index 0000000..b5d1d8a
--- /dev/null
+++ b/moretrains_nightline/locale/de.txt
@@ -0,0 +1,3 @@
+Night Line Couchette Wagon=Night Line Liegewagen
+Night Line Seat Wagon=Night Line Sitzwagen
+
diff --git a/moretrains_nightline/mod.conf b/moretrains_nightline/mod.conf
new file mode 100644
index 0000000..8c67c1d
--- /dev/null
+++ b/moretrains_nightline/mod.conf
@@ -0,0 +1,5 @@
+name = moretrains_nightline
+description = Overnight passenger wagons in a fictional livery for use with the advtrains mod.
+depends = default, dye, wool, advtrains
+optional_depends = intllib, beds, doors
+min_minetest_version = 5.0
diff --git a/moretrains_nightline/models/moretrains_nightline_couchette.b3d b/moretrains_nightline/models/moretrains_nightline_couchette.b3d
new file mode 100644
index 0000000..82a4f7b
--- /dev/null
+++ b/moretrains_nightline/models/moretrains_nightline_couchette.b3d
Binary files differ
diff --git a/moretrains_nightline/models/moretrains_nightline_seat_car.b3d b/moretrains_nightline/models/moretrains_nightline_seat_car.b3d
new file mode 100644
index 0000000..8bb92cb
--- /dev/null
+++ b/moretrains_nightline/models/moretrains_nightline_seat_car.b3d
Binary files differ
diff --git a/moretrains_nightline/textures/moretrains_nightline_couchette.png b/moretrains_nightline/textures/moretrains_nightline_couchette.png
new file mode 100644
index 0000000..42d52b9
--- /dev/null
+++ b/moretrains_nightline/textures/moretrains_nightline_couchette.png
Binary files differ
diff --git a/moretrains_nightline/textures/moretrains_nightline_couchette_inv.png b/moretrains_nightline/textures/moretrains_nightline_couchette_inv.png
new file mode 100644
index 0000000..acc65cf
--- /dev/null
+++ b/moretrains_nightline/textures/moretrains_nightline_couchette_inv.png
Binary files differ
diff --git a/moretrains_nightline/textures/moretrains_nightline_seat_car.png b/moretrains_nightline/textures/moretrains_nightline_seat_car.png
new file mode 100644
index 0000000..0a36118
--- /dev/null
+++ b/moretrains_nightline/textures/moretrains_nightline_seat_car.png
Binary files differ
diff --git a/moretrains_nightline/textures/moretrains_nightline_seat_car_inv.png b/moretrains_nightline/textures/moretrains_nightline_seat_car_inv.png
new file mode 100644
index 0000000..edaa26a
--- /dev/null
+++ b/moretrains_nightline/textures/moretrains_nightline_seat_car_inv.png
Binary files differ