Move MVPS compat to mesecons_gamecompat

This commit is contained in:
Jude Melton-Houghton 2022-04-26 14:22:27 -04:00
parent acddd191e3
commit a7dedb2891
3 changed files with 30 additions and 26 deletions

View File

@ -40,3 +40,32 @@ end
-- Textures -- Textures
mesecon.texture.steel_block = "default_steel_block.png" mesecon.texture.steel_block = "default_steel_block.png"
-- MVPS stoppers
if minetest.get_modpath("mesecons_mvps") then
-- All of the locked and internal nodes in Minetest Game
for _, name in ipairs({
"default:chest_locked",
"default:chest_locked_open",
"doors:door_steel_b_1", -- old style doors
"doors:door_steel_b_2", --
"doors:door_steel_t_1", --
"doors:door_steel_t_2", --
"doors:door_steel_a", -- new style doors
"doors:door_steel_b", --
"doors:door_steel_c", --
"doors:door_steel_d", --
"doors:hidden",
"doors:trapdoor_steel",
"doors:trapdoor_steel_open",
"xpanes:door_steel_bar_a",
"xpanes:door_steel_bar_b",
"xpanes:door_steel_bar_c",
"xpanes:door_steel_bar_d",
"xpanes:trapdoor_steel_bar",
"xpanes:trapdoor_steel_bar_open",
}) do
mesecon.register_mvps_stopper(name)
end
end

View File

@ -1,3 +1,3 @@
name = mesecons_gamecompat name = mesecons_gamecompat
depends = mesecons depends = mesecons
optional_depends = fire, default, dye, tnt optional_depends = fire, default, dye, mesecons_mvps, tnt

View File

@ -311,31 +311,6 @@ end
-- TODO: load blocks instead, as with wires. -- TODO: load blocks instead, as with wires.
mesecon.register_mvps_stopper("ignore") mesecon.register_mvps_stopper("ignore")
-- All of the locked and internal nodes in Minetest Game
for _, name in ipairs({
"default:chest_locked",
"default:chest_locked_open",
"doors:door_steel_b_1", -- old style doors
"doors:door_steel_b_2", --
"doors:door_steel_t_1", --
"doors:door_steel_t_2", --
"doors:door_steel_a", -- new style doors
"doors:door_steel_b", --
"doors:door_steel_c", --
"doors:door_steel_d", --
"doors:hidden",
"doors:trapdoor_steel",
"doors:trapdoor_steel_open",
"xpanes:door_steel_bar_a",
"xpanes:door_steel_bar_b",
"xpanes:door_steel_bar_c",
"xpanes:door_steel_bar_d",
"xpanes:trapdoor_steel_bar",
"xpanes:trapdoor_steel_bar_open",
}) do
mesecon.register_mvps_stopper(name)
end
mesecon.register_on_mvps_move(mesecon.move_hot_nodes) mesecon.register_on_mvps_move(mesecon.move_hot_nodes)
mesecon.register_on_mvps_move(function(moved_nodes) mesecon.register_on_mvps_move(function(moved_nodes)
for i = 1, #moved_nodes do for i = 1, #moved_nodes do