develop #35

Merged
milan merged 16 commits from develop into master 2021-07-24 12:49:35 +02:00
88 changed files with 749 additions and 0 deletions
Showing only changes of commit a3bffa52a8 - Show all commits

View file

@ -132,6 +132,7 @@ git clone --depth 1 --branch master https://notabug.org/NetherEran/hot_air_ballo
git clone --branch master https://cheapiesystems.com/git/prefab_redo git clone --branch master https://cheapiesystems.com/git/prefab_redo
git clone --branch master https://cheapiesystems.com/git/mail git clone --branch master https://cheapiesystems.com/git/mail
git clone --branch master https://gitlab.com/VanessaE/home_workshop_modpack.git git clone --branch master https://gitlab.com/VanessaE/home_workshop_modpack.git
git clone --branch master https://git.bananach.space/basic_trains.git
#Clean git stuff #Clean git stuff
rm -rf $(find . -name .git*) rm -rf $(find . -name .git*)

View file

@ -268,3 +268,7 @@ load_mod_home_workshop_common = true
load_mod_home_workshop_misc = true load_mod_home_workshop_misc = true
load_mod_computers = true load_mod_computers = true
load_mod_advtrains_assets = true load_mod_advtrains_assets = true
load_mod_advtrains_train_subway = true
load_mod_advtrains_train_japan = true
load_mod_advtrains_train_industrial = true
load_mod_advtrains_train_steam = true

View file

@ -0,0 +1,149 @@
local S = attrans
advtrains.register_wagon("engine_industrial", {
mesh="advtrains_engine_industrial.b3d",
textures = {"advtrains_engine_industrial.png"},
drives_on={default=true},
max_speed=20,
seats = {
{
name=S("Driver Stand (right)"),
attach_offset={x=5, y=-3, z=-8},
view_offset={x=5.2, y=-4, z=0},
driving_ctrl_access=true,
group = "dstand",
},
{
name=S("Driver Stand (left)"),
attach_offset={x=5, y=7, z=-8},
view_offset={x=-5.2, y=-4, z=0},
driving_ctrl_access=true,
group = "dstand",
},
},
seat_groups = {
dstand={
name = "Driver Stand",
access_to = {},
driving_ctrl_access = true,
},
},
assign_to_seat_group = {"dstand"},
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"},
horn_sound = "advtrains_industrial_horn",
}, S("Industrial Train Engine"), "advtrains_engine_industrial_inv.png")
--big--
advtrains.register_wagon("engine_industrial_big", {
mesh="advtrains_engine_industrial_big.b3d",
textures = {"advtrains_engine_industrial_big.png"},
drives_on={default=true},
max_speed=30,
seats = {
{
name=S("Driver Stand (right)"),
attach_offset={x=5, y=7, z=20},
view_offset={x=5.2, y=-4, z=11},
driving_ctrl_access=true,
group = "dstand",
},
{
name=S("Driver Stand (left)"),
attach_offset={x=5, y=-3, z=-8},
view_offset={x=-5.2, y=-4, z=0},
driving_ctrl_access=true,
group = "dstand",
},
},
seat_groups = {
dstand={
name = "Driver Stand",
access_to = {},
driving_ctrl_access = true,
},
},
assign_to_seat_group = {"dstand"},
visual_size = {x=1, y=1},
wagon_span=4,
is_locomotive=true,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
drops={"default:steelblock 4"},
horn_sound = "advtrains_industrial_horn",
}, S("Big Industrial Train Engine"), "advtrains_engine_industrial_inv.png")
advtrains.register_wagon("wagon_tank", {
mesh="advtrains_wagon_tank.b3d",
textures = {"advtrains_wagon_tank.png"},
seats = {},
drives_on={default=true},
max_speed=20,
visual_size = {x=1, y=1},
wagon_span=2.2,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
drops={"default:steelblock 4"},
has_inventory = true,
get_inventory_formspec = advtrains.standard_inventory_formspec,
inventory_list_sizes = {
box=8*3,
},
}, S("Industrial tank wagon"), "advtrains_wagon_tank_inv.png")
advtrains.register_wagon("wagon_wood", {
mesh="advtrains_wagon_wood.b3d",
textures = {"advtrains_wagon_wood.png"},
seats = {},
drives_on={default=true},
max_speed=20,
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 = advtrains.standard_inventory_formspec,
inventory_list_sizes = {
box=8*3,
},
}, S("Industrial wood wagon"), "advtrains_wagon_wood_inv.png")
-- Craftings
minetest.register_craft({
output = 'advtrains:engine_industrial',
recipe = {
{'default:steelblock', 'default:steelblock', 'default:steelblock'},
{'advtrains:driver_cab', 'default:steelblock', 'default:steelblock'},
{'advtrains:wheel', '', 'advtrains:wheel'},
},
})
--Engine Industrial Big
minetest.register_craft({
output = 'advtrains:engine_industrial_big',
recipe = {
{'default:glass', 'default:steelblock', 'default:steelblock'},
{'advtrains:driver_cab', 'default:steelblock', 'default:steelblock'},
{'advtrains:wheel', 'advtrains:wheel', 'advtrains:wheel'},
},
})
--Industrial tank wagon
minetest.register_craft({
output = 'advtrains:wagon_tank',
recipe = {
{'default:steelblock', 'default:steel_ingot', 'default:steelblock'},
{'advtrains:steelblock', '', 'default:steelblock'},
{'advtrains:wheel', 'default:steelblock', 'advtrains:wheel'},
},
})
--Industrial wood wagon
minetest.register_craft({
output = 'advtrains:wagon_wood',
recipe = {
{'default:steel_ingot', '', 'default:steel_ingot'},
{'advtrains:steelblock', 'default:steelblock', 'default:steelblock'},
{'advtrains:wheel', '', 'advtrains:wheel'},
},
})

View file

@ -0,0 +1,6 @@
name=advtrains_train_industrial
title=Advtrains Industrial Train (Basic Trains)
description=Industrial train set for Advanced Trains
author=orwell96
depends=advtrains,advtrains_train_track

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

View file

@ -0,0 +1,162 @@
local S = attrans
advtrains.register_wagon("engine_japan", {
mesh="advtrains_engine_japan.b3d",
textures = {"advtrains_engine_japan.png"},
drives_on={default=true},
max_speed=20,
seats = {
{
name=S("Driver stand"),
attach_offset={x=0, y=-2, z=13},
view_offset={x=0, y=0, z=0},
group="dstand",
},
{
name="1",
attach_offset={x=-4, y=-2, z=0},
view_offset={x=0, y=0, z=0},
group="pass",
},
{
name="2",
attach_offset={x=4, y=-2, z=0},
view_offset={x=0, y=0, z=0},
group="pass",
},
{
name="3",
attach_offset={x=-4, y=-2, z=-8},
view_offset={x=0, y=0, z=0},
group="pass",
},
{
name="4",
attach_offset={x=4, y=-2, z=-8},
view_offset={x=0, y=0, 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"},
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}
}
},
door_entry={-1.7},
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"},
horn_sound = "advtrains_japan_horn",
}, S("Japanese Train Engine"), "advtrains_engine_japan_inv.png")
advtrains.register_wagon("wagon_japan", {
mesh="advtrains_wagon_japan.b3d",
textures = {"advtrains_wagon_japan.png"},
drives_on={default=true},
max_speed=20,
seats = {
{
name="1",
attach_offset={x=-4, y=-2, z=8},
view_offset={x=0, y=0, z=0},
group="pass",
},
{
name="2",
attach_offset={x=4, y=-2, z=8},
view_offset={x=0, y=0, z=0},
group="pass",
},
{
name="1a",
attach_offset={x=-4, y=-2, z=0},
view_offset={x=0, y=0, z=0},
group="pass",
},
{
name="2a",
attach_offset={x=4, y=-2, z=0},
view_offset={x=0, y=0, z=0},
group="pass",
},
{
name="3",
attach_offset={x=-4, y=-2, 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,
},
},
assign_to_seat_group = {"pass"},
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}
}
},
door_entry={-1.7, 1.7},
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"},
}, S("Japanese Train Wagon"), "advtrains_wagon_japan_inv.png")
-- Crafting
minetest.register_craft({
output = 'advtrains:engine_japan',
recipe = {
{'default:steelblock', 'default:steelblock', ''},
{'xpanes:pane_flat', 'default:steelblock', 'xpanes:pane_flat'},
{'advtrains:wheel', 'advtrains:wheel', 'advtrains:wheel'},
},
})
minetest.register_craft({
output = 'advtrains:wagon_japan',
recipe = {
{'default:steelblock', 'default:steelblock', 'default:steelblock'},
{'xpanes:pane_flat', 'default:steelblock', 'xpanes:pane_flat'},
{'advtrains:wheel', '', 'advtrains:wheel'},
},
})

View file

@ -0,0 +1,6 @@
name=advtrains_train_japan
title=Advtrains Japanese Train (Basic Trains)
description=Japanese train set for Advanced Trains
author=orwell96
depends=advtrains,advtrains_train_track

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

View file

@ -0,0 +1,253 @@
local S = attrans
-- length of the steam engine loop sound
local SND_LOOP_LEN = 5
advtrains.register_wagon("newlocomotive", {
mesh="advtrains_engine_steam.b3d",
textures = {"advtrains_engine_steam.png"},
is_locomotive=true,
drives_on={default=true},
max_speed=10,
seats = {
{
name=S("Driver Stand (left)"),
attach_offset={x=-5, y=0, z=-10},
view_offset={x=0, y=6, z=0},
group = "dstand",
},
{
name=S("Driver Stand (right)"),
attach_offset={x=5, y=0, z=-10},
view_offset={x=0, y=6, z=0},
group = "dstand",
},
},
seat_groups = {
dstand={
name = "Driver Stand",
driving_ctrl_access=true,
access_to = {},
},
},
assign_to_seat_group = {"dstand"},
visual_size = {x=1, y=1},
wagon_span=2.3,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
custom_on_velocity_change=function(self, velocity)
if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
self.object:set_animation({x=1,y=80}, advtrains.abs_ceil(velocity)*15, 0, true)
self.old_anim_velocity=advtrains.abs_ceil(velocity)
end
end,
custom_on_activate = function(self, staticdata_table, dtime_s)
minetest.add_particlespawner({
amount = 10,
time = 0,
-- ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
minpos = {x=0, y=2, z=1.2},
maxpos = {x=0, y=2, z=1.2},
minvel = {x=-0.2, y=1.8, z=-0.2},
maxvel = {x=0.2, y=2, z=0.2},
minacc = {x=0, y=-0.1, z=0},
maxacc = {x=0, y=-0.3, z=0},
minexptime = 2,
maxexptime = 4,
minsize = 1,
maxsize = 5,
-- ^ The particle's properties are random values in between the bounds:
-- ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
-- ^ minsize/maxsize, minexptime/maxexptime (expirationtime)
collisiondetection = true,
-- ^ collisiondetection: if true uses collision detection
vertical = false,
-- ^ vertical: if true faces player using y axis only
texture = "smoke_puff.png",
-- ^ Uses texture (string)
attached = self.object,
})
end,
drops={"default:steelblock 1"},
horn_sound = "advtrains_steam_whistle",
}, S("Steam Engine"), "advtrains_engine_steam_inv.png")
advtrains.register_wagon("detailed_steam_engine", {
mesh="advtrains_detailed_steam_engine.b3d",
textures = {"advtrains_detailed_steam_engine.png"},
is_locomotive=true,
drives_on={default=true},
max_speed=10,
seats = {
{
name=S("Driver Stand (left)"),
attach_offset={x=-5, y=10, z=-10},
view_offset={x=9, y=-2, z=-6},
group = "dstand",
},
{
name=S("Driver Stand (right)"),
attach_offset={x=5, y=10, z=-10},
view_offset={x=0, y=6, z=0},
group = "dstand",
},
},
seat_groups = {
dstand={
name = "Driver Stand",
driving_ctrl_access=true,
access_to = {},
},
},
assign_to_seat_group = {"dstand"},
visual_size = {x=1, y=1},
wagon_span=2.05,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
custom_on_velocity_change=function(self, velocity)
if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
self.object:set_animation({x=1,y=80}, advtrains.abs_ceil(velocity)*15, 0, true)
self.old_anim_velocity=advtrains.abs_ceil(velocity)
end
end,
custom_on_step=function(self, dtime)
if self:train().velocity > 0 then -- First make sure that the train isn't standing
if not self.sound_loop_tmr or self.sound_loop_tmr <= 0 then
-- start the sound if it was never started or has expired
self.sound_loop_handle = minetest.sound_play({name="advtrains_steam_loop", gain=2}, {object=self.object})
self.sound_loop_tmr = SND_LOOP_LEN
end
--decrease the sound timer
self.sound_loop_tmr = self.sound_loop_tmr - dtime
else
-- If the train is standing, the sound will be stopped in some time. We do not need to interfere with it.
self.sound_loop_tmr = nil
end
end,
custom_on_activate = function(self, staticdata_table, dtime_s)
minetest.add_particlespawner({
amount = 10,
time = 0,
-- ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
minpos = {x=0, y=2.3, z=1.45},
maxpos = {x=0, y=2.3, z=1.4},
minvel = {x=-0.2, y=1.8, z=-0.2},
maxvel = {x=0.2, y=2, z=0.2},
minacc = {x=0, y=-0.1, z=0},
maxacc = {x=0, y=-0.3, z=0},
minexptime = 2,
maxexptime = 4,
minsize = 1,
maxsize = 5,
-- ^ The particle's properties are random values in between the bounds:
-- ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
-- ^ minsize/maxsize, minexptime/maxexptime (expirationtime)
collisiondetection = true,
-- ^ collisiondetection: if true uses collision detection
vertical = false,
-- ^ vertical: if true faces player using y axis only
texture = "smoke_puff.png",
-- ^ Uses texture (string)
attached = self.object,
})
end,
drops={"default:steelblock 1"},
horn_sound = "advtrains_steam_whistle",
}, S("Detailed Steam Engine"), "advtrains_detailed_engine_steam_inv.png")
advtrains.register_wagon("wagon_default", {
mesh="advtrains_passenger_wagon.b3d",
textures = {"advtrains_wagon.png"},
drives_on={default=true},
max_speed=10,
seats = {
{
name="1",
attach_offset={x=2, y=6, z=8},
view_offset={x=0, y=-4, z=0},
group="pass",
},
{
name="2",
attach_offset={x=-1, y=6, z=8},
view_offset={x=0, y=-4, 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",
},
},
seat_groups = {
pass={
name = "Passenger area",
access_to = {},
},
},
assign_to_seat_group = {"pass"},
visual_size = {x=1, y=1},
wagon_span=2.634,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
drops={"default:steelblock 1"},
}, S("Passenger Wagon"), "advtrains_wagon_inv.png")
advtrains.register_wagon("wagon_box", {
mesh="advtrains_wagon_box.b3d",
textures = {"advtrains_wagon_box.png"},
drives_on={default=true},
max_speed=10,
seats = {},
visual_size = {x=1, y=1},
wagon_span=2,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
drops={"default:steelblock 1"},
has_inventory = true,
get_inventory_formspec = advtrains.standard_inventory_formspec,
inventory_list_sizes = {
box=8*3,
},
}, S("Box Wagon"), "advtrains_wagon_box_inv.png")
minetest.register_craft({
output = 'advtrains:newlocomotive',
recipe = {
{'', '', 'advtrains:chimney'},
{'advtrains:driver_cab', 'dye:black', 'advtrains:boiler'},
{'advtrains:wheel', 'advtrains:wheel', 'advtrains:wheel'},
},
})
minetest.register_craft({
output = 'advtrains:detailed_steam_engine',
recipe = {
{'', '', 'advtrains:chimney'},
{'advtrains:driver_cab', 'dye:green', 'advtrains:boiler'},
{'advtrains:wheel', 'advtrains:wheel', 'advtrains:wheel'},
},
})
minetest.register_craft({
output = 'advtrains:wagon_default',
recipe = {
{'default:steelblock', 'default:steelblock', 'default:steelblock'},
{'default:glass', 'dye:dark_green', 'default:glass'},
{'advtrains:wheel', 'advtrains:wheel', 'advtrains:wheel'},
},
})
minetest.register_craft({
output = 'advtrains:wagon_box',
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'group:wood', 'default:chest', 'group:wood'},
{'advtrains:wheel', '', 'advtrains:wheel'},
},
})

View file

@ -0,0 +1,6 @@
name=advtrains_train_steam
title=Advtrains Steam Train (Basic Trains)
description=Steam train set for Advanced Trains
author=orwell96
depends=advtrains,advtrains_train_track

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

View file

@ -0,0 +1,152 @@
local S = attrans
advtrains.register_wagon("subway_wagon", {
mesh="advtrains_subway_wagon.b3d",
textures = {"advtrains_subway_wagon.png"},
drives_on={default=true},
max_speed=15,
seats = {
{
name="Driver stand",
attach_offset={x=0, y=0, z=0},
view_offset={x=0, y=0, z=0},
group="dstand",
},
{
name="1",
attach_offset={x=-4, y=-2, z=8},
view_offset={x=0, y=0, z=0},
group="pass",
},
{
name="2",
attach_offset={x=4, y=-2, z=8},
view_offset={x=0, y=0, z=0},
group="pass",
},
{
name="3",
attach_offset={x=-4, y=-2, z=-8},
view_offset={x=0, y=0, z=0},
group="pass",
},
{
name="4",
attach_offset={x=4, y=-2, z=-8},
view_offset={x=0, y=0, 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 = {"pass", "dstand"},
doors={
open={
[-1]={frames={x=0, y=20}, time=1},
[1]={frames={x=40, y=60}, time=1},
sound = "advtrains_subway_dopen",
},
close={
[-1]={frames={x=20, y=40}, time=1},
[1]={frames={x=60, y=80}, time=1},
sound = "advtrains_subway_dclose",
}
},
door_entry={-1, 1},
visual_size = {x=1, y=1},
wagon_span=2,
--collisionbox = {-1.0,-0.5,-1.8, 1.0,2.5,1.8},
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
is_locomotive=true,
drops={"default:steelblock 4"},
horn_sound = "advtrains_subway_horn",
custom_on_velocity_change = function(self, velocity, old_velocity, dtime)
if not velocity or not old_velocity then return end
if old_velocity == 0 and velocity > 0 then
minetest.sound_play("advtrains_subway_depart", {object = self.object})
end
if velocity < 2 and (old_velocity >= 2 or old_velocity == velocity) and not self.sound_arrive_handle then
self.sound_arrive_handle = minetest.sound_play("advtrains_subway_arrive", {object = self.object})
elseif (velocity > old_velocity) and self.sound_arrive_handle then
minetest.sound_stop(self.sound_arrive_handle)
self.sound_arrive_handle = nil
end
if velocity > 0 and (self.sound_loop_tmr or 0)<=0 then
self.sound_loop_handle = minetest.sound_play({name="advtrains_subway_loop", gain=0.3}, {object = self.object})
self.sound_loop_tmr=3
elseif velocity>0 then
self.sound_loop_tmr = self.sound_loop_tmr - dtime
elseif velocity==0 then
if self.sound_loop_handle then
minetest.sound_stop(self.sound_loop_handle)
self.sound_loop_handle = nil
end
self.sound_loop_tmr=0
end
end,
custom_on_step = function(self, dtime, data, train)
--set line number
local line = nil
if train.line and self.line_cache ~= train.line then
self.line_cache=train.line
local lint = train.line
if string.sub(train.line, 1, 1) == "S" then
lint = string.sub(train.line,2)
end
if string.len(lint) == 1 then
if lint=="X" then line="X" end
line = tonumber(lint)
elseif string.len(lint) == 2 then
if tonumber(lint) then
line = lint
end
end
if line then
local new_line_tex="advtrains_subway_wagon.png"
if type(line)=="number" or line == "X" then
new_line_tex = new_line_tex.."^advtrains_subway_wagon_line"..line..".png"
else
local num = tonumber(line)
local red = math.fmod(line*67+101, 255)
local green = math.fmod(line*97+109, 255)
local blue = math.fmod(line*73+127, 255)
new_line_tex = new_line_tex..string.format("^(advtrains_subway_wagon_line.png^[colorize:#%X%X%X%X%X%X)^(advtrains_subway_wagon_line%s_.png^advtrains_subway_wagon_line_%s.png", math.floor(red/16), math.fmod(red,16), math.floor(green/16), math.fmod(green,16), math.floor(blue/16), math.fmod(blue,16), string.sub(line, 1, 1), string.sub(line, 2, 2))
if red + green + blue > 512 then
new_line_tex = new_line_tex .. "^[colorize:#000)"
else
new_line_tex = new_line_tex .. ")"
end
end
self.object:set_properties({
textures={new_line_tex},
})
elseif self.line_cache~=nil and line==nil then
self.object:set_properties({
textures=self.textures,
})
self.line_cache=nil
end
end
end,
}, S("Subway Passenger Wagon"), "advtrains_subway_wagon_inv.png")
--wagons
minetest.register_craft({
output = 'advtrains:subway_wagon',
recipe = {
{'default:steelblock', 'default:steelblock', 'default:steelblock'},
{'default:steelblock', 'dye:yellow', 'default:steelblock'},
{'default:steelblock', 'default:steelblock', 'default:steelblock'},
},
})

View file

@ -0,0 +1,6 @@
name=advtrains_train_subway
title=Advtrains Subway Train (Basic Trains)
description=Subway train set for Advanced Trains
author=orwell96
depends=advtrains,advtrains_train_track

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -0,0 +1,4 @@
name=basic_trains
title=Advtrains Basic Trains
description=Collection of basic trains for the Advanced Trains mod. Formerly included in Advtrains package.
author=orwell96