Skip to content

Commit

Permalink
Mineclonia: exchange unmovable nodes and entities
Browse files Browse the repository at this point in the history
  • Loading branch information
blut committed Feb 5, 2025
1 parent 87011f1 commit eef94ea
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions mesecons_gamecompat/compat_mcla.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,29 @@ end
mesecon.texture.steel_block = "default_steel_block.png"

if minetest.get_modpath("mesecons_mvps") then
for k,v in pairs(core.registered_nodes) do
local is_stopper = mesecon.mvps_stoppers[k]
if v.groups and v.groups.unmovable_by_piston then
mesecon.register_mvps_stopper(k)
end
if is_stopper then
local groups = table.copy(v.groups or {})
groups.unmovable_by_piston = 1
v.groups = groups
core.register_node(":"..k, v)
end
end
for k,v in pairs(core.registered_entities) do
local is_unmov = mesecon.mvps_unmov[k]
if v._mcl_pistons_unmovable then
mesecon.register_mvps_unmov(k)
end
if is_unmov then
v._mcl_pistons_unmovable = true
core.register_entity(":"..k, v)
end
end

core.register_on_mods_loaded(function()
for _,v in pairs(core.registered_nodes) do
if v.groups and v.groups.bed then
Expand Down

0 comments on commit eef94ea

Please sign in to comment.