mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-08-22 09:57:25 +02:00
Move cart code to its own file, more code cleanup, add aliases for old track items
This commit is contained in:
parent
fd03fc0027
commit
e6664de6e7
1368
mods/ENTITIES/mcl_minecarts/carts.lua
Normal file
1368
mods/ENTITIES/mcl_minecarts/carts.lua
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -562,6 +562,9 @@ end
|
|||||||
local CURVY_RAILS_MAP = {
|
local CURVY_RAILS_MAP = {
|
||||||
["mcl_minecarts:rail"] = "mcl_minecarts:rail_v2",
|
["mcl_minecarts:rail"] = "mcl_minecarts:rail_v2",
|
||||||
}
|
}
|
||||||
|
for old,new in pairs(CURVY_RAILS_MAP) do
|
||||||
|
minetest.register_alias(old, new)
|
||||||
|
end
|
||||||
minetest.register_lbm({
|
minetest.register_lbm({
|
||||||
name = "mcl_minecarts:update_legacy_curvy_rails",
|
name = "mcl_minecarts:update_legacy_curvy_rails",
|
||||||
nodenames = mcl_util.table_keys(CURVY_RAILS_MAP),
|
nodenames = mcl_util.table_keys(CURVY_RAILS_MAP),
|
||||||
@ -581,6 +584,9 @@ local STRAIGHT_RAILS_MAP ={
|
|||||||
["mcl_minecarts:detector_rail"] = "mcl_minecarts:detector_rail_v2",
|
["mcl_minecarts:detector_rail"] = "mcl_minecarts:detector_rail_v2",
|
||||||
["mcl_minecarts:detector_rail_on"] = "mcl_minecarts:detector_rail_v2_on",
|
["mcl_minecarts:detector_rail_on"] = "mcl_minecarts:detector_rail_v2_on",
|
||||||
}
|
}
|
||||||
|
for old,new in pairs(STRAIGHT_RAILS_MAP) do
|
||||||
|
minetest.register_alias(old, new)
|
||||||
|
end
|
||||||
minetest.register_lbm({
|
minetest.register_lbm({
|
||||||
name = "mcl_minecarts:update_legacy_straight_rails",
|
name = "mcl_minecarts:update_legacy_straight_rails",
|
||||||
nodenames = mcl_util.table_keys(STRAIGHT_RAILS_MAP),
|
nodenames = mcl_util.table_keys(STRAIGHT_RAILS_MAP),
|
||||||
|
Loading…
Reference in New Issue
Block a user