master
runs 2020-07-30 00:11:29 +02:00
parent ac74751c00
commit b714c7c4ce
904 changed files with 1045 additions and 595 deletions

11
mods/3d_armor/.gitignore vendored Normal file
View File

@ -0,0 +1,11 @@
## Generic ignorable patterns and files
*~
.*.swp
*bak*
tags
*.vim
armor.conf
## Eclipse project files & directories
.project
.settings

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -77,7 +77,7 @@ minetest.register_node("crops:corn_base_seed", {
walkable = false,
sunlight_propagates = true,
paramtype = "light",
groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 },
groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
drop = {},
sounds = default.node_sound_leaves_defaults(),
selection_box = {

View File

@ -55,6 +55,8 @@ function enchantz.formspec(pos, num)
local formspec = "size[9,9;]"..
"bgcolor[#080808BB;true]"..
"background[0,0;9,9;enchantz_ui.png]"..
"label[0.9,2.5;"..S("Item").."]"..
"label[2,2.5;"..S("Mese").."]"..
"list[context;tool;0.9,2.9;1,1;]"..
"list[context;mese;2,2.9;1,1;]"..
"list[current_player;main;0.5,4.5;8,4;]"..

View File

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 407 B

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 846 B

After

Width:  |  Height:  |  Size: 846 B

View File

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 668 B

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 343 B

After

Width:  |  Height:  |  Size: 343 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

2
mods/guidebooks/.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

41
mods/guidebooks/.gitignore vendored Normal file
View File

@ -0,0 +1,41 @@
# Compiled Lua sources
luac.out
# luarocks build files
*.src.rock
*.zip
*.tar.gz
# Object files
*.o
*.os
*.ko
*.obj
*.elf
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
*.def
*.exp
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

View File

@ -0,0 +1,71 @@
guidebooks (c) by PolySaken
guidebooks is licensed under a
Creative Commons Attribution-ShareAlike 4.0 International License.
You should have received a copy of the license along with this
work. If not, see http://creativecommons.org/licenses/by-sa/4.0/
-- API --
- Creating a new book
guideBooks.Common.register_guideBook("modname:itemname", { --modname is the name of your mod, itemname is whatever you want
description_short="Book", -- The name of your book
description_long="A book about books", -- an optional field to give your book an extra description
inventory_image="modname_book.png", -- The image of the book when in the inventory
wield_image="modname_book_wield.png", -- An optional image of the book when in the hand
style={ -- a table of values that describe how your book looks
cover={ --- The very first page of your book
w=5, ---- how wide should the cover be?
h=8, ---- how tall should the cover be?
bg="modname_cover.png", ---- the file name of an image to use for the cover
next="modname_next.png" ---- the filename of an image to use for the 'next page' button
},
page={ --- The generic page style
w=10, ---- How wide is the book? (2*cover width works best)
h=8, ---- How tall is the book? (usually same as cover height)
bg="modname_bg.png", ---- the background image for the open book
next="modname_next.png", ---- the filename of an image to use for the 'next page' button
prev="modname_prev.png", ---- the filename of an image to use for the 'previous page' button
start="modname_start.png" ---- the filename of an image to use for the 'first page' button
},
buttonGeneric="modname_button.png", --- A generic button image
},
ptype=false, -- When true, the book will only display text1 on each page
})
-- Adding a section
currently a maximum of 28 sections per index is supported, meaning a book can store 784 sections if all of the sections in the main index are masters.
(this can be circumvented by building custom directories using the 'extra' field of a page, but is not recommended)
guideBooks.Common.register_section(
"modname:itemname", -- The name of a registered book
"section_1", -- The name to give the section, only string values supported
{ -- A list of preset values (you could also put page definitions here.)
description="Section 1", --- The display name of the section
hidden=false, --- Whether the section is visible in the main index (set to true to hide)
master=false, --- Whether this section leads to an index (set to true to create a new index under this section)
slave=false, --- Set to false to show in the main index, set to the name of another section to show in that index. cannot be used with master=true
Pages={ --- The pages to preload into the section (use only for certain instances when required)
Index={} ---- A special page used only by the 'Main' section that loads after the cover
},
locked=false --- If this is true, only players with the meta field <bookItem>:<sectionName>:unlocked=="true" will be able to see this section
}
)
The sections 'Hidden' and 'Main' exist in any book by default
-- adding pages
guideBooks.Common.register_page(
"modname:itemname", -- The name of a registered book
"section_1", -- The name of a section in the book
1, -- the page number (or name in the case of special pages such as Index)
{ -- content definition
text1="foo bar", --- the text to display on the first half of the page
text2="lorem ipsum dolor sit amet", --- the text to display on the second half of the page
extra="background[0,0;5,8;modname_image.png;false]" --- A minetest formspec string used to add extra content to a page, such as an image
}
)
The page 'Index' exists in the 'Main' section by default but can be overriden.

304
mods/guidebooks/init.lua Normal file
View File

@ -0,0 +1,304 @@
-- API Documentation can be found in README.txt
guideBooks = {}
local c = {}
guideBooks.registered = {}
guideBooks.indices = {}
guideBooks.locks={}
local genSecList=function(reg, meta, reader, book, def)
if not reg.sections.Main.Pages.Index.registered then
local y=-0.1
local x=1
local num=0
local form=reg.pageTmp
for _,v in pairs(reg.sectionOrder) do
local _ = v
local v= reg.sections[_]
if _ ~= "Main" and _ ~= "Hidden" and not v.hidden and not v.slave and v.isUnLocked(reader, book:get_name(), _) then
if def.ptype then
if v.master then
form=form.."style[gotoM_".._..";border=false]image_button["..x..","..y..";"..((def.style.page.w)-2)..",0.7;"..def.style.buttonGeneric..";gotoM_".._..";"..(v.description or _).."]"
y=y+0.6
num=num+1
else
form=form.."style[goto_".._..";border=false]image_button["..x..","..y..";"..((def.style.page.w)-2)..",0.7;"..def.style.buttonGeneric..";goto_".._..";"..(v.description or _).."]"
y=y+0.6
num=num+1
end
else
if v.master then
form=form.."style[gotoM_".._..";border=false]image_button["..x..","..y..";"..((def.style.page.w/2)-2)..",0.5;"..def.style.buttonGeneric..";gotoM_".._..";"..(v.description or _).."]"
y=y+0.6
num=num+1
if num>13 then x=(def.style.page.w/2)+1 y=-0.1 num=0 end
else
form=form.."style[goto_".._..";border=false]image_button["..x..","..y..";"..((def.style.page.w/2)-2)..",0.5;"..def.style.buttonGeneric..";goto_".._..";"..(v.description or _).."]"
y=y+0.6
num=num+1
if num>13 then x=(def.style.page.w/2)+1 y=-0.1 num=0 end
end
end
end
end
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form)
meta:set_string("guidebooks:place", "Main:Index")
else
local form=reg.sections.Main.Pages.Index.form
if reg.sections.Main.Pages.Index.text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w/2)-1)..","..(def.style.page.h-1)..";;;"..reg.sections.Main.Pages.Index.text1.."]" end
if reg.sections.Main.Pages.Index.text2 then form=form.."textarea["..((def.style.page.w/2)+0.5)..",0.5;"..((def.style.page.w/2)-0.5)..","..(def.style.page.h-1)..";;;"..reg.sections.Main.Pages.Index.text2.."]" end
form=form..reg.prevTmp
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form)
meta:set_string("guidebooks:place", "Main:Index")
end
end
c.register_guideBook = function(name, def)
local _def = {}
_def.ptype=def.ptype or false
_def.description=def.description_short or string.split(name, ":")[1].." Guidebook"
if def.description_long then _def.description=_def.description.."\n"..def.description_long end
_def.inventory_image=def.inventory_image or "guidebooks_book.png"
_def.wield_image=def.wield_image or _def.inventory_image
_def.stack_max=1
_def.style={}
if def.style.cover then
_def.style.cover={w=def.style.cover.w or 5, h=def.style.cover.h or 8, bg=def.style.cover.bg or "guidebooks_cover.png", next=def.style.cover.next or "guidebooks_nxtBtn.png"}
else
_def.style.cover={w=5, h=8, bg="guidebooks_cover.png", next="guidebooks_nxtBtn.png"}
end
if def.style.page then
_def.style.page={w=def.style.page.w or 10, h=def.style.page.h or 8, bg=def.style.page.bg or "guidebooks_bg.png", next=def.style.page.next or "guidebooks_nxtBtn.png", prev=def.style.page.prev or "guidebooks_prvBtn.png", begn=def.style.page.start or "guidebooks_bgnBtn.png"}
else
_def.style.page= {w=10, h=8, bg="guidebooks_bg.png", next="guidebooks_nxtBtn.png", prev="guidebooks_prvBtn.png", begn="guidebooks_bgnBtn.png"}
end
_def.style.buttonGeneric=def.style.buttonGeneric or "guidebooks_bscBtn.png"
_def.groups={book=1, guide=1, flammable=1}
minetest.register_craft({
type="fuel",
recipe=name,
burntime=30
})
_def.on_use=function(book, reader, pointed_thing)
local meta=book:get_meta()
local def=minetest.registered_items[book:get_name()]
local reg=guideBooks.registered[book:get_name()]
meta:set_string("guidebooks:place", nil)
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp)
return book
end
minetest.register_on_player_receive_fields(function(reader, formname, fields)
local book=reader:get_wielded_item()
local meta=book:get_meta()
if formname=="guideBooks:book_"..book:get_name() then
local def=minetest.registered_items[book:get_name()]
local reg=guideBooks.registered[book:get_name()]
local seg=string.split(meta:get_string("guidebooks:place"), ":")
if fields.beginning then
genSecList(reg, meta, reader, book, def)
elseif fields.next then
if #seg == 2 then
local pn=tonumber(seg[2])
if type(pn)=="number" then
pn=pn+1
if reg.sections[seg[1]] then
if reg.sections[seg[1]].Pages[pn] then
local form=reg.sections[seg[1]].Pages[pn].form
if reg.ptype then
if reg.sections[seg[1]].Pages[pn].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w))..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text1.."]" end
else
if reg.sections[seg[1]].Pages[pn].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w/2)-1)..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text1.."]" end
if reg.sections[seg[1]].Pages[pn].text2 then form=form.."textarea["..((def.style.page.w/2)+0.5)..",0.5;"..((def.style.page.w/2)-0.5)..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text2.."]" end
end
if reg.sections[seg[1]].Pages[pn+1] then
form=form..reg.nextTmp
end
if reg.sections[seg[1]].Pages[pn-1] then
form=form..reg.prevTmp
end
meta:set_string("guidebooks:place", seg[1]..":"..pn)
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form)
else
meta:set_string("guidebooks:place", nil)
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp)
end
else
meta:set_string("guidebooks:place", nil)
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp)
end
else
meta:set_string("guidebooks:place", nil)
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp)
end
else
genSecList(reg, meta, reader, book, def)
end
minetest.after(0, function()reader:set_wielded_item(book)end)
elseif fields.prev then
if #seg == 2 then
local pn=tonumber(seg[2])
if type(pn)=="number" then
pn=pn-1
if reg.sections[seg[1]] then
if reg.sections[seg[1]].Pages[pn] then
local form=reg.sections[seg[1]].Pages[pn].form
if reg.ptype then
if reg.sections[seg[1]].Pages[pn].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w))..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text1.."]" end
else
if reg.sections[seg[1]].Pages[pn].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w/2)-1)..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text1.."]" end
if reg.sections[seg[1]].Pages[pn].text2 then form=form.."textarea["..((def.style.page.w/2)+0.5)..",0.5;"..((def.style.page.w/2)-0.5)..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text2.."]" end
end
if reg.sections[seg[1]].Pages[pn+1] then
form=form..reg.nextTmp
end
if reg.sections[seg[1]].Pages[pn-1] then
form=form..reg.prevTmp
end
meta:set_string("guidebooks:place", seg[1]..":"..pn)
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form)
else
if meta:get_string("guidebooks:place")=="Main:Index" then
meta:set_string("guidebooks:place", nil)
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp)
else
genSecList(reg, meta, reader, book, def)
end
end
else
if meta:get_string("guidebooks:place")=="Main:Index" then
meta:set_string("guidebooks:place", nil)
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp)
else
genSecList(reg, meta, reader, book, def)
end
end
else
if meta:get_string("guidebooks:place")=="Main:Index" then
meta:set_string("guidebooks:place", nil)
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp)
else
genSecList(reg, meta, reader, book, def)
end
end
end
reader:set_wielded_item(book)
else
for _,v in pairs(reg.sections) do
if fields["goto_".._] then
if v.Pages[1] then
local form=v.Pages[1].form
if reg.ptype then
if v.Pages[1].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w))..","..(def.style.page.h-0.5)..";;;"..v.Pages[1].text1.."]" end
else
if v.Pages[1].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w/2)-1)..","..(def.style.page.h-0.5)..";;;"..v.Pages[1].text1.."]" end
if v.Pages[1].text2 then form=form.."textarea["..((def.style.page.w/2)+0.5)..",0.5;"..((def.style.page.w/2)-0.5)..","..(def.style.page.h-0.5)..";;;"..v.Pages[1].text2.."]" end
end
if v.Pages[2] then
form=form..reg.nextTmp
end
meta:set_string("guidebooks:place", _..":".."1")
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form)
end
end
if fields["gotoM_".._] then
if v.master then
if guideBooks.indices[book:get_name().._] then
local y=-0.1
local x=1
local num=0
local form=reg.pageTmp
for __,v in pairs(reg.sections) do
if v.slave and v.slave==_ and not v.hidden and v.isUnLocked(reader, book:get_name(), __) then
form=form.."style[goto_"..__..";border=false]image_button["..x..","..y..";"..((def.style.page.w/2)-2)..",0.5;"..def.style.buttonGeneric..";goto_"..__..";"..(v.description or _).."]"
y=y+0.6
num=num+1
if num>13 then x=(def.style.page.w/2)+1 y=-0.1 num=0 end
end
end
minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form)
meta:set_string("guidebooks:place", "Sub:Index")
end
end
end
end
reader:set_wielded_item(book)
end
end
end)
local cover=""..
"size[".._def.style.cover.w..",".._def.style.cover.h.."]"..
"background[0,0;0,0;".._def.style.cover.bg..";true]"..
"style[next;border=false]"..
"image_button["..(_def.style.cover.w-0.7)..","..(_def.style.cover.h-0.5)..";1,1;".._def.style.cover.next..";next;]"
local page=""..
"size[".._def.style.page.w..",".._def.style.page.h.."]"..
"background[0,0;0,0;".._def.style.page.bg..";true]"..
"style[beginning;border=false]image_button[-0.3,-0.3;1,1;".._def.style.page.begn..";beginning;]"
local next="style[next;border=false]image_button["..(_def.style.page.w-0.7)..","..(_def.style.page.h-0.5)..";1,1;".._def.style.page.next..";next;]"
local prev="style[prev;border=false]image_button[0,"..(_def.style.page.h-0.5)..";1,1;".._def.style.page.prev..";prev;]"
local begn="style[beginning;border=false]image_button[-0.3,-0.3;1,1;".._def.style.page.begn..";beginning;]"
guideBooks.registered[name]={coverTmp=cover, pageTmp=page, nextTmp=next, prevTmp=prev, begnTmp=begn, sections={Main={Pages={Index={}}}, Hidden={Pages={}}}, sectionOrder={}, ptype=_def.ptype}
minetest.register_craftitem(name, _def)
end
c.register_section = function(book, name, def)
if guideBooks.registered[book] then
def.Pages = def.Pages or {}
if def.Pages.Index then
def.Pages.Index.Registered=true
end
def.name=name
if def.slave and def.master then error("Attempt to register slave as index") end
if def.slave then
if guideBooks.registered[book].sections[def.slave] and guideBooks.registered[book].sections[def.slave].master and guideBooks.indices[book..def.slave] then
guideBooks.indices[book..def.slave][name]=def
else
error("Attempt to register slave to non-existent master")
end
end
if def.master then
guideBooks.indices[book..name]={}
end
def.name=name
def.isUnLocked = function(player, book, section)
return (not def.locked) or player:get_meta():get_string(book..":"..section..":".."unlocked") == "true"
end
guideBooks.registered[book].sections[name]=def
guideBooks.registered[book].sectionOrder[#guideBooks.registered[book].sectionOrder+1]=name
else
error("Attempt to register section in non-existent guide")
end
end
c.register_page = function(book, section, num, def)
if guideBooks.registered[book] then
if guideBooks.registered[book].sections[section] then
local _def={}
_def.registered=true
_def.form =def.form or guideBooks.registered[book].pageTmp
if def.extra then _def.form=_def.form..def.extra end
if def.text1 then _def.text1=def.text1 end
if def.text2 then _def.text2=def.text2 end
guideBooks.registered[book].sections[section].Pages[num]=_def
else
error("Attempt to register page in non-existent section")
end
else
error("Attempt to register page in non-existent guide")
end
end
guideBooks.Common=c

427
mods/guidebooks/license.txt Normal file
View File

@ -0,0 +1,427 @@
Attribution-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-ShareAlike 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.

2
mods/guidebooks/mod.conf Normal file
View File

@ -0,0 +1,2 @@
name = guidebooks
description = A library for registering functional in-game documentation 'guidebooks'.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

View File

@ -66,7 +66,7 @@ local function stop_sprint(player)
end
local function drain_stamina(player)
local player_stamina = tonumber(player:get_meta():get("hbsprint:stamina"))
local player_stamina = player:get_meta():get_float("hbsprint:stamina") or 20
if player_stamina > 0 then
player:get_meta():set_float("hbsprint:stamina", player_stamina - stamina_drain)
end
@ -77,7 +77,7 @@ local function drain_stamina(player)
end
local function replenish_stamina(player)
local stamina = player:get_meta():get("hbsprint:stamina")
local stamina = player:get_meta():get_float("hbsprint:stamina") or 20
if not stamina then
return
end
@ -182,7 +182,7 @@ minetest.register_globalstep(function(dtime)
local pos = player:get_pos()
local ground = minetest.get_node_or_nil({x=pos.x, y=pos.y-1, z=pos.z})
local walkable = false
local player_stamina = tonumber(player:get_meta():get("hbsprint:stamina"))
local player_stamina = player:get_meta():get_float("hbsprint:stamina") or 20
if starve == "hbhunger" then
hunger = tonumber(hbhunger.hunger[name])
elseif starve == "hunger_ng" then

View File

@ -116,7 +116,7 @@ minetest.register_ore({
clust_scarcity = 7*7*7,
clust_num_ores = 5,
clust_size = 3,
height_min = -31000,
height_min = -512,
height_max = -265,
flags = "absheight",
})

BIN
mods/minetest_game/beds/textures/beds_bed.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 B

After

Width:  |  Height:  |  Size: 450 B

BIN
mods/minetest_game/beds/textures/beds_bed_fancy.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
mods/minetest_game/beds/textures/beds_bed_foot.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
mods/minetest_game/beds/textures/beds_bed_head.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
mods/minetest_game/beds/textures/beds_bed_side1.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
mods/minetest_game/beds/textures/beds_bed_side2.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
mods/minetest_game/beds/textures/beds_bed_side_bottom.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 561 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 978 B

BIN
mods/minetest_game/beds/textures/beds_bed_side_top.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 611 B

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
mods/minetest_game/beds/textures/beds_bed_side_top_r.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 596 B

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
mods/minetest_game/beds/textures/beds_bed_top1.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 583 B

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
mods/minetest_game/beds/textures/beds_bed_top2.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
mods/minetest_game/beds/textures/beds_bed_top_bottom.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
mods/minetest_game/beds/textures/beds_bed_top_top.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
mods/minetest_game/boats/textures/boats_inventory.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
mods/minetest_game/boats/textures/boats_wield.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Some files were not shown because too many files have changed in this diff Show More