diff --git a/enchanting.lua b/enchanting.lua index a6d94c8..42f6cac 100644 --- a/enchanting.lua +++ b/enchanting.lua @@ -3,17 +3,34 @@ screwdriver = screwdriver or {} function enchanting.formspec(pos, tooltype) local meta = minetest.get_meta(pos) - local formspec = "size[9,9;]"..default.gui_slots..default.get_hotbar_bg(0.5,4.5).. - "bgcolor[#080808BB;true]background[0,0;9,9;ench_ui.png]list[context;tool;0.9,2.9;1,1;]list[context;mese;2,2.9;1,1;]image[2,2.9;1,1;mese_layout.png]list[current_player;main;0.5,4.5;8,4;]tooltip[sharp;Your sword kills faster]tooltip[durable;Your tool lasts longer]tooltip[fast;Your tool digs faster]tooltip[strong;Your armor is more resistant]tooltip[speed;Your speed is increased]" + local formspec = "size[9,9;]".. + default.gui_slots..default.get_hotbar_bg(0.5,4.5).. + "bgcolor[#080808BB;true]".. + "background[0,0;9,9;ench_ui.png]".. + "list[context;tool;0.9,2.9;1,1;]".. + "list[context;mese;2,2.9;1,1;]".. + "image[2,2.9;1,1;mese_layout.png]".. + "list[current_player;main;0.5,4.5;8,4;]".. + "tooltip[sharp;Your sword kills faster]".. + "tooltip[durable;Your tool lasts longer]".. + "tooltip[fast;Your tool digs faster]".. + "tooltip[strong;Your armor is more resistant]".. + "tooltip[speed;Your speed is increased]" if tooltype == "sword" then - formspec = formspec.."image_button[3.9,2.9;4,0.92;bg_btn.png;sharp;Sharpness]" + formspec = formspec.. + "image_button[3.9,2.9;4,0.92;bg_btn.png;sharp;Sharpness]" elseif tooltype == "tool" then - formspec = formspec.."image_button[3.9,0.85;4,0.92;bg_btn.png;fast;Efficiency]image_button[3.9,1.77;4,1.12;bg_btn.png;durable;Durability]" + formspec = formspec.. + "image_button[3.9,0.85;4,0.92;bg_btn.png;fast;Efficiency]".. + "image_button[3.9,1.77;4,1.12;bg_btn.png;durable;Durability]" elseif tooltype == "armor" then - formspec = formspec.."image_button[3.9,0.85;4,0.92;bg_btn.png;strong;Strength]" + formspec = formspec.. + "image_button[3.9,0.85;4,0.92;bg_btn.png;strong;Strength]" elseif tooltype == "boots" then - formspec = formspec.."image_button[3.9,0.85;4,0.92;bg_btn.png;strong;Strength]image_button[3.9,1.77;4,1.12;bg_btn.png;speed;Speed]" + formspec = formspec.. + "image_button[3.9,0.85;4,0.92;bg_btn.png;strong;Strength]".. + "image_button[3.9,1.77;4,1.12;bg_btn.png;speed;Speed]" end meta:set_string("formspec", formspec) @@ -202,7 +219,6 @@ for _, ench in pairs(tooldef[3]) do end end minetest.register_alias("xdecor:enchanted_"..tool.."_"..material.."_"..enchant, mod..":enchanted_"..tool.."_"..material.."_"..enchant) - minetest.register_alias(":"..mod..":enchanted_"..tool.."_"..material.."_"..enchant, mod..":enchanted_"..tool.."_"..material.."_"..enchant) end end end diff --git a/hive.lua b/hive.lua index 9dc377b..2bb12ed 100644 --- a/hive.lua +++ b/hive.lua @@ -6,7 +6,11 @@ function hive.construct(pos) local xbg = default.gui_bg..default.gui_bg_img..default.gui_slots..default.get_hotbar_bg(0,1.35) local formspec = "size[8,5;]"..xbg.. - "label[1.35,0;Bees are making honey\nwith pollen around...]image[6,0;1,1;hive_bee.png]image[5,0;1,1;hive_layout.png]list[context;honey;5,0;1,1;]list[current_player;main;0,1.35;8,4;]" + "label[1.35,0;Bees are making honey\nwith pollen around...]".. + "image[6,0;1,1;hive_bee.png]".. + "image[5,0;1,1;hive_layout.png]".. + "list[context;honey;5,0;1,1;]".. + "list[current_player;main;0,1.35;8,4;]" meta:set_string("formspec", formspec) meta:set_string("infotext", "Artificial Hive") diff --git a/mailbox.lua b/mailbox.lua index 02f8b93..33be796 100644 --- a/mailbox.lua +++ b/mailbox.lua @@ -102,8 +102,10 @@ function mailbox.formspec(pos, owner, num) end end - return "size[9.5,9]"..xbg..default.get_hotbar_bg(0.75,5.25).. - "label[0,0;Mailbox :]label[6,0;Last donators :]".. + return "size[9.5,9]"..xbg.. + default.get_hotbar_bg(0.75,5.25).. + "label[0,0;Mailbox :]".. + "label[6,0;Last donators :]".. "tablecolumns[color;text;image,".. "1="..img_col(def_stack1)..",".. "2="..img_col(def_stack2)..",".. @@ -117,7 +119,8 @@ function mailbox.formspec(pos, owner, num) "list[nodemeta:"..spos..";mailbox;0,0.75;6,4;]".. "list[current_player;main;0.75,5.25;8,4;]" else - return "size[8,5]"..xbg..default.get_hotbar_bg(0,1.25).. + return "size[8,5]"..xbg.. + default.get_hotbar_bg(0,1.25).. "label[0.5,0;Send your goods\nto "..owner.." :]".. "list[nodemeta:"..spos..";drop;3.5,0;1,1;]".. "list[current_player;main;0,1.25;8,4;]" diff --git a/worktable.lua b/worktable.lua index c0e82b6..0c9ba1b 100644 --- a/worktable.lua +++ b/worktable.lua @@ -36,13 +36,18 @@ local def = { -- Nodebox name, yield, definition. function worktable.crafting() return "size[8,7;]"..xbg.. - "list[current_player;main;0,3.3;8,4;]image[5,1;1,1;gui_furnace_arrow_bg.png^[transformR270]list[current_player;craft;2,0;3,3;]list[current_player;craftpreview;6,1;1,1;]" + "list[current_player;main;0,3.3;8,4;]".. + "image[5,1;1,1;gui_furnace_arrow_bg.png^[transformR270]".. + "list[current_player;craft;2,0;3,3;]".. + "list[current_player;craftpreview;6,1;1,1;]" end function worktable.storage(pos) local inv = minetest.get_meta(pos):get_inventory() inv:set_size("storage", 8*2) - return "size[8,7]"..xbg.."list[context;storage;0,0;8,2;]list[current_player;main;0,3.25;8,4;]" + return "size[8,7]"..xbg.. + "list[context;storage;0,0;8,2;]".. + "list[current_player;main;0,3.25;8,4;]" end function worktable.construct(pos) @@ -50,7 +55,20 @@ function worktable.construct(pos) local inv = meta:get_inventory() local formspec = "size[8,7;]"..xbg.. - "list[context;forms;4,0;4,3;]label[0.95,1.23;Cut]box[-0.05,1;2.05,0.9;#555555]image[3,1;1,1;gui_furnace_arrow_bg.png^[transformR270]label[0.95,2.23;Repair]box[-0.05,2;2.05,0.9;#555555]image[0,1;1,1;worktable_saw.png]image[0,2;1,1;worktable_anvil.png]image[3,2;1,1;hammer_layout.png]list[context;input;2,1;1,1;]list[context;tool;2,2;1,1;]list[context;hammer;3,2;1,1;]button[0,0;2,1;craft;Crafting]button[2,0;2,1;storage;Storage]list[current_player;main;0,3.25;8,4;]" + "list[context;forms;4,0;4,3;]".. + "label[0.95,1.23;Cut]".. + "box[-0.05,1;2.05,0.9;#555555]".. + "image[3,1;1,1;gui_furnace_arrow_bg.png^[transformR270]".. + "label[0.95,2.23;Repair]box[-0.05,2;2.05,0.9;#555555]".. + "image[0,1;1,1;worktable_saw.png]".. + "image[0,2;1,1;worktable_anvil.png]".. + "image[3,2;1,1;hammer_layout.png]".. + "list[context;input;2,1;1,1;]".. + "list[context;tool;2,2;1,1;]".. + "list[context;hammer;3,2;1,1;]".. + "button[0,0;2,1;craft;Crafting]".. + "button[2,0;2,1;storage;Storage]".. + "list[current_player;main;0,3.25;8,4;]" inv:set_size("forms", 4*3) inv:set_size("input", 1)