Doc fix
This commit is contained in:
parent
f32ca40892
commit
9ac4477a67
|
@ -154,14 +154,10 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games" DESTINATION "${SHAREDIR}"
|
|||
if(BUILD_CLIENT)
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/textures/base/pack" DESTINATION "${SHAREDIR}/textures/base")
|
||||
endif()
|
||||
if(RUN_IN_PLACE)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/mods/mods_here.txt" DESTINATION "${SHAREDIR}/mods")
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/textures/texture_packs_here.txt" DESTINATION "${SHAREDIR}/textures")
|
||||
endif()
|
||||
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fonts" DESTINATION "${SHAREDIR}")
|
||||
|
||||
install(FILES "README.txt" DESTINATION "${DOCDIR}")
|
||||
install(FILES "README.md" DESTINATION "${DOCDIR}")
|
||||
install(FILES "doc/lua_api.txt" DESTINATION "${DOCDIR}")
|
||||
install(FILES "doc/menu_lua_api.txt" DESTINATION "${DOCDIR}")
|
||||
install(FILES "doc/world_format.txt" DESTINATION "${DOCDIR}")
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
MultiCraft Open Source Project:
|
||||
=================================
|
||||
|
||||
LGPLv3.0+, CC-BY-SA 3.0 and a little bit proprietary textures. The list in the file nearby.
|
||||
You can use these textures without restriction within MultiCraft Project.
|
||||
You can not use them in another project.
|
||||
They are an integral part of this project and created exclusively for him.
|
||||
|
||||
|
||||
--- --- ---
|
||||
|
||||
License of Minetest textures and sounds:
|
||||
=================================
|
||||
|
||||
This applies to textures and sounds contained in the main Minetest
|
||||
distribution.
|
||||
|
@ -16,8 +17,8 @@ distribution.
|
|||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
Authors of media files
|
||||
-----------------------
|
||||
Authors of media files:
|
||||
=================================
|
||||
Everything not listed in here:
|
||||
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
|
@ -26,6 +27,7 @@ erlehmann:
|
|||
misc/minetest.svg
|
||||
|
||||
License of Minetest source code:
|
||||
=================================
|
||||
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
@ -45,8 +47,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
|
||||
|
||||
Irrlicht:
|
||||
=================================
|
||||
|
||||
This program uses the Irrlicht Engine. http://irrlicht.sourceforge.net/
|
||||
|
||||
|
@ -72,8 +74,8 @@ it freely, subject to the following restrictions:
|
|||
distribution.
|
||||
|
||||
|
||||
License of media (textures and sounds)
|
||||
--------------------------------------
|
||||
License of media (textures and sounds):
|
||||
=================================
|
||||
Copyright (C) 2013 Vattic
|
||||
|
||||
http://www.minecraftforum.net/topic/72747-/
|
||||
|
@ -106,6 +108,7 @@ Vattic's Terms:
|
|||
--- --- ---
|
||||
|
||||
JThread:
|
||||
=================================
|
||||
|
||||
This program uses the JThread library. License for JThread follows:
|
||||
|
||||
|
@ -132,6 +135,7 @@ IN THE SOFTWARE.
|
|||
--- --- ---
|
||||
|
||||
Lua:
|
||||
=================================
|
||||
|
||||
Lua is licensed under the terms of the MIT license reproduced below.
|
||||
This means that Lua is free software and can be used for both academic
|
||||
|
@ -162,6 +166,7 @@ THE SOFTWARE.
|
|||
--- --- ---
|
||||
|
||||
Fonts:
|
||||
=================================
|
||||
|
||||
DejaVu Sans Mono:
|
||||
|
||||
|
@ -197,7 +202,7 @@ DroidSansFallback:
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
basis33
|
||||
basis33:
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
@ -232,7 +237,6 @@ and Amoeba <amoeba@iki.fi>
|
|||
In MultiCraft Project this code has been changed:
|
||||
I changed the drop in a few lines.
|
||||
|
||||
=================================
|
||||
|
||||
Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
|
||||
|
@ -244,7 +248,6 @@ Permission is granted to anyone to use this software for any purpose, including
|
|||
commercial applications, and to alter it and redistribute it freely, subject to the
|
||||
following restrictions:
|
||||
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software in a
|
||||
product, an acknowledgment in the product documentation is required.
|
||||
|
@ -253,3 +256,5 @@ product, an acknowledgment in the product documentation is required.
|
|||
be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
--- --- ---
|
|
@ -6,13 +6,21 @@ crafting.pages = {}
|
|||
function init()
|
||||
local inv = minetest.create_detached_inventory("creative", {
|
||||
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||
if minetest.setting_getbool("creative_mode") then
|
||||
return count
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end,
|
||||
allow_put = function(inv, listname, index, stack, player)
|
||||
return 0
|
||||
end,
|
||||
allow_take = function(inv, listname, index, stack, player)
|
||||
if minetest.setting_getbool("creative_mode") then
|
||||
return -1
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end,
|
||||
on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||
end,
|
||||
|
@ -127,7 +135,11 @@ end
|
|||
-- Create the trash field
|
||||
local trash = minetest.create_detached_inventory("creative_trash", {
|
||||
allow_put = function(inv, listname, index, stack, player)
|
||||
if minetest.setting_getbool("creative_mode") then
|
||||
return stack:get_count()
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end,
|
||||
on_put = function(inv, listname, index, stack, player)
|
||||
inv:set_stack(listname, index, "")
|
||||
|
@ -137,7 +149,7 @@ trash:set_size("main", 1)
|
|||
|
||||
|
||||
-- Create detached creative inventory after loading all mods
|
||||
minetest.after(0.5, init)
|
||||
minetest.after(0, init)
|
||||
|
||||
local offset = {}
|
||||
local hoch = {}
|
||||
|
@ -189,15 +201,15 @@ end
|
|||
crafting.set_creative_formspec = function(player, start_i, pagenum, show, page, scroll)
|
||||
reset_menu_item_bg()
|
||||
pagenum = math.floor(pagenum) or 1
|
||||
local pagemax = math.floor((crafting.creative_inventory_size-1) / (9*5) + 1)
|
||||
local slider_height = 4.15/pagemax
|
||||
local pagemax = math.floor((crafting.creative_inventory_size) / (9*5) + 1)
|
||||
local slider_height = 4/pagemax
|
||||
local slider_pos = slider_height*(pagenum-1)+2.2
|
||||
local player_name = player:get_player_name()
|
||||
crafting.start_is[player_name] = start_i
|
||||
crafting.pages[player_name] = page
|
||||
local name = "nix"
|
||||
local formspec = ""
|
||||
local main_list = "list[detached:creative;main;0,1.75;9,5;"..tostring(start_i).."]"
|
||||
local formspec = ""
|
||||
local main_list = "list[detached:creative;main;0,1.75;9,5;"..tostring(start_i).."]"
|
||||
local name = "nix"
|
||||
if page ~= nil then name = page end
|
||||
bg[name] = "crafting_creative_bg.png"
|
||||
if name == "inv" then
|
||||
|
@ -226,9 +238,8 @@ crafting.set_creative_formspec = function(player, start_i, pagenum, show, page,
|
|||
"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[9.04," .. tostring(slider_pos) .. ";0.75,"..tostring(slider_height) .. ";crafting_slider.png]"..
|
||||
"image_button[9.03,6.15;0.85,0.6;crafting_creative_down.png;creative_next;]"..
|
||||
"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
|
||||
|
@ -236,23 +247,28 @@ crafting.set_creative_formspec = function(player, start_i, pagenum, show, page,
|
|||
"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,7;1,1;crafting_creative_trash.png]"..
|
||||
|
||||
if name == "nix" then formspec = formspec .. "field[5.3,1.3;4,0.75;suche;;]" end
|
||||
if pagenum ~= nil then formspec = formspec .. "p"..tostring(pagenum) end
|
||||
|
||||
player:set_inventory_formspec(formspec)
|
||||
"image[9.04," .. tostring(slider_pos) .. ";0.78,"..tostring(slider_height) .. ";crafting_slider.png]"
|
||||
|
||||
if name == "nix" then formspec = formspec .. "field[5.3,1.3;4,0.75;suche;;]" end
|
||||
if pagenum ~= nil then formspec = formspec .. "p"..tostring(pagenum) end
|
||||
|
||||
player:set_inventory_formspec(formspec)
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
local page = nil
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
return
|
||||
end
|
||||
|
||||
if fields.bgcolor then
|
||||
-- minetest.chat_send_all("jupp")
|
||||
end
|
||||
if fields.suche ~= nil and fields.suche ~= "" then
|
||||
set_inv(string.lower(fields.suche))
|
||||
minetest.after(0.5, function()
|
||||
minetest.after(0, function()
|
||||
minetest.show_formspec(player:get_player_name(), "detached:creative", player:get_inventory_formspec())
|
||||
end)
|
||||
end
|
||||
|
@ -279,7 +295,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
if fields.default then
|
||||
set_inv("all")
|
||||
page = nil
|
||||
page = 'nix'
|
||||
end
|
||||
if fields.food then
|
||||
set_inv("#food")
|
||||
|
@ -305,36 +321,38 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
page = "brew"
|
||||
end
|
||||
|
||||
-- Figure out current page from formspec
|
||||
local current_page = 0
|
||||
local formspec = player:get_inventory_formspec()
|
||||
-- Figure out current page from formspec
|
||||
local current_page = 0
|
||||
local formspec = player:get_inventory_formspec()
|
||||
|
||||
local size = string.len(formspec)
|
||||
local marker = string.sub(formspec,size-1)
|
||||
marker = string.sub(marker,1,1)
|
||||
|
||||
local size = string.len(formspec)
|
||||
local marker = string.sub(formspec,size-2)
|
||||
marker = string.sub(marker,1)
|
||||
local player_name = player:get_player_name()
|
||||
local start_i = crafting.start_is[player_name]
|
||||
if not page then page = crafting.pages[player_name] end
|
||||
if page ~= crafting.pages[player_name] then
|
||||
start_i = 0
|
||||
end
|
||||
start_i = tonumber(start_i) or 0
|
||||
if fields.creative_prev then
|
||||
start_i = start_i - 9*5
|
||||
page = tmp_page
|
||||
end
|
||||
if fields.creative_next then
|
||||
start_i = start_i + 9*5
|
||||
page = tmp_page
|
||||
end
|
||||
if start_i < 0 then
|
||||
start_i = start_i + 9*5
|
||||
end
|
||||
if start_i >= crafting.creative_inventory_size then
|
||||
start_i = start_i - 9*5
|
||||
end
|
||||
if start_i < 0 or start_i >= crafting.creative_inventory_size then
|
||||
start_i = 0
|
||||
end
|
||||
crafting.set_creative_formspec(player, start_i, start_i / (9*5) + 1, false, page)
|
||||
--if marker ~= nil and marker == "p" then
|
||||
--local ppage = string.sub(formspec,size)
|
||||
-- print('ppage ' .. (ppage or 'nope'))
|
||||
--minetest.chat_send_all(page)
|
||||
--start_i = ppage - 1
|
||||
--end
|
||||
--start_i = tonumber(start_i) or 0
|
||||
|
||||
if fields.creative_prev then
|
||||
start_i = start_i - 9*5
|
||||
end
|
||||
if fields.creative_next
|
||||
and start_i + 9*5 <= crafting.creative_inventory_size+1 then
|
||||
start_i = start_i + 9*5
|
||||
end
|
||||
if start_i < 0 then
|
||||
start_i = 0
|
||||
end
|
||||
|
||||
crafting.set_creative_formspec(player, start_i, start_i/(9*5) +1, false, page)
|
||||
end)
|
|
@ -64,7 +64,7 @@ xgettext --package-name=MultiCraft \
|
|||
# Now iterate on all languages and create the po file if missing, or update it
|
||||
# if it exists already
|
||||
for lang in $langs ; do # note the missing quotes around $langs
|
||||
pofile=po/$lang/MultiCraft.po
|
||||
pofile=po/$lang/minetest.po
|
||||
if test -e $pofile; then
|
||||
echo "[$lang]: updating strings"
|
||||
msgmerge --update --sort-by-file $pofile $potfile
|
||||
|
|
Loading…
Reference in New Issue