5.4.0_run_setup-mt_is_neccessary_after_this_update
|
@ -1,4 +1,4 @@
|
||||||
mt_version="5.3.0"
|
mt_version="5.4.0"
|
||||||
first_install=y
|
first_install=y
|
||||||
ufw_enable=y
|
ufw_enable=y
|
||||||
ufw_ssh_port_for_accept=22
|
ufw_ssh_port_for_accept=22
|
||||||
|
|
|
@ -131,7 +131,7 @@ git clone --depth 1 --branch master https://github.com/Dragonop/claycrafter
|
||||||
git clone --depth 1 --branch master https://notabug.org/NetherEran/hot_air_balloons.git
|
git clone --depth 1 --branch master https://notabug.org/NetherEran/hot_air_balloons.git
|
||||||
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
|
||||||
|
|
||||||
#Clean git stuff
|
#Clean git stuff
|
||||||
rm -rf $(find . -name .git*)
|
rm -rf $(find . -name .git*)
|
||||||
|
|
22
mods-list
|
@ -1,4 +1,9 @@
|
||||||
load_mod_interact = false
|
load_mod_interact = false
|
||||||
|
load_mod_christmas = false
|
||||||
|
load_mod_advtrains_luaautomation = false
|
||||||
|
load_mod_advtrains_interlocking = false
|
||||||
|
load_mod_advtrains_line_automation = false
|
||||||
|
load_mod_advtrains_signals_ks = false
|
||||||
load_mod_workbench = true
|
load_mod_workbench = true
|
||||||
load_mod_wool = true
|
load_mod_wool = true
|
||||||
load_mod_wine = true
|
load_mod_wine = true
|
||||||
|
@ -35,7 +40,6 @@ load_mod_homedecor_bedroom = true
|
||||||
load_mod_homedecor_laundry = true
|
load_mod_homedecor_laundry = true
|
||||||
load_mod_blox = true
|
load_mod_blox = true
|
||||||
load_mod_homedecor_3d_extras = true
|
load_mod_homedecor_3d_extras = true
|
||||||
load_mod_computer = true
|
|
||||||
load_mod_mymillwork = true
|
load_mod_mymillwork = true
|
||||||
load_mod_drinks = true
|
load_mod_drinks = true
|
||||||
load_mod_angledstairs = true
|
load_mod_angledstairs = true
|
||||||
|
@ -43,7 +47,6 @@ load_mod_nature_classic = true
|
||||||
load_mod_homedecor_clocks = true
|
load_mod_homedecor_clocks = true
|
||||||
load_mod_signs_road = true
|
load_mod_signs_road = true
|
||||||
load_mod_homedecor_cobweb = true
|
load_mod_homedecor_cobweb = true
|
||||||
load_mod_christmas = true
|
|
||||||
load_mod_along_shore = true
|
load_mod_along_shore = true
|
||||||
load_mod_artdeco = true
|
load_mod_artdeco = true
|
||||||
load_mod_carts = true
|
load_mod_carts = true
|
||||||
|
@ -254,19 +257,14 @@ load_mod_abriflame = true
|
||||||
load_mod_lpanes = true
|
load_mod_lpanes = true
|
||||||
load_mod_abriglass = true
|
load_mod_abriglass = true
|
||||||
load_mod_advtrains_train_track = true
|
load_mod_advtrains_train_track = true
|
||||||
load_mod_advtrains_train_subway = true
|
|
||||||
load_mod_advtrains_train_japan = true
|
|
||||||
load_mod_advtrains_train_industrial = true
|
|
||||||
load_mod_advtrains_luaautomation = true
|
|
||||||
load_mod_advtrains_interlocking = true
|
|
||||||
load_mod_advtrains = true
|
load_mod_advtrains = true
|
||||||
load_mod_advtrains_train_steam = true
|
|
||||||
load_mod_advtrains_line_automation = true
|
|
||||||
load_mod_advtrains_itrainmap = true
|
load_mod_advtrains_itrainmap = true
|
||||||
load_mod_assets = true
|
|
||||||
load_mod_advtrains_signals_ks = true
|
|
||||||
load_mod_claycrafter = true
|
load_mod_claycrafter = true
|
||||||
load_mod_serialize_lib = true
|
load_mod_serialize_lib = true
|
||||||
load_mod_mobs_sky = true
|
|
||||||
load_mod_hot_air_balloons = true
|
load_mod_hot_air_balloons = true
|
||||||
load_mod_mobs_bat = true
|
load_mod_mobs_bat = true
|
||||||
|
load_mod_home_workshop_machines = true
|
||||||
|
load_mod_home_workshop_common = true
|
||||||
|
load_mod_home_workshop_misc = true
|
||||||
|
load_mod_computers = true
|
||||||
|
load_mod_advtrains_assets = true
|
||||||
|
|
Before Width: | Height: | Size: 8.9 KiB |
7
mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.es.tr
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# textdomain: 3d_armor_sfinv
|
||||||
|
|
||||||
|
|
||||||
|
### init.lua ###
|
||||||
|
|
||||||
|
3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv : Mod cargado pero no activado.
|
||||||
|
Armor=Armadura
|
|
@ -153,6 +153,7 @@ minetest.register_node("3d_armor_stand:armor_stand", {
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
mesh = "3d_armor_stand.obj",
|
mesh = "3d_armor_stand.obj",
|
||||||
tiles = {"3d_armor_stand.png"},
|
tiles = {"3d_armor_stand.png"},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -221,6 +222,7 @@ minetest.register_node("3d_armor_stand:locked_armor_stand", {
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
mesh = "3d_armor_stand.obj",
|
mesh = "3d_armor_stand.obj",
|
||||||
tiles = {"3d_armor_stand_locked.png"},
|
tiles = {"3d_armor_stand_locked.png"},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
local F = minetest.formspec_escape
|
local F = minetest.formspec_escape
|
||||||
local has_technic = minetest.get_modpath("technic") ~= nil
|
local has_technic = minetest.get_modpath("technic") ~= nil
|
||||||
|
local ui = unified_inventory
|
||||||
|
|
||||||
if not minetest.global_exists("unified_inventory") then
|
if not minetest.global_exists("unified_inventory") then
|
||||||
minetest.log("warning", S("3d_armor_ui: Mod loaded but unused."))
|
minetest.log("warning", S("3d_armor_ui: Mod loaded but unused."))
|
||||||
|
@ -27,17 +28,24 @@ unified_inventory.register_button("armor", {
|
||||||
|
|
||||||
unified_inventory.register_page("armor", {
|
unified_inventory.register_page("armor", {
|
||||||
get_formspec = function(player, perplayer_formspec)
|
get_formspec = function(player, perplayer_formspec)
|
||||||
local fy = perplayer_formspec.formspec_y
|
local fy = perplayer_formspec.form_header_y + 0.5
|
||||||
|
local gridx = perplayer_formspec.std_inv_x
|
||||||
|
local gridy = 0.6
|
||||||
|
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if armor.def[name].init_time == 0 then
|
if armor.def[name].init_time == 0 then
|
||||||
return {formspec="label[0,0;"..F(S("Armor not initialized!")).."]"}
|
return {formspec="label[0,0;"..F(S("Armor not initialized!")).."]"}
|
||||||
end
|
end
|
||||||
local formspec = "background[0.06,"..fy..";7.92,7.52;3d_armor_ui_form.png]"..
|
local formspec = perplayer_formspec.standard_inv_bg..
|
||||||
"label[0,0;"..F(S("Armor")).."]"..
|
perplayer_formspec.standard_inv..
|
||||||
"list[detached:"..name.."_armor;armor;0,"..fy..";2,3;]"..
|
ui.make_inv_img_grid(gridx, gridy, 2, 3)..
|
||||||
"image[2.5,"..(fy - 0.25)..";2,4;"..armor.textures[name].preview.."]"..
|
string.format("label[%f,%f;%s]",
|
||||||
"label[5.0,"..(fy + 0.0)..";"..F(S("Level"))..": "..armor.def[name].level.."]"..
|
perplayer_formspec.form_header_x, perplayer_formspec.form_header_y, F(S("Armor")))..
|
||||||
"label[5.0,"..(fy + 0.5)..";"..F(S("Heal"))..": "..armor.def[name].heal.."]"..
|
string.format("list[detached:%s_armor;armor;%f,%f;2,3;]",
|
||||||
|
name, gridx + ui.list_img_offset, gridy + ui.list_img_offset) ..
|
||||||
|
"image[3.5,"..(fy - 0.25)..";2,4;"..armor.textures[name].preview.."]"..
|
||||||
|
"label[6.0,"..(fy + 0.0)..";"..F(S("Level"))..": "..armor.def[name].level.."]"..
|
||||||
|
"label[6.0,"..(fy + 0.5)..";"..F(S("Heal"))..": "..armor.def[name].heal.."]"..
|
||||||
"listring[current_player;main]"..
|
"listring[current_player;main]"..
|
||||||
"listring[detached:"..name.."_armor;armor]"
|
"listring[detached:"..name.."_armor;armor]"
|
||||||
if armor.config.fire_protect then
|
if armor.config.fire_protect then
|
||||||
|
@ -45,7 +53,7 @@ unified_inventory.register_page("armor", {
|
||||||
F(S("Fire"))..": "..armor.def[name].fire.."]"
|
F(S("Fire"))..": "..armor.def[name].fire.."]"
|
||||||
end
|
end
|
||||||
if has_technic then
|
if has_technic then
|
||||||
formspec = formspec.."label[5.0,"..(fy + 1.5)..";"..
|
formspec = formspec.."label[6.0,"..(fy + 1.5)..";"..
|
||||||
F(S("Radiation"))..": "..armor.def[name].groups["radiation"].."]"
|
F(S("Radiation"))..": "..armor.def[name].groups["radiation"].."]"
|
||||||
end
|
end
|
||||||
return {formspec=formspec}
|
return {formspec=formspec}
|
||||||
|
|
|
@ -2,3 +2,4 @@ name = 3d_armor_ui
|
||||||
depends = 3d_armor
|
depends = 3d_armor
|
||||||
optional_depends = unified_inventory
|
optional_depends = unified_inventory
|
||||||
description = Adds 3d_armor page to the unified inventory.
|
description = Adds 3d_armor page to the unified inventory.
|
||||||
|
min_minetest_version = 5.4.0
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
default
|
|
||||||
serialize_lib
|
|
||||||
mesecons?
|
|
||||||
digtron?
|
|
|
@ -66,6 +66,7 @@ Subway Passenger Wagon=U-Bahn-Waggon
|
||||||
The wagon's inventory is not empty!=Das Inventar dieses Waggons ist nicht leer!
|
The wagon's inventory is not empty!=Das Inventar dieses Waggons ist nicht leer!
|
||||||
This track can not be changed!=Diese Schiene kann nicht geändert werden!
|
This track can not be changed!=Diese Schiene kann nicht geändert werden!
|
||||||
This track can not be rotated!=Diese Schiene kann nicht gedreht werden!
|
This track can not be rotated!=Diese Schiene kann nicht gedreht werden!
|
||||||
|
This track can not be removed!=Diese Schiene kann nicht entfernt werden!
|
||||||
Position is occupied by a train.=Ein Zug steht an dieser Position.
|
Position is occupied by a train.=Ein Zug steht an dieser Position.
|
||||||
There's a Track Circuit Break here.=Hier ist eine Gleisabschnittsgrenze (TCB).
|
There's a Track Circuit Break here.=Hier ist eine Gleisabschnittsgrenze (TCB).
|
||||||
There's a Signal Influence Point here.=Hier ist ein Signal-Beeinflussungspunkt.
|
There's a Signal Influence Point here.=Hier ist ein Signal-Beeinflussungspunkt.
|
||||||
|
|
7
mods/advtrains/advtrains/mod.conf
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
name=advtrains
|
||||||
|
title=Advanced Trains Core
|
||||||
|
description=Core system for realistic trains in Minetest
|
||||||
|
author=orwell96
|
||||||
|
|
||||||
|
depends=serialize_lib
|
||||||
|
optional_depends=mesecons,digtron
|
|
@ -9,6 +9,12 @@ local function can_dig_func(pos)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
local function after_dig_func(pos)
|
||||||
|
if advtrains.interlocking then
|
||||||
|
return advtrains.interlocking.signal_after_dig(pos)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
local function aspect(b)
|
local function aspect(b)
|
||||||
return {
|
return {
|
||||||
|
@ -97,6 +103,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
|
||||||
supported_aspects = suppasp,
|
supported_aspects = suppasp,
|
||||||
},
|
},
|
||||||
can_dig = can_dig_func,
|
can_dig = can_dig_func,
|
||||||
|
after_dig_node = after_dig_func,
|
||||||
})
|
})
|
||||||
advtrains.trackplacer.add_worked("advtrains:retrosignal", r, rotation, nil)
|
advtrains.trackplacer.add_worked("advtrains:retrosignal", r, rotation, nil)
|
||||||
|
|
||||||
|
@ -163,6 +170,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
can_dig = can_dig_func,
|
can_dig = can_dig_func,
|
||||||
|
after_dig_node = after_dig_func,
|
||||||
})
|
})
|
||||||
advtrains.trackplacer.add_worked("advtrains:signal", r, rotation, nil)
|
advtrains.trackplacer.add_worked("advtrains:signal", r, rotation, nil)
|
||||||
end
|
end
|
||||||
|
@ -232,6 +240,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
can_dig = can_dig_func,
|
can_dig = can_dig_func,
|
||||||
|
after_dig_node = after_dig_func,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -442,6 +442,15 @@ Depending on the number of connections:
|
||||||
- conn3 <> conn4
|
- conn3 <> conn4
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
-- Notify the user if digging the rail is not allowed
|
||||||
|
local function can_dig_callback(pos, player)
|
||||||
|
local ok, reason = advtrains.can_dig_or_modify_track(pos)
|
||||||
|
if not ok and player then
|
||||||
|
minetest.chat_send_player(player:get_player_name(), attrans("This track can not be removed!") .. " " .. reason)
|
||||||
|
end
|
||||||
|
return ok
|
||||||
|
end
|
||||||
|
|
||||||
function advtrains.register_tracks(tracktype, def, preset)
|
function advtrains.register_tracks(tracktype, def, preset)
|
||||||
advtrains.trackplacer.register_tracktype(def.nodename_prefix, preset.tpdefault)
|
advtrains.trackplacer.register_tracktype(def.nodename_prefix, preset.tpdefault)
|
||||||
if preset.regtp then
|
if preset.regtp then
|
||||||
|
@ -478,7 +487,7 @@ function advtrains.register_tracks(tracktype, def, preset)
|
||||||
not_blocking_trains=1,
|
not_blocking_trains=1,
|
||||||
},
|
},
|
||||||
|
|
||||||
can_dig = advtrains.can_dig_or_modify_track,
|
can_dig = can_dig_callback,
|
||||||
after_dig_node=function(pos)
|
after_dig_node=function(pos)
|
||||||
advtrains.ndb.update(pos)
|
advtrains.ndb.update(pos)
|
||||||
end,
|
end,
|
||||||
|
@ -613,7 +622,7 @@ function advtrains.can_dig_or_modify_track(pos)
|
||||||
return false, attrans("There's a Track Circuit Break here.")
|
return false, attrans("There's a Track Circuit Break here.")
|
||||||
end
|
end
|
||||||
-- signal ip?
|
-- signal ip?
|
||||||
if advtrains.interlocking.db.is_ip_at(pos) then
|
if advtrains.interlocking.db.is_ip_at(pos, true) then -- is_ip_at with purge parameter
|
||||||
return false, attrans("There's a Signal Influence Point here.")
|
return false, attrans("There's a Signal Influence Point here.")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -562,9 +562,23 @@ function ildb.set_sigd_for_signal(pos, sigd)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- checks if there's any influence point set to this position
|
-- checks if there's any influence point set to this position
|
||||||
function ildb.is_ip_at(pos)
|
-- if purge is true, checks whether the associated signal still exists
|
||||||
|
-- and deletes the ip if not.
|
||||||
|
function ildb.is_ip_at(pos, purge)
|
||||||
local pts = advtrains.roundfloorpts(pos)
|
local pts = advtrains.roundfloorpts(pos)
|
||||||
if influence_points[pts] then
|
if influence_points[pts] then
|
||||||
|
if purge then
|
||||||
|
-- is there still a signal assigned to it?
|
||||||
|
for connid, sigpos in pairs(influence_points[pts]) do
|
||||||
|
local asp = advtrains.interlocking.signal_get_aspect(sigpos)
|
||||||
|
if not asp then
|
||||||
|
atlog("Clearing orphaned signal influence point", pts, "/", connid)
|
||||||
|
ildb.clear_ip_signal(pts, connid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- if there's no side left after purging, return false
|
||||||
|
if not influence_points[pts] then return false end
|
||||||
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -51,6 +51,7 @@ minetest.register_node("advtrains_interlocking:ds_danger", {
|
||||||
},
|
},
|
||||||
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
||||||
can_dig = advtrains.interlocking.signal_can_dig,
|
can_dig = advtrains.interlocking.signal_can_dig,
|
||||||
|
after_dig_node = advtrains.interlocking.signal_after_dig,
|
||||||
})
|
})
|
||||||
minetest.register_node("advtrains_interlocking:ds_free", {
|
minetest.register_node("advtrains_interlocking:ds_free", {
|
||||||
description = "Demo signal at Free",
|
description = "Demo signal at Free",
|
||||||
|
@ -72,6 +73,7 @@ minetest.register_node("advtrains_interlocking:ds_free", {
|
||||||
},
|
},
|
||||||
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
||||||
can_dig = advtrains.interlocking.signal_can_dig,
|
can_dig = advtrains.interlocking.signal_can_dig,
|
||||||
|
after_dig_node = advtrains.interlocking.signal_after_dig,
|
||||||
})
|
})
|
||||||
minetest.register_node("advtrains_interlocking:ds_slow", {
|
minetest.register_node("advtrains_interlocking:ds_slow", {
|
||||||
description = "Demo signal at Slow",
|
description = "Demo signal at Slow",
|
||||||
|
@ -93,5 +95,6 @@ minetest.register_node("advtrains_interlocking:ds_slow", {
|
||||||
},
|
},
|
||||||
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
||||||
can_dig = advtrains.interlocking.signal_can_dig,
|
can_dig = advtrains.interlocking.signal_can_dig,
|
||||||
|
after_dig_node = advtrains.interlocking.signal_after_dig,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
advtrains
|
|
||||||
advtrains_train_track?
|
|
7
mods/advtrains/advtrains_interlocking/mod.conf
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
name=advtrains_interlocking
|
||||||
|
title=Advanced Trains Interlocking System
|
||||||
|
description=Interlocking system for Advanced Trains
|
||||||
|
author=orwell96
|
||||||
|
|
||||||
|
depends=advtrains
|
||||||
|
optional_depends=advtrains_train_track
|
30
mods/advtrains/advtrains_interlocking/tcb_ts_ui.lua
Normal file → Executable file
|
@ -120,13 +120,41 @@ minetest.register_node("advtrains_interlocking:tcb_node", {
|
||||||
|
|
||||||
|
|
||||||
-- Crafting
|
-- Crafting
|
||||||
|
|
||||||
|
-- set some fallbacks
|
||||||
|
local tcb_core = "default:mese_crystal"
|
||||||
|
local tcb_secondary = "default:mese_crystal_fragment"
|
||||||
|
|
||||||
|
--alternative recipe items
|
||||||
|
--core
|
||||||
|
if minetest.get_modpath("basic_materials") then
|
||||||
|
tcb_core = "basic_materials:ic"
|
||||||
|
elseif minetest.get_modpath("technic") then
|
||||||
|
tcb_core = "technic:control_logic_unit"
|
||||||
|
end
|
||||||
|
--print("TCB Core: "..tcb_core)
|
||||||
|
--secondary
|
||||||
|
if minetest.get_modpath("mesecons") then
|
||||||
|
tcb_secondary = 'mesecons:wire_00000000_off'
|
||||||
|
end
|
||||||
|
--print("TCB Secondary: "..tcb_secondary)
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'advtrains_interlocking:tcb_node 4',
|
output = 'advtrains_interlocking:tcb_node 4',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'mesecons:wire_00000000_off', 'basic_materials:ic', 'mesecons:wire_00000000_off'},
|
{tcb_secondary,tcb_core,tcb_secondary},
|
||||||
|
{'advtrains:dtrack_placer','','advtrains:dtrack_placer'}
|
||||||
},
|
},
|
||||||
|
--actually use track in the tcb recipe
|
||||||
|
replacements = {
|
||||||
|
{"advtrains:dtrack_placer","advtrains:dtrack_placer"},
|
||||||
|
{"advtrains:dtrack_placer","advtrains:dtrack_placer"},
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
--nil the temp crafting variables
|
||||||
|
tcb_core= nil
|
||||||
|
tcb_secondary = nil
|
||||||
|
|
||||||
minetest.register_on_punchnode(function(pos, node, player, pointed_thing)
|
minetest.register_on_punchnode(function(pos, node, player, pointed_thing)
|
||||||
local pname = player:get_player_name()
|
local pname = player:get_player_name()
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
advtrains
|
|
6
mods/advtrains/advtrains_itrainmap/mod.conf
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
name=advtrains_itrainmap
|
||||||
|
title=Advanced Trains Interactive Train Map (currently broken)
|
||||||
|
description=Map formspec showing tracks and trains
|
||||||
|
author=orwell96
|
||||||
|
|
||||||
|
depends=advtrains
|
|
@ -1,2 +0,0 @@
|
||||||
advtrains_interlocking
|
|
||||||
advtrains_train_track?
|
|
7
mods/advtrains/advtrains_line_automation/mod.conf
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
name=advtrains_line_automation
|
||||||
|
title=Advanced Trains Line Automation
|
||||||
|
description=Tools for automatic train lines
|
||||||
|
author=orwell96
|
||||||
|
|
||||||
|
depends=advtrains_interlocking
|
||||||
|
optional_depends=advtrains_train_track
|
|
@ -93,6 +93,9 @@ Removes any pending interrupts of this node.
|
||||||
Make this active component send a digiline message on the specified channel.
|
Make this active component send a digiline message on the specified channel.
|
||||||
Not available in init code.
|
Not available in init code.
|
||||||
|
|
||||||
|
- `atc_send_to_train(<train_id>, <atc_command>)`
|
||||||
|
Sends the specified ATC command to the train specified by its train id. This happens regardless of where the train is in the world, and can be used to remote-control trains. Returns true on success. If the train ID does not exist, returns false and does nothing. See [atc_command.txt](../atc_command.txt) for the ATC command syntax.
|
||||||
|
|
||||||
#### Interlocking Route Management Functions
|
#### Interlocking Route Management Functions
|
||||||
If `advtrains_interlocking` is enabled, the following aditional functions can be used:
|
If `advtrains_interlocking` is enabled, the following aditional functions can be used:
|
||||||
|
|
||||||
|
@ -230,6 +233,9 @@ In addition to the above environment functions, the following functions are avai
|
||||||
- `atc_set_text_inside(text)`
|
- `atc_set_text_inside(text)`
|
||||||
Set text shown to train passengers. Pass nil to show no text. `text` must be a string.
|
Set text shown to train passengers. Pass nil to show no text. `text` must be a string.
|
||||||
|
|
||||||
|
- `atc_set_text_inside(text) / atc_set_text_outside(text)`
|
||||||
|
Getters for inside/outside text, return nil when no train is there.
|
||||||
|
|
||||||
- `get_line()`
|
- `get_line()`
|
||||||
Returns the "Line" property of the train (a string).
|
Returns the "Line" property of the train (a string).
|
||||||
This can be used to distinguish between trains of different lines and route them appropriately.
|
This can be used to distinguish between trains of different lines and route them appropriately.
|
||||||
|
|
|
@ -151,6 +151,14 @@ function r.fire_event(pos, evtdata, appr_internal)
|
||||||
advtrains.trains[train_id].text_inside=text
|
advtrains.trains[train_id].text_inside=text
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
atc_get_text_outside = function()
|
||||||
|
if not train_id then return false end
|
||||||
|
return advtrains.trains[train_id].text_outside
|
||||||
|
end,
|
||||||
|
atc_get_text_inside = function(text)
|
||||||
|
if not train_id then return false end
|
||||||
|
return advtrains.trains[train_id].text_inside
|
||||||
|
end,
|
||||||
atc_set_lzb_tsr = function(speed)
|
atc_set_lzb_tsr = function(speed)
|
||||||
if not appr_internal then
|
if not appr_internal then
|
||||||
error("atc_set_lzb_tsr() can only be used during 'approach' events!")
|
error("atc_set_lzb_tsr() can only be used during 'approach' events!")
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
advtrains
|
|
||||||
advtrains_interlocking?
|
|
||||||
advtrains_line_automation?
|
|
||||||
mesecons_switch?
|
|
|
@ -153,6 +153,17 @@ local static_env = {
|
||||||
local pos=atlatc.pcnaming.resolve_pos(parpos)
|
local pos=atlatc.pcnaming.resolve_pos(parpos)
|
||||||
atlatc.interrupt.add(0, pos, {type="ext_int", ext_int=true, message=imesg})
|
atlatc.interrupt.add(0, pos, {type="ext_int", ext_int=true, message=imesg})
|
||||||
end,
|
end,
|
||||||
|
-- sends an atc command to train regardless of where it is in the world
|
||||||
|
atc_send_to_train = function(train_id, command)
|
||||||
|
assertt(command, "string")
|
||||||
|
local train = advtrains.trains[train_id]
|
||||||
|
if train then
|
||||||
|
advtrains.atc.train_set_command(train, command, true)
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- If interlocking is present, enable route setting functions
|
-- If interlocking is present, enable route setting functions
|
||||||
|
|
7
mods/advtrains/advtrains_luaautomation/mod.conf
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
name=advtrains_luaautomation
|
||||||
|
title=Advanced Trains LuaATC
|
||||||
|
description=Lua control interface to Advanced Trains
|
||||||
|
author=orwell96
|
||||||
|
|
||||||
|
depends=advtrains
|
||||||
|
optional_depends=advtrains_interlocking,advtrains_line_automation,mesecons_switch
|
|
@ -1,2 +0,0 @@
|
||||||
advtrains
|
|
||||||
advtrains_interlocking
|
|
12
mods/advtrains/advtrains_signals_ks/init.lua
Normal file → Executable file
|
@ -115,6 +115,7 @@ for _, rtab in ipairs({
|
||||||
},
|
},
|
||||||
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
||||||
can_dig = advtrains.interlocking.signal_can_dig,
|
can_dig = advtrains.interlocking.signal_can_dig,
|
||||||
|
after_dig_node = advtrains.interlocking.signal_after_dig,
|
||||||
})
|
})
|
||||||
-- rotatable by trackworker
|
-- rotatable by trackworker
|
||||||
advtrains.trackplacer.add_worked("advtrains_signals_ks:hs", typ, "_"..rot, prts.n)
|
advtrains.trackplacer.add_worked("advtrains_signals_ks:hs", typ, "_"..rot, prts.n)
|
||||||
|
@ -160,6 +161,7 @@ for _, rtab in ipairs({
|
||||||
},
|
},
|
||||||
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
||||||
can_dig = advtrains.interlocking.signal_can_dig,
|
can_dig = advtrains.interlocking.signal_can_dig,
|
||||||
|
after_dig_node = advtrains.interlocking.signal_after_dig,
|
||||||
})
|
})
|
||||||
-- rotatable by trackworker
|
-- rotatable by trackworker
|
||||||
advtrains.trackplacer.add_worked("advtrains_signals_ks:ra", typ, "_"..rot, prts.n)
|
advtrains.trackplacer.add_worked("advtrains_signals_ks:ra", typ, "_"..rot, prts.n)
|
||||||
|
@ -210,6 +212,7 @@ for _, rtab in ipairs({
|
||||||
},
|
},
|
||||||
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
on_rightclick = advtrains.interlocking.signal_rc_handler,
|
||||||
can_dig = advtrains.interlocking.signal_can_dig,
|
can_dig = advtrains.interlocking.signal_can_dig,
|
||||||
|
after_dig_node = advtrains.interlocking.signal_after_dig,
|
||||||
})
|
})
|
||||||
-- rotatable by trackworker
|
-- rotatable by trackworker
|
||||||
advtrains.trackplacer.add_worked("advtrains_signals_ks:sign", typ, "_"..rot, prts.n)
|
advtrains.trackplacer.add_worked("advtrains_signals_ks:sign", typ, "_"..rot, prts.n)
|
||||||
|
@ -270,11 +273,18 @@ minetest.register_craft({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local sign_material = "default:sign_wall_steel" --fallback
|
||||||
|
if minetest.get_modpath("basic_materials") then
|
||||||
|
sign_material = "basic_materials:plastic_sheet"
|
||||||
|
end
|
||||||
|
--print("Sign Material: "..sign_material)
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "advtrains_signals_ks:sign_8_0 2",
|
output = "advtrains_signals_ks:sign_8_0 2",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'basic_materials:plastic_sheet', 'dye:black'},
|
{sign_material, 'dye:black'},
|
||||||
{'default:stick', ''},
|
{'default:stick', ''},
|
||||||
{'default:stick', ''},
|
{'default:stick', ''},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
sign_material = nil
|
||||||
|
|
6
mods/advtrains/advtrains_signals_ks/mod.conf
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
name=advtrains_signals_ks
|
||||||
|
title=Advtrains Interlocking Signal Set - German 'Ks' signals
|
||||||
|
description=Default signal set for the Advanced Trains Interlocking system
|
||||||
|
author=orwell96
|
||||||
|
|
||||||
|
depends=advtrains_interlocking
|
|
@ -1,3 +0,0 @@
|
||||||
advtrains
|
|
||||||
advtrains_train_track
|
|
||||||
intllib?
|
|
|
@ -1,149 +0,0 @@
|
||||||
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'},
|
|
||||||
},
|
|
||||||
})
|
|
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 316 B |
|
@ -1,3 +0,0 @@
|
||||||
advtrains
|
|
||||||
advtrains_train_track
|
|
||||||
intllib?
|
|
|
@ -1,162 +0,0 @@
|
||||||
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'},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 434 B |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 400 B |
|
@ -1,3 +0,0 @@
|
||||||
advtrains
|
|
||||||
advtrains_train_track
|
|
||||||
intllib?
|
|
|
@ -1,253 +0,0 @@
|
||||||
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'},
|
|
||||||
},
|
|
||||||
})
|
|
Before Width: | Height: | Size: 791 KiB |
Before Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 699 B |
|
@ -1,3 +0,0 @@
|
||||||
advtrains
|
|
||||||
advtrains_train_track
|
|
||||||
intllib?
|
|
|
@ -1,152 +0,0 @@
|
||||||
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'},
|
|
||||||
},
|
|
||||||
})
|
|
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 842 B |
Before Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 227 B |
Before Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 218 B |