Change registeredElectricSabers to industrialtest.internal.registeredElectricSabers to prevent nil indexing

Fixes #2
This commit is contained in:
mrkubax10 2024-02-07 14:26:30 +01:00
parent 9743217703
commit 7df191097d
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ minetest.register_craft({
minetest.register_on_punchplayer(function(player,hitter)
local itemstack=hitter:get_wielded_item()
if registeredElectricSabers[itemstack:get_name()] then
if industrialtest.internal.registeredElectricSabers[itemstack:get_name()] then
local meta=itemstack:get_meta()
if meta:get_int("industrialtest.powerAmount")>=20 then
industrialtest.api.addPowerToItem(itemstack,-20)