4
@ -31,7 +31,7 @@ hoch["brew"] = "^[transformfy"
|
||||
hoch["matr"] = "^[transformfy"
|
||||
hoch["inv"] = "^[transformfy"
|
||||
|
||||
local dark_bg = "crafting_creative_bg_dark.png"
|
||||
local dark_bg = "creative_bg_dark.png"
|
||||
|
||||
local function reset_menu_item_bg()
|
||||
bg["blocks"] = dark_bg
|
||||
@ -161,10 +161,10 @@ local function get_creative_formspec(player_name, start_i, pagenum, page, pagema
|
||||
";main;0,1.75;9,5;"..tostring(start_i).."]"
|
||||
local name = "all"
|
||||
if page ~= nil then name = page end
|
||||
bg[name] = "crafting_creative_bg.png"
|
||||
bg[name] = "creative_bg.png"
|
||||
if name == "inv" then
|
||||
main_list = "image[-0.2,1.7;11.35,2.33;crafting_creative_bg.png]"..
|
||||
"image[-0.3,0.15;3,4.3;crafting_inventory_armor2.png]"..
|
||||
main_list = "image[-0.2,1.7;11.35,2.33;creative_bg.png]"..
|
||||
"image[-0.3,0.15;3,4.3;inventory_armor.png]"..
|
||||
"list[current_player;main;0,3.75;9,3;9]"..
|
||||
"list[detached:"..player_name.."_armor;armor;0.02,1.7;1,1;]"..
|
||||
"list[detached:"..player_name.."_armor;armor;0.02,2.7;1,1;1]"..
|
||||
@ -172,31 +172,30 @@ local function get_creative_formspec(player_name, start_i, pagenum, page, pagema
|
||||
"list[detached:"..player_name.."_armor;armor;0.98,2.7;1,1;3]"
|
||||
end
|
||||
local formspec = "image_button_exit[8.4,-0.1;0.75,0.75;close.png;exit;;true;true;]"..
|
||||
"background[-0.19,-0.25;10.5,9.87;crafting_inventory_creative.png]"..
|
||||
"background[-0.19,-0.25;10.5,9.87;inventory_creative.png]"..
|
||||
"bgcolor[#080808BB;true]"..
|
||||
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
||||
"label[-5,-5;"..name.."]"..
|
||||
"image[" .. offset[name] .. ";1.5,1.44;crafting_creative_active.png"..hoch[name].."]"..
|
||||
"image_button[-0.1,0;1,1;"..bg["blocks"].."^crafting_creative_build.png;build;]".. --build blocks
|
||||
"image_button[1.15,0;1,1;"..bg["deco"].."^crafting_creative_deko.png;deco;]".. --decoration blocks
|
||||
"image_button[2.415,0;1,1;"..bg["mese"].."^crafting_creative_mese.png;mese;]".. --bluestone
|
||||
"image_button[3.693,0;1,1;"..bg["rail"].."^crafting_creative_rail.png;rail;]".. --transportation
|
||||
"image_button[4.93,0;1,1;"..bg["misc"].."^crafting_creative_misc.png;misc;]".. --miscellaneous
|
||||
"image_button[9.19,0;1,1;"..bg["all"].."^crafting_creative_all.png;default;]".. --search
|
||||
"image[" .. offset[name] .. ";1.5,1.44;creative_active.png"..hoch[name].."]"..
|
||||
"image_button[-0.1,0;1,1;"..bg["blocks"].."^default_grass_side.png;build;]".. --build blocks
|
||||
"image_button[1.15,0;1,1;"..bg["deco"].."^creative_deko.png;deco;]".. --decoration blocks
|
||||
"image_button[2.415,0;1,1;"..bg["mese"].."^creative_mese.png;mese;]".. --bluestone
|
||||
"image_button[3.693,0;1,1;"..bg["rail"].."^rowboat_inventory.png;rail;]".. --transportation
|
||||
"image_button[4.93,0;1,1;"..bg["misc"].."^bucket_water.png;misc;]".. --miscellaneous
|
||||
"image_button[9.19,0;1,1;"..bg["all"].."^creative_all.png;default;]".. --search
|
||||
"image[0,1;5,0.75;fnt_"..name..".png]"..
|
||||
"list[current_player;main;0,7;9,1;]"..
|
||||
main_list..
|
||||
"image_button[9.03,1.74;0.85,0.6;crafting_creative_up.png;creative_prev;]"..
|
||||
"image_button[9.03,6.15;0.85,0.6;crafting_creative_down.png;creative_next;]"..
|
||||
"image_button[-0.1,8.28;1,1;"..bg["food"].."^crafting_food.png;food;]".. --foodstuff
|
||||
"image_button[1.15,8.28;1,1;"..bg["tools"].."^crafting_creative_tool.png;tools;]".. --tools
|
||||
"image_button[2.415,8.28;1,1;"..bg["combat"].."^crafting_creative_sword.png;combat;]".. --combat
|
||||
"image_button[3.693,8.28;1,1;"..bg["matr"].."^crafting_creative_matr.png;matr;]".. --brewing
|
||||
"image_button[4.93,8.28;1,1;"..bg["brew"].."^crafting_inventory_brew.png;brew;]".. --materials^
|
||||
"image_button[9.19,8.28;1,1;"..bg["inv"].."^crafting_creative_inv.png;inv;]".. --inventory
|
||||
"list[detached:creative_trash;main;9,7;1,1;]"..
|
||||
"image[9,7;1,1;crafting_creative_trash.png]"..
|
||||
"image[9.04," .. tostring(slider_pos) .. ";0.78,"..tostring(slider_height) .. ";crafting_slider.png]"
|
||||
"image_button[9.03,1.74;0.85,0.6;creative_up.png;creative_prev;]"..
|
||||
"image_button[9.03,6.15;0.85,0.6;creative_down.png;creative_next;]"..
|
||||
"image_button[-0.1,8.28;1,1;"..bg["food"].."^creative_food.png;food;]".. --foodstuff
|
||||
"image_button[1.15,8.28;1,1;"..bg["tools"].."^creative_tool.png;tools;]".. --tools
|
||||
"image_button[2.415,8.28;1,1;"..bg["combat"].."^creative_sword.png;combat;]".. --combat
|
||||
"image_button[3.693,8.28;1,1;"..bg["matr"].."^default_emerald.png;matr;]".. --brewing
|
||||
"image_button[4.93,8.28;1,1;"..bg["brew"].."^creative_brew.png;brew;]".. --materials
|
||||
"image_button[9.19,8.28;1,1;"..bg["inv"].."^creative_inv.png;inv;]".. --inventory
|
||||
"list[detached:creative_trash;main;9.02,7.02;1,1;]"..
|
||||
"image[9.04," .. tostring(slider_pos) .. ";0.78,"..tostring(slider_height) .. ";creative_slider.png]"
|
||||
|
||||
if name == "all" then
|
||||
formspec = formspec .. "field_close_on_enter[suche;false]" ..
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 346 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 634 B |
Before Width: | Height: | Size: 210 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 550 B |
BIN
games/default/files/creative/textures/creative_active.png
Normal file
After Width: | Height: | Size: 472 B |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 83 B After Width: | Height: | Size: 83 B |
Before Width: | Height: | Size: 83 B After Width: | Height: | Size: 83 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 952 B After Width: | Height: | Size: 952 B |
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 428 B |
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 648 B |
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 424 B |
Before Width: | Height: | Size: 82 B After Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 281 B After Width: | Height: | Size: 281 B |
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 181 B |
BIN
games/default/files/creative/textures/inventory_armor.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
games/default/files/creative/textures/inventory_creative.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
@ -1,7 +1,7 @@
|
||||
default.chest_formspec =
|
||||
"size[9,9.75]"..
|
||||
"image_button_exit[8.4,-0.1;0.75,0.75;close.png;exit;;true;true;]"..
|
||||
"background[-0.19,-0.25;9.41,10.48;crafting_inventory_chest.png]"..
|
||||
"background[-0.19,-0.25;9.41,10.48;formspec_chest.png]"..
|
||||
"bgcolor[#080808BB;true]"..
|
||||
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
||||
"list[current_name;main;0,0.5;9,4;]"..
|
||||
@ -23,7 +23,7 @@ function default.get_locked_chest_formspec(pos)
|
||||
local formspec =
|
||||
"size[9,9.75]"..
|
||||
"image_button_exit[8.4,-0.1;0.75,0.75;close.png;exit;;true;true;]"..
|
||||
"background[-0.19,-0.25;9.41,10.48;crafting_inventory_chest.png]"..
|
||||
"background[-0.19,-0.25;9.41,10.48;formspec_chest.png]"..
|
||||
"bgcolor[#080808BB;true]"..
|
||||
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
||||
"list[nodemeta:".. spos .. ";main;0,0.5;9,4;]"..
|
||||
|
@ -22,13 +22,10 @@ dofile(minetest.get_modpath("default").."/furnace.lua")
|
||||
dofile(minetest.get_modpath("default").."/workbench.lua")
|
||||
dofile(minetest.get_modpath("default").."/chest.lua")
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
minetest.register_on_newplayer(function (player)
|
||||
player:get_inventory():add_item('main', 'default:sword_steel')
|
||||
player:get_inventory():add_item('main', 'default:torch 8')
|
||||
player:get_inventory():add_item('main', 'default:wood 64')
|
||||
end)
|
||||
|
||||
-- GUI related stuff
|
||||
default.gui_bg = "bgcolor[#080808BB;true]"
|
||||
default.gui_bg_img = "background[5,5;1,1;gui_formbg.png;true]"
|
||||
default.gui_slots = "listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
end
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@ -146,7 +146,7 @@ local function fill_chest(pos)
|
||||
if n and n.name and n.name == "default:chest" then
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
--inv:set_size("main", 8*4)
|
||||
for i,v in ipairs(dungeon_loot.loot_types) do
|
||||
local item, num = get_item_and_amount(v,pos.y)
|
||||
if item then
|
||||
|
@ -28,11 +28,11 @@ local function drop_fields(player, name)
|
||||
end
|
||||
end
|
||||
|
||||
sfinv.override_page("sfinv:crafting", {
|
||||
title = "Crafting",
|
||||
sfinv.override_page("sfinv:inventory", {
|
||||
title = "Inventory",
|
||||
get = function(self, player, context)
|
||||
local form = [[
|
||||
background[-0.19,-0.25;9.41,9.49;crafting_gui_formbg.png]
|
||||
background[-0.19,-0.25;9.41,9.49;formspec_inventory.png]
|
||||
listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]
|
||||
list[current_player;craft;4,1;2,1;1]
|
||||
list[current_player;craft;4,2;2,1;4]
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
@ -22,7 +22,7 @@ local function create_detached_inventory(id)
|
||||
return count
|
||||
end,
|
||||
})
|
||||
inv:set_size("main", 32)
|
||||
--inv:set_size("main", 32)
|
||||
return inv
|
||||
end
|
||||
|
||||
|
@ -63,7 +63,7 @@ function sfinv.make_formspec(player, context, content, show_inv, size)
|
||||
end
|
||||
|
||||
function sfinv.get_homepage_name(player)
|
||||
return "sfinv:crafting"
|
||||
return "sfinv:inventory"
|
||||
end
|
||||
|
||||
function sfinv.get_formspec(player, context)
|
||||
|
@ -1,7 +1,7 @@
|
||||
dofile(minetest.get_modpath("sfinv") .. "/api.lua")
|
||||
|
||||
sfinv.register_page("sfinv:crafting", {
|
||||
title = "Crafting",
|
||||
sfinv.register_page("sfinv:inventory", {
|
||||
title = "Inventory",
|
||||
get = function(self, player, context)
|
||||
return sfinv.make_formspec(player, context, [[
|
||||
list[current_player;craft;1.75,0.5;3,3;]
|
||||
|
Before Width: | Height: | Size: 3.4 KiB |