Change registeredElectricSabers to industrialtest.internal.registeredElectricSabers to prevent nil indexing
Fixes #2
This commit is contained in:
parent
9743217703
commit
7df191097d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user