Minor upd menu, tmp fix sign_wall
|
@ -60,7 +60,7 @@ local function get_bg(tsize, tabname)
|
||||||
tabname = tabname or "common"
|
tabname = tabname or "common"
|
||||||
return "background[0,0;" .. tsize.width .. "," .. tsize.height .. ";" ..
|
return "background[0,0;" .. tsize.width .. "," .. tsize.height .. ";" ..
|
||||||
core.formspec_escape(defaulttexturedir ..
|
core.formspec_escape(defaulttexturedir ..
|
||||||
"multicraft_" .. tabname .. "_bg.png") .. ";true]"
|
"bg_" .. tabname .. ".png") .. ";true]"
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
|
@ -31,22 +31,22 @@ local function get_formspec(tabview, name, tabdata)
|
||||||
)
|
)
|
||||||
|
|
||||||
retval = retval ..
|
retval = retval ..
|
||||||
"image_button[0,4.8;3.375,0.9;" ..
|
"image_button[0,4.84;3.31,0.92;" ..
|
||||||
core.formspec_escape(defaulttexturedir ..
|
core.formspec_escape(defaulttexturedir ..
|
||||||
"multicraft_local_delete_btn.png") .. ";world_delete;;true;false]" ..
|
"blank.png") .. ";world_delete;;true;false]" ..
|
||||||
"image_button[3.12,4.8;3.375,0.9;" ..
|
"image_button[3.14,4.84;3.3,0.92;" ..
|
||||||
core.formspec_escape(defaulttexturedir ..
|
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")
|
local creative_mode = core.settings:get_bool("creative_mode")
|
||||||
|
|
||||||
retval = retval ..
|
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 ..
|
core.formspec_escape(defaulttexturedir ..
|
||||||
"multicraft_local_play_btn.png") .. ";play;;true;false]" ..
|
"blank.png") .. ";play;;true;false]" ..
|
||||||
"image_button[7.5,3.15;3.8,0.95;" ..
|
"image_button[7.33,3.09;3.73,0.86;" ..
|
||||||
core.formspec_escape(defaulttexturedir ..
|
core.formspec_escape(defaulttexturedir ..
|
||||||
"multicraft_local_creative_" ..
|
"local_creative_" ..
|
||||||
tostring(creative_mode) .. "_btn.png") ..
|
tostring(creative_mode) .. "_btn.png") ..
|
||||||
";cb_creative_mode;;true;false]" ..
|
";cb_creative_mode;;true;false]" ..
|
||||||
"textlist[0,0;6.24,4.6;sp_worlds;" ..
|
"textlist[0,0;6.24,4.6;sp_worlds;" ..
|
||||||
|
|
|
@ -33,8 +33,10 @@ local function get_formspec(tabview, name, tabdata)
|
||||||
|
|
||||||
local retval =
|
local retval =
|
||||||
-- Search
|
-- Search
|
||||||
"field[0.15,0.5;6.05,0.27;te_search;;"..core.formspec_escape(tabdata.search_for).."]"..
|
"field[0.15,0.075;5.91,1;te_search;;" .. core.formspec_escape(tabdata.search_for) .. "]" ..
|
||||||
"button[5.8,0.25;2,0.1;btn_mp_search;" .. fgettext("Search") .. "]" ..
|
"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
|
-- Address / Port
|
||||||
"label[7.75,-0.25;" .. 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
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if fields.btn_mp_refresh then
|
||||||
|
asyncOnlineFavourites()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
if (fields.btn_mp_connect or fields.key_enter)
|
if (fields.btn_mp_connect or fields.key_enter)
|
||||||
and fields.te_address ~= "" and fields.te_port then
|
and fields.te_address ~= "" and fields.te_port then
|
||||||
gamedata.playername = fields.te_name
|
gamedata.playername = fields.te_name
|
||||||
|
|
|
@ -71,3 +71,6 @@ minetest.register_alias("default:pinewood", "default:pine_wood")
|
||||||
minetest.register_alias("default:gold_nugget", "default:gold_ingot")
|
minetest.register_alias("default:gold_nugget", "default:gold_ingot")
|
||||||
-- Sandstone Carved
|
-- Sandstone Carved
|
||||||
minetest.register_alias("default:sandstonecarved", "default:sandstonesmooth")
|
minetest.register_alias("default:sandstonecarved", "default:sandstonesmooth")
|
||||||
|
|
||||||
|
-- Sign
|
||||||
|
minetest.register_alias("signs:sign_wall", "default:sign_wall_wood")
|
||||||
|
|
|
@ -63,7 +63,7 @@ minetest.register_craft({
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'signs:sign_wall',
|
output = 'default:sign_wall_wood 3',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'group:wood', 'group:wood', 'group:wood'},
|
{'group:wood', 'group:wood', 'group:wood'},
|
||||||
{'group:wood', 'group:wood', 'group:wood'},
|
{'group:wood', 'group:wood', 'group:wood'},
|
||||||
|
|
|
@ -425,7 +425,6 @@ minetest.register_node("default:haybale", {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Trees
|
-- Trees
|
||||||
--
|
--
|
||||||
|
@ -447,7 +446,8 @@ minetest.register_node("default:wood", {
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
tiles = {"default_wood.png"},
|
tiles = {"default_wood.png"},
|
||||||
is_ground_content = false,
|
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(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -878,6 +878,55 @@ minetest.register_node("default:bookshelf", {
|
||||||
sounds = default.node_sound_wood_defaults(),
|
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", {
|
minetest.register_node("default:slimeblock", {
|
||||||
description = "Slime Block",
|
description = "Slime Block",
|
||||||
drawtype = "nodebox",
|
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", {
|
minetest.register_node("default:cloud", {
|
||||||
description = "Cloud",
|
description = "Cloud",
|
||||||
tiles = {"default_cloud.png"},
|
tiles = {"default_cloud.png"},
|
||||||
|
@ -1912,4 +1952,4 @@ minetest.register_node("default:snowblock", {
|
||||||
footstep = {name="default_grass_footstep", gain=0.4},
|
footstep = {name="default_grass_footstep", gain=0.4},
|
||||||
}),
|
}),
|
||||||
drop = "default:snow 4",
|
drop = "default:snow 4",
|
||||||
})
|
})
|
After Width: | Height: | Size: 509 B |
After Width: | Height: | Size: 555 B |
After Width: | Height: | Size: 715 B |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 95 B |
After Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 702 B |
Before Width: | Height: | Size: 1001 B |
Before Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 532 B |
Before Width: | Height: | Size: 393 B |
Before Width: | Height: | Size: 463 B |
After Width: | Height: | Size: 614 B |