Remove unused and clean up missused variable-value assignments.
* Unused variables * Unused values (assigned to variables, but overwritten before use) * Defining already defined variables instead of reassigning to them.
This commit is contained in:
parent
d7a7456007
commit
4473627de0
12 changed files with 22 additions and 31 deletions
|
@ -15,7 +15,7 @@ local lpp = 14 -- Lines per book's page
|
|||
local function book_on_use(itemstack, user)
|
||||
local player_name = user:get_player_name()
|
||||
local data = minetest.deserialize(itemstack:get_metadata())
|
||||
local formspec, title, text, owner = "", "", "", player_name
|
||||
local title, text, owner = "", "", player_name
|
||||
local page, page_max, lines, string = 1, 1, {}, ""
|
||||
|
||||
if data then
|
||||
|
@ -38,6 +38,7 @@ local function book_on_use(itemstack, user)
|
|||
end
|
||||
end
|
||||
|
||||
local formspec
|
||||
if owner == player_name then
|
||||
formspec = "size[8,8]" .. default.gui_bg ..
|
||||
default.gui_bg_img ..
|
||||
|
@ -152,7 +153,6 @@ minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv
|
|||
return
|
||||
end
|
||||
|
||||
local copy = ItemStack("default:book_written")
|
||||
local original
|
||||
local index
|
||||
for i = 1, player:get_inventory():get_size("craft") do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue