Minor fixes and Fix creative inventory background and other minor fixes
|
@ -81,11 +81,11 @@ local function get_formspec(tabview, name, tabdata)
|
|||
"text,align=right;" .. -- clients
|
||||
"text,align=center,padding=0.25;" .. -- "/"
|
||||
"text,align=right,padding=0.25;" .. -- clients_max
|
||||
image_column(fgettext("Creative mode"), "creative") .. ",padding=1;" ..
|
||||
image_column(fgettext("Creative mode"), "creative") .. ",padding=0.25;" ..
|
||||
image_column(fgettext("Damage enabled"), "damage") .. ",padding=0.25;" ..
|
||||
image_column(fgettext("PvP enabled"), "pvp") .. ",padding=0.25;" ..
|
||||
"color,span=1;" ..
|
||||
"text,padding=1]" ..
|
||||
"text,padding=0.25]" ..
|
||||
"table[-0.09,0.7;7,4.9;favourites;"
|
||||
|
||||
if menudata.search_result then
|
||||
|
|
|
@ -35,7 +35,7 @@ local function clean()
|
|||
for j = 1, #objs do
|
||||
local obj = objs[j]
|
||||
if not obj:is_player() then
|
||||
local entname = obj:get_entity_name()
|
||||
local entname = obj:get_luaentity()
|
||||
if not minetest.registered_entities[entname] then
|
||||
obj:remove()
|
||||
end
|
||||
|
|
|
@ -19,8 +19,8 @@ rot["combat"] = ""
|
|||
rot["matr"] = ""
|
||||
rot["brew"] = ""
|
||||
|
||||
ofs_tab["all"] = "10.08,0.84"
|
||||
ofs_tab["inv"] = "10.08,6.93"
|
||||
ofs_tab["all"] = "10.11,0.84"
|
||||
ofs_tab["inv"] = "10.11,6.93"
|
||||
ofs_tab["blocks"] = "-0.31,-0.35"
|
||||
ofs_tab["deco"] = "0.72,-0.35"
|
||||
ofs_tab["mese"] = "1.78,-0.35"
|
||||
|
@ -170,23 +170,23 @@ local function get_creative_formspec(player_name, start_i, pagenum, page, pagema
|
|||
pagenum = math.floor(pagenum) or 1
|
||||
pagemax = (pagemax and pagemax ~= 0) and pagemax or 1
|
||||
local slider_height = 4 / pagemax - 0.04
|
||||
local slider_pos = 4 / pagemax * (pagenum - 1) + 2.15
|
||||
local slider_pos = 4 / pagemax * (pagenum - 1) + 2.14
|
||||
local formspec = ""
|
||||
local main_list = "list[detached:creative_" .. player_name ..
|
||||
";main;0.01,1.69;9,5;"..tostring(start_i).."]"
|
||||
";main;0.02,1.68;9,5;"..tostring(start_i).."]"
|
||||
local name = "all"
|
||||
if page ~= nil then name = page end
|
||||
if name == "inv" then
|
||||
main_list = "image[-0.2,1.6;11.35,2.33;creative_bg.png]"..
|
||||
"image[-0.3,0.15;3,4.3;inventory_armor.png]"..
|
||||
"list[current_player;main;0.01,3.69;9,3;9]"..
|
||||
"list[current_player;main;0.02,3.68;9,3;9]"..
|
||||
"list[detached:"..player_name.."_armor;armor;0.03,1.69;1,1;]"..
|
||||
"list[detached:"..player_name.."_armor;armor;0.03,2.69;1,1;1]"..
|
||||
"list[detached:"..player_name.."_armor;armor;0.98,1.69;1,1;2]"..
|
||||
"list[detached:"..player_name.."_armor;armor;0.98,2.69;1,1;3]"
|
||||
"list[detached:"..player_name.."_armor;armor;0.99,1.69;1,1;2]"..
|
||||
"list[detached:"..player_name.."_armor;armor;0.99,2.69;1,1;3]"
|
||||
end
|
||||
local formspec = "image_button_exit[10.4,-0.1;0.75,0.75;close.png;exit;;true;true;]"..
|
||||
"background[-0.2,-0.26;11.49,8.49;inventory_creative.png]"..
|
||||
"background[-0.2,-0.26;11.55,8.49;inventory_creative.png]"..
|
||||
sfinv.gui_bg..
|
||||
sfinv.listcolors..
|
||||
"label[-5,-5;"..name.."]"..
|
||||
|
@ -195,10 +195,6 @@ local function get_creative_formspec(player_name, start_i, pagenum, page, pagema
|
|||
"image_button[1.92,-0.15;1,1;"..bg["mese"]..";mese;;;false]".. --bluestone
|
||||
"image_button[2.96,-0.15;1,1;"..bg["rail"]..";rail;;;false]".. --transportation
|
||||
"image_button[4,-0.15;1,1;"..bg["misc"]..";misc;;;false]".. --miscellaneous
|
||||
"image[0,0.95;5,0.75;fnt_"..name..".png]"..
|
||||
"list[current_player;main;0.01,6.94;9,1;]"..main_list..
|
||||
"image_button[9.10,1.69;0.8,0.6;creative_up.png;creative_prev;]"..
|
||||
"image_button[9.10,6.1;0.8,0.6;creative_down.png;creative_next;]"..
|
||||
"image_button[5.05,-0.15;1,1;"..bg["food"]..";food;;;false]".. --foodstuff
|
||||
"image_button[6.1,-0.15;1,1;"..bg["tools"]..";tools;;;false]".. --tools
|
||||
"image_button[7.15,-0.15;1,1;"..bg["combat"]..";combat;;;false]".. --combat
|
||||
|
@ -206,15 +202,19 @@ local function get_creative_formspec(player_name, start_i, pagenum, page, pagema
|
|||
"image_button[9.2,-0.15;1,1;"..bg["brew"]..";brew;;;false]".. --brewing
|
||||
"image_button[10.24,1;1,1;"..bg["all"]..";default;;;false]".. --all items
|
||||
"image_button[10.24,7.13;1,1;"..bg["inv"]..";inv;;;false]".. --inventory
|
||||
"list[detached:creative_trash;main;9.01,6.94;1,1;]"..
|
||||
"image[0,0.95;5,0.75;fnt_"..name..".png]"..
|
||||
"image_button[9.145,1.65;0.81,0.6;creative_up.png;creative_prev;]"..
|
||||
"image_button[9.145,6.08;0.81,0.6;creative_down.png;creative_next;]"..
|
||||
"list[current_player;main;0.02,6.93;9,1;]"..main_list..
|
||||
"list[detached:creative_trash;main;9.03,6.94;1,1;]"..
|
||||
"image["..ofs_tab[name]..";1.45,1.45;creative_active.png"..rot[name].."]"..
|
||||
"image["..ofs_img[name]..";1,1;"..bg[name].."]"..
|
||||
"image[9.13," .. tostring(slider_pos) .. ";0.69,"..tostring(slider_height) .. ";creative_slider.png]"
|
||||
"image[9.165," .. tostring(slider_pos) .. ";0.7,"..tostring(slider_height) .. ";creative_slider.png]"
|
||||
|
||||
if name == "all" then
|
||||
formspec = formspec .. "field_close_on_enter[search;false]"..
|
||||
"field[5.3,1.27;4,0.75;search;;]"..
|
||||
"image_button[9.09,0.93;0.82,0.82;creative_search.png;creative_search;;;false]"
|
||||
"field[5.31,1.27;4.0,0.75;search;;]"..
|
||||
"image_button[9.14,0.93;0.81,0.82;creative_search.png;creative_search;;;false]"
|
||||
end
|
||||
if pagenum ~= nil then
|
||||
formspec = formspec .. "p"..tostring(pagenum)
|
||||
|
|
Before Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.7 KiB |
|
@ -23,7 +23,7 @@ dofile(default_path.."/crafting.lua")
|
|||
dofile(default_path.."/mapgen.lua")
|
||||
dofile(default_path.."/aliases.lua")
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("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')
|
||||
|
|
|
@ -447,7 +447,7 @@ function default.register_biomes()
|
|||
node_dust = "default:snow",
|
||||
node_riverbed = "default:gravel",
|
||||
depth_riverbed = 2,
|
||||
y_max = upper_limit,
|
||||
y_max = 31000,
|
||||
y_min = 47,
|
||||
heat_point = 0,
|
||||
humidity_point = 40,
|
||||
|
@ -506,7 +506,7 @@ function default.register_biomes()
|
|||
depth_filler = 3,
|
||||
node_riverbed = "default:sand",
|
||||
depth_riverbed = 2,
|
||||
y_max = upper_limit,
|
||||
y_max = 31000,
|
||||
y_min = 4,
|
||||
heat_point = 25,
|
||||
humidity_point = 70,
|
||||
|
@ -538,7 +538,7 @@ function default.register_biomes()
|
|||
depth_filler = 1,
|
||||
node_riverbed = "default:sand",
|
||||
depth_riverbed = 2,
|
||||
y_max = upper_limit,
|
||||
y_max = 31000,
|
||||
y_min = 4,
|
||||
heat_point = 20,
|
||||
humidity_point = 35,
|
||||
|
@ -569,7 +569,7 @@ function default.register_biomes()
|
|||
depth_filler = 1,
|
||||
node_riverbed = "default:sand",
|
||||
depth_riverbed = 2,
|
||||
y_max = upper_limit,
|
||||
y_max = 31000,
|
||||
y_min = 6,
|
||||
heat_point = 50,
|
||||
humidity_point = 35,
|
||||
|
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 668 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 590 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 435 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 497 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 505 B |
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 514 B After Width: | Height: | Size: 172 B |
|
@ -46,8 +46,8 @@ local theme_main = sfinv.gui_bg ..
|
|||
sfinv.gui_bg_img
|
||||
|
||||
local theme_inv = sfinv.gui_slots .. [[
|
||||
list[current_player;main;0,4.5;9,3;9]
|
||||
list[current_player;main;0,7.74;9,1;]
|
||||
list[current_player;main;0.01,4.49;9,3;9]
|
||||
list[current_player;main;0.01,7.72;9,1;]
|
||||
]]
|
||||
|
||||
function sfinv.make_formspec(player, context, content, show_inv, size)
|
||||
|
|
|
@ -15,7 +15,7 @@ end
|
|||
function do_tnt_physics(tnt_np,tntr)
|
||||
local objs = minetest.get_objects_inside_radius(tnt_np, tntr)
|
||||
for k, obj in pairs(objs) do
|
||||
local oname = obj:get_entity_name()
|
||||
local oname = obj:get_luaentity()
|
||||
local v = obj:get_velocity()
|
||||
local p = obj:getpos()
|
||||
if oname == "tnt:tnt" then
|
||||
|
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 484 B |