1
0
Fork 0

Merge pull request 'Fix undefined variable in mcl_enchanting/engine.lua.' (#2177) from fix_enchanting into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2177
Reviewed-by: cora <cora@noreply.git.minetest.land>
bonemeal
cora 2022-05-04 23:34:18 +00:00
commit 8b8a133381
1 changed files with 2 additions and 2 deletions

View File

@ -457,10 +457,10 @@ function mcl_enchanting.generate_random_table_slots(itemstack, num_bookshelves)
end end
function mcl_enchanting.get_table_slots(player, itemstack, num_bookshelves) function mcl_enchanting.get_table_slots(player, itemstack, num_bookshelves)
if (not mcl_enchanting.can_enchant_freshly(itemstack:get_name())) or mcl_enchanting.not_enchantable_on_enchanting_table(itemname) then local itemname = itemstack:get_name()
if (not mcl_enchanting.can_enchant_freshly(itemname)) or mcl_enchanting.not_enchantable_on_enchanting_table(itemname) then
return {false, false, false} return {false, false, false}
end end
local itemname = itemstack:get_name()
local meta = player:get_meta() local meta = player:get_meta()
local player_slots = minetest.deserialize(meta:get_string("mcl_enchanting:slots")) or {} local player_slots = minetest.deserialize(meta:get_string("mcl_enchanting:slots")) or {}
local player_bookshelves_slots = player_slots[num_bookshelves] or {} local player_bookshelves_slots = player_slots[num_bookshelves] or {}