Minor upd menu, tmp fix sign_wall

master
MoNTE48 2018-07-20 14:32:08 +02:00
parent f1ac8c101d
commit 4b7b744bf7
20 changed files with 74 additions and 24 deletions

View File

@ -60,7 +60,7 @@ local function get_bg(tsize, tabname)
tabname = tabname or "common"
return "background[0,0;" .. tsize.width .. "," .. tsize.height .. ";" ..
core.formspec_escape(defaulttexturedir ..
"multicraft_" .. tabname .. "_bg.png") .. ";true]"
"bg_" .. tabname .. ".png") .. ";true]"
end
--------------------------------------------------------------------------------

View File

@ -31,22 +31,22 @@ local function get_formspec(tabview, name, tabdata)
)
retval = retval ..
"image_button[0,4.8;3.375,0.9;" ..
"image_button[0,4.84;3.31,0.92;" ..
core.formspec_escape(defaulttexturedir ..
"multicraft_local_delete_btn.png") .. ";world_delete;;true;false]" ..
"image_button[3.12,4.8;3.375,0.9;" ..
"blank.png") .. ";world_delete;;true;false]" ..
"image_button[3.14,4.84;3.3,0.92;" ..
core.formspec_escape(defaulttexturedir ..
"multicraft_local_new_btn.png") .. ";world_create;;true;false]"
"blank.png") .. ";world_create;;true;false]"
local creative_mode = core.settings:get_bool("creative_mode")
retval = retval ..
"image_button[6.8,1.5;5,1.3;" ..
"image_button[6.72,1.43;4.96,1.41;" ..
core.formspec_escape(defaulttexturedir ..
"multicraft_local_play_btn.png") .. ";play;;true;false]" ..
"image_button[7.5,3.15;3.8,0.95;" ..
"blank.png") .. ";play;;true;false]" ..
"image_button[7.33,3.09;3.73,0.86;" ..
core.formspec_escape(defaulttexturedir ..
"multicraft_local_creative_" ..
"local_creative_" ..
tostring(creative_mode) .. "_btn.png") ..
";cb_creative_mode;;true;false]" ..
"textlist[0,0;6.24,4.6;sp_worlds;" ..

View File

@ -33,8 +33,10 @@ local function get_formspec(tabview, name, tabdata)
local retval =
-- Search
"field[0.15,0.5;6.05,0.27;te_search;;"..core.formspec_escape(tabdata.search_for).."]"..
"button[5.8,0.25;2,0.1;btn_mp_search;" .. fgettext("Search") .. "]" ..
"field[0.15,0.075;5.91,1;te_search;;" .. core.formspec_escape(tabdata.search_for) .. "]" ..
"button[5.62,-0.25;1.5,1;btn_mp_search;" .. fgettext("Search") .. "]" ..
"image_button[6.97,-.165;.83,.83;" .. core.formspec_escape(defaulttexturedir .. "refresh.png")
.. ";btn_mp_refresh;" .. fgettext("") .. "]" ..
-- Address / Port
"label[7.75,-0.25;" .. fgettext("Address / Port") .. "]" ..
@ -299,6 +301,11 @@ local function main_button_handler(tabview, fields, name, tabdata)
return true
end
if fields.btn_mp_refresh then
asyncOnlineFavourites()
return true
end
if (fields.btn_mp_connect or fields.key_enter)
and fields.te_address ~= "" and fields.te_port then
gamedata.playername = fields.te_name

View File

@ -71,3 +71,6 @@ minetest.register_alias("default:pinewood", "default:pine_wood")
minetest.register_alias("default:gold_nugget", "default:gold_ingot")
-- Sandstone Carved
minetest.register_alias("default:sandstonecarved", "default:sandstonesmooth")
-- Sign
minetest.register_alias("signs:sign_wall", "default:sign_wall_wood")

View File

@ -63,7 +63,7 @@ minetest.register_craft({
})
minetest.register_craft({
output = 'signs:sign_wall',
output = 'default:sign_wall_wood 3',
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'group:wood', 'group:wood', 'group:wood'},

View File

@ -425,7 +425,6 @@ minetest.register_node("default:haybale", {
})
--
-- Trees
--
@ -447,7 +446,8 @@ minetest.register_node("default:wood", {
stack_max = 64,
tiles = {"default_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1, building = 1},
sounds = default.node_sound_wood_defaults(),
})
@ -878,6 +878,55 @@ minetest.register_node("default:bookshelf", {
sounds = default.node_sound_wood_defaults(),
})
local function register_sign(material, desc, def)
minetest.register_node("default:sign_wall_" .. material, {
description = desc .. " Sign",
drawtype = "nodebox",
tiles = {"default_sign_wall_" .. material .. ".png"},
inventory_image = "default_sign_" .. material .. ".png",
wield_image = "default_sign_" .. material .. ".png",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
is_ground_content = false,
walkable = false,
node_box = {
type = "wallmounted",
wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
},
groups = def.groups,
legacy_wallmounted = true,
sounds = def.sounds,
on_construct = function(pos)
--local n = minetest.get_node(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[text;;${text}]")
end,
on_receive_fields = function(pos, formname, fields, sender)
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
local player_name = sender:get_player_name()
if minetest.is_protected(pos, player_name) then
minetest.record_protection_violation(pos, player_name)
return
end
local meta = minetest.get_meta(pos)
if not fields.text then return end
minetest.log("action", (player_name or "") .. " wrote \"" ..
fields.text .. "\" to sign at " .. minetest.pos_to_string(pos))
meta:set_string("text", fields.text)
meta:set_string("infotext", '"' .. fields.text .. '"')
end,
})
end
register_sign("wood", "Wooden", {
sounds = default.node_sound_wood_defaults(),
groups = {choppy = 2, attached_node = 1, flammable = 2, oddly_breakable_by_hand = 3}
})
minetest.register_node("default:slimeblock", {
description = "Slime Block",
drawtype = "nodebox",
@ -989,15 +1038,6 @@ minetest.register_node("default:vine", {
})
minetest.register_node("default:wood", {
description = "Wooden Planks",
tiles = {"default_wood.png"},
stack_max = 64,
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1, building = 1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("default:cloud", {
description = "Cloud",
tiles = {"default_cloud.png"},
@ -1912,4 +1952,4 @@ minetest.register_node("default:snowblock", {
footstep = {name="default_grass_footstep", gain=0.4},
}),
drop = "default:snow 4",
})
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

BIN
textures/base/bg_common.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

BIN
textures/base/bg_local.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

BIN
textures/base/refresh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B