mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-01-08 16:30:16 +01:00
Fix crash when doors.registered_doors
isn't available
This commit is contained in:
parent
b46c589a38
commit
3c9055c723
@ -132,14 +132,16 @@ local function meseconify_trapdoor(name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_mods_loaded(function()
|
minetest.register_on_mods_loaded(function()
|
||||||
for k,_ in pairs(doors.registered_doors) do
|
if doors.registered_doors ~= nil then -- registered_doors is not always available
|
||||||
if k:find("_a$") then
|
for k,_ in pairs(doors.registered_doors) do
|
||||||
meseconify_door(k:sub(1,-3))
|
if k:find("_a$") then
|
||||||
|
meseconify_door(k:sub(1,-3))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
for k,_ in pairs(doors.registered_trapdoors) do
|
||||||
for k,_ in pairs(doors.registered_trapdoors) do
|
if not k:find("_open$") then
|
||||||
if not k:find("_open$") then
|
meseconify_trapdoor(k)
|
||||||
meseconify_trapdoor(k)
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user