Compare commits

..

2 commits

Author SHA1 Message Date
philipmi
e23dbb3d80 Merge branch 'master' of https://github.com/MT-CTF/capturetheflag 2021-04-07 21:40:56 +02:00
Lars Müller
5eb02e32e4
Indestructible map nodes: Fix wool aliases (#859) 2021-04-07 10:33:19 -07:00

View file

@ -123,12 +123,12 @@ for name, def in pairs(registered_nodes) do
local prefix = mod_prefixes[mod] local prefix = mod_prefixes[mod]
if nodename and prefix and not (def.groups and def.groups.mortal) then if nodename and prefix and not (def.groups and def.groups.mortal) then
-- HACK to preserve backwards compatibility -- HACK to preserve backwards compatibility
local new_name = ":ctf_map:" .. prefix .. nodename local new_name = "ctf_map:" .. prefix .. nodename
if def.drop == name then if def.drop == name then
def.drop = new_name def.drop = new_name
end end
make_immortal(def) make_immortal(def)
minetest.register_node(new_name, def) minetest.register_node(":" .. new_name, def)
if mod == "wool" then if mod == "wool" then
minetest.register_alias("ctf_map:" .. nodename, new_name) minetest.register_alias("ctf_map:" .. nodename, new_name)
end end