Fix MCL crash during loading in jetpack.lua

This commit is contained in:
mrkubax10 2024-01-13 13:15:46 +01:00
parent 3db5fa322e
commit 4674f3b396

View File

@ -28,8 +28,10 @@ local function registerJetpack(config)
non_combat_torso=1,
_industrialtest_jetpack=1
}
for key,value in pairs(config.groups) do
groups[key]=value
if config.groups then
for key,value in pairs(config.groups) do
groups[key]=value
end
end
local definition={
description=config.displayName,
@ -45,8 +47,10 @@ local function registerJetpack(config)
_mcl_armor_texture="industrialtest_"..config.name..".png",
_industrialtest_tryFly=config.tryFly
}
for key,value in pairs(config.customKeys) do
definition[key]=value
if config.customKeys then
for key,value in pairs(config.customKeys) do
definition[key]=value
end
end
minetest.register_tool("industrialtest:"..config.name,definition)
elseif industrialtest.mtgAvailable then