From 7df191097da49fd5d14dd538153cf424eb1c9e66 Mon Sep 17 00:00:00 2001 From: mrkubax10 Date: Wed, 7 Feb 2024 14:26:30 +0100 Subject: [PATCH] Change registeredElectricSabers to industrialtest.internal.registeredElectricSabers to prevent nil indexing Fixes #2 --- tools/electric_saber.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/electric_saber.lua b/tools/electric_saber.lua index 452e011..871c5c2 100644 --- a/tools/electric_saber.lua +++ b/tools/electric_saber.lua @@ -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)