From 6c6cc2159aaf678068c8d771282ec5614b50f84a Mon Sep 17 00:00:00 2001 From: paramat Date: Thu, 3 Mar 2016 03:41:50 +0000 Subject: [PATCH] Default/craftitems: Fix whitespace and code style issues --- mods/default/craftitems.lua | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/mods/default/craftitems.lua b/mods/default/craftitems.lua index c096f7f..09ebecc 100644 --- a/mods/default/craftitems.lua +++ b/mods/default/craftitems.lua @@ -3,7 +3,7 @@ minetest.register_craftitem("default:stick", { description = "Stick", inventory_image = "default_stick.png", - groups = {stick=1}, + groups = {stick = 1}, }) minetest.register_craftitem("default:paper", { @@ -20,20 +20,20 @@ local function book_on_use(itemstack, user, pointed_thing) end local formspec if owner == player_name then - formspec = "size[8,8]"..default.gui_bg.. - default.gui_bg_img.. - "field[0.5,1;7.5,0;title;Title:;".. - minetest.formspec_escape(title).."]".. - "textarea[0.5,1.5;7.5,7;text;Contents:;".. - minetest.formspec_escape(text).."]".. + formspec = "size[8,8]" .. default.gui_bg .. + default.gui_bg_img .. + "field[0.5,1;7.5,0;title;Title:;" .. + minetest.formspec_escape(title) .. "]" .. + "textarea[0.5,1.5;7.5,7;text;Contents:;" .. + minetest.formspec_escape(text) .. "]" .. "button_exit[2.5,7.5;3,1;save;Save]" else - formspec = "size[8,8]"..default.gui_bg.. - default.gui_bg_img.. - "label[0.5,0.5;by "..owner.."]".. - "label[0.5,0;"..minetest.formspec_escape(title).."]".. - "textarea[0.5,1.5;7.5,7;text;;".. - minetest.formspec_escape(text).."]" + formspec = "size[8,8]" .. default.gui_bg .. + default.gui_bg_img .. + "label[0.5,0.5;by " .. owner .. "]" .. + "label[0.5,0;" .. minetest.formspec_escape(title) .. "]" .. + "textarea[0.5,1.5;7.5,7;text;;" .. + minetest.formspec_escape(text) .. "]" end minetest.show_formspec(user:get_player_name(), "default:book", formspec) end @@ -78,14 +78,14 @@ end) minetest.register_craftitem("default:book", { description = "Book", inventory_image = "default_book.png", - groups = {book=1}, + groups = {book = 1}, on_use = book_on_use, }) minetest.register_craftitem("default:book_written", { description = "Book With Text", inventory_image = "default_book_written.png", - groups = {book=1, not_in_creative_inventory=1}, + groups = {book = 1, not_in_creative_inventory = 1}, stack_max = 1, on_use = book_on_use, }) @@ -93,7 +93,7 @@ minetest.register_craftitem("default:book_written", { minetest.register_craft({ type = "shapeless", output = "default:book_written", - recipe = { "default:book", "default:book_written" } + recipe = {"default:book", "default:book_written"} }) minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)