2017-01-23 12:29:59 -08:00
|
|
|
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
|
|
|
|
|
2016-12-22 09:55:10 -08:00
|
|
|
advtrains.register_wagon("engine_japan", {
|
2016-12-20 05:17:39 -08:00
|
|
|
mesh="advtrains_engine_japan.b3d",
|
|
|
|
textures = {"advtrains_engine_japan.png"},
|
2016-12-22 09:55:10 -08:00
|
|
|
drives_on={default=true},
|
|
|
|
max_speed=20,
|
2016-12-20 05:17:39 -08:00
|
|
|
seats = {
|
|
|
|
{
|
2017-01-23 12:29:59 -08:00
|
|
|
name=S("Driver stand"),
|
2017-01-25 12:23:54 -08:00
|
|
|
attach_offset={x=0, y=8, z=13},
|
2017-01-24 10:09:33 -08:00
|
|
|
view_offset={x=0, y=0, z=0},
|
2017-01-25 12:23:54 -08:00
|
|
|
group="dstand",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name="1",
|
|
|
|
attach_offset={x=-4, y=8, z=0},
|
|
|
|
view_offset={x=0, y=0, z=0},
|
|
|
|
group="pass",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name="2",
|
|
|
|
attach_offset={x=4, y=8, z=0},
|
|
|
|
view_offset={x=0, y=0, z=0},
|
|
|
|
group="pass",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name="3",
|
|
|
|
attach_offset={x=-4, y=8, z=-8},
|
|
|
|
view_offset={x=0, y=0, z=0},
|
|
|
|
group="pass",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name="4",
|
|
|
|
attach_offset={x=4, y=8, z=-8},
|
|
|
|
view_offset={x=0, y=0, z=0},
|
|
|
|
group="pass",
|
2016-12-20 05:17:39 -08:00
|
|
|
},
|
|
|
|
},
|
2017-01-25 12:23:54 -08:00
|
|
|
seat_groups = {
|
|
|
|
dstand={
|
|
|
|
name = "Driver Stand",
|
|
|
|
access_to = {"pass"},
|
|
|
|
require_doors_open=true,
|
2018-01-09 09:30:29 -08:00
|
|
|
driving_ctrl_access=true,
|
2017-01-25 12:23:54 -08:00
|
|
|
},
|
|
|
|
pass={
|
|
|
|
name = "Passenger area",
|
|
|
|
access_to = {"dstand"},
|
|
|
|
require_doors_open=true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
assign_to_seat_group = {"dstand", "pass"},
|
2017-01-24 10:09:33 -08:00
|
|
|
doors={
|
|
|
|
open={
|
|
|
|
[-1]={frames={x=0, y=20}, time=1},
|
|
|
|
[1]={frames={x=40, y=60}, time=1}
|
|
|
|
},
|
|
|
|
close={
|
|
|
|
[-1]={frames={x=20, y=40}, time=1},
|
|
|
|
[1]={frames={x=60, y=80}, time=1}
|
|
|
|
}
|
|
|
|
},
|
2017-02-08 15:11:28 -08:00
|
|
|
door_entry={-1},
|
2016-12-20 05:17:39 -08:00
|
|
|
visual_size = {x=1, y=1},
|
|
|
|
wagon_span=2.5,
|
|
|
|
is_locomotive=true,
|
|
|
|
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
|
|
|
|
drops={"default:steelblock 4"},
|
2017-12-06 04:23:55 -08:00
|
|
|
horn_sound = "advtrains_japan_horn",
|
2018-05-29 06:53:34 -07:00
|
|
|
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
2017-01-23 12:29:59 -08:00
|
|
|
}, S("Japanese Train Engine"), "advtrains_engine_japan_inv.png")
|
2016-12-20 05:17:39 -08:00
|
|
|
|
2016-12-22 09:55:10 -08:00
|
|
|
advtrains.register_wagon("wagon_japan", {
|
2016-12-20 05:17:39 -08:00
|
|
|
mesh="advtrains_wagon_japan.b3d",
|
|
|
|
textures = {"advtrains_wagon_japan.png"},
|
2016-12-22 09:55:10 -08:00
|
|
|
drives_on={default=true},
|
|
|
|
max_speed=20,
|
2016-12-20 05:17:39 -08:00
|
|
|
seats = {
|
|
|
|
{
|
2017-01-25 12:23:54 -08:00
|
|
|
name="1",
|
|
|
|
attach_offset={x=-4, y=8, z=8},
|
|
|
|
view_offset={x=0, y=0, z=0},
|
|
|
|
group="pass",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name="2",
|
|
|
|
attach_offset={x=4, y=8, z=8},
|
|
|
|
view_offset={x=0, y=0, z=0},
|
|
|
|
group="pass",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name="1a",
|
|
|
|
attach_offset={x=-4, y=8, z=0},
|
|
|
|
view_offset={x=0, y=0, z=0},
|
|
|
|
group="pass",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name="2a",
|
|
|
|
attach_offset={x=4, y=8, z=0},
|
2017-01-24 10:09:33 -08:00
|
|
|
view_offset={x=0, y=0, z=0},
|
2017-01-25 12:23:54 -08:00
|
|
|
group="pass",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name="3",
|
|
|
|
attach_offset={x=-4, y=8, z=-8},
|
|
|
|
view_offset={x=0, y=0, z=0},
|
|
|
|
group="pass",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name="4",
|
|
|
|
attach_offset={x=4, y=8, z=-8},
|
|
|
|
view_offset={x=0, y=0, z=0},
|
|
|
|
group="pass",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
seat_groups = {
|
|
|
|
pass={
|
|
|
|
name = "Passenger area",
|
|
|
|
access_to = {},
|
|
|
|
require_doors_open=true,
|
2017-01-24 10:09:33 -08:00
|
|
|
},
|
|
|
|
},
|
2017-01-25 12:23:54 -08:00
|
|
|
assign_to_seat_group = {"pass"},
|
2017-01-24 10:09:33 -08:00
|
|
|
doors={
|
|
|
|
open={
|
|
|
|
[-1]={frames={x=0, y=20}, time=1},
|
|
|
|
[1]={frames={x=40, y=60}, time=1}
|
2016-12-20 05:17:39 -08:00
|
|
|
},
|
2017-01-24 10:09:33 -08:00
|
|
|
close={
|
|
|
|
[-1]={frames={x=20, y=40}, time=1},
|
|
|
|
[1]={frames={x=60, y=80}, time=1}
|
|
|
|
}
|
2016-12-20 05:17:39 -08:00
|
|
|
},
|
2017-02-08 15:11:28 -08:00
|
|
|
door_entry={-1, 1},
|
2016-12-20 05:17:39 -08:00
|
|
|
visual_size = {x=1, y=1},
|
|
|
|
wagon_span=2.3,
|
|
|
|
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
|
|
|
|
drops={"default:steelblock 4"},
|
2018-05-29 06:53:34 -07:00
|
|
|
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
2017-01-23 12:29:59 -08:00
|
|
|
}, S("Japanese Train Wagon"), "advtrains_wagon_japan_inv.png")
|
2016-12-20 05:17:39 -08:00
|
|
|
|