[minetest-mod-moreblocks] 01/07: New upstream version 1.1.0
Julien Puydt
julien.puydt at laposte.net
Wed Oct 4 19:27:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
jpuydt-guest pushed a commit to branch master
in repository minetest-mod-moreblocks.
commit 3de077bd0ac4980c9b3399bc4b7324374ec86192
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Wed Oct 4 21:15:43 2017 +0200
New upstream version 1.1.0
---
CHANGELOG.md | 33 +++++++++++++++++---
CONTRIBUTING.md | 10 ++++++
README.md | 74 +++++++++++++++++++++++++++++++++++++++++---
circular_saw.lua | 16 +++++++---
config.lua | 4 +--
crafting.lua | 2 +-
depends.txt | 2 ++
init.lua | 10 ++++--
stairsplus/init.lua | 4 ++-
stairsplus/microblocks.lua | 4 +++
stairsplus/panels.lua | 4 +++
stairsplus/registrations.lua | 61 ++++++++++++++++++++++++++++++++++--
stairsplus/slabs.lua | 47 +++++++++++++++++++++++-----
stairsplus/slopes.lua | 4 +++
stairsplus/stairs.lua | 4 +++
15 files changed, 249 insertions(+), 30 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e3c422f..ba3678d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,10 +1,35 @@
-# Change Log
+# Changelog
All notable changes to this project will be documented in this file.
-The format is based on [Keep a Changelog](http://keepachangelog.com/)
-and this project adheres to [Semantic Versioning](http://semver.org/).
+The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+## [1.1.0] - 2017-10-04
+
+### Added
+
+- 3 new node shapes in the circular saw (thin slabs, available in
+ "L-shaped", "corner-shaped" and "U-shaped" variations), all with 1/16
+ thickness.
+- New Stairs+ nodes:
+ - Coral Skeleton
+ - Desert Sandstone, Silver Sandstone
+ - Desert Sandstone Brick, Silver Sandstone Brick
+ - Desert Sandstone Block, Silver Sandstone Block
+ - Obsidian Block
+ - Sandstone Block
+ - Stone Block, Desert Stone Block
+ - Straw
+ - Tin Block
+ - Wool (all colors)
+- Other mods can now get a list of all the defined Stairs+ shapes
## [1.0.0] - 2017-02-19
-- Initial versioned release.
\ No newline at end of file
+- Initial versioned release.
+
+[1.1.0]: https://github.com/minetest-mods/moreblocks/compare/v1.0.0...v1.1.0
+[Unreleased]: https://github.com/minetest-mods/moreblocks/compare/v1.0.0...HEAD
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..c435731
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,10 @@
+# Contributing to More Blocks
+
+Thank you for your interest in More Blocks! Before contributing,
+be sure to know about these few guidelines:
+
+- Contributions have to be licensed under the zlib license (or compatible)
+ for code, and CC BY-SA 3.0 (or compatible) for assets.
+- Make sure to update the changelog, keeping the
+ [changelog format](http://keepachangelog.com/en/1.0.0/) we use.
+- Don't bump the version yourself. Maintainers will do this when necessary.
diff --git a/README.md b/README.md
index 767cb7c..6c37b74 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,76 @@
# More Blocks
-More Blocks for [Minetest](http://minetest.net), a free and open source infinite
+More Blocks for [Minetest](https://www.minetest.net/), a free and open source infinite
world block sandbox game.
-To install, just clone this repository into your "mods" directory.
+[**Forum topic**](https://forum.minetest.net/viewtopic.php?f=11&t=509)
-More Blocks code is licensed under the zlib license, textures are by Calinou and are licensed under CC BY-SA 3.0 Unported.
+## Installation
-moreblocks_copperpatina.png is by pithydon licensed under CC0 1.0
+### Download the mod
-**Forum topic:** <https://forum.minetest.net/viewtopic.php?f=11&t=509>
+To install More Blocks, clone this Git repository into your Minetest's `mods/`
+directory:
+
+```
+git clone https://github.com/minetest-mods/moreblocks.git
+```
+
+You can also
+[download a ZIP archive](https://github.com/minetest-mods/moreblocks/archive/master.zip)
+of More Blocks. If you do so, you will need to extract the archive, then rename
+the resulting folder from `moreblocks-master` to `moreblocks` – this is
+**absolutely** necessary to do, else, it won't work!
+
+### Enable the mod
+
+Once you have installed More Blocks, you need to enable it in Minetest.
+The procedure is as follows:
+
+#### Using the client's main menu
+
+This is the easiest way to enable More Blocks when playing in singleplayer
+(or on a server hosted from a client).
+
+1. Start Minetest and switch to the **Local Game** tab.
+2. Select the world you want to enable More Blocks in.
+3. Click **Configure**, then enable `moreblocks` by double-clicking it
+ (or ticking the **Enabled** checkbox).
+4. Save the changes, then start a game on the world you enabled More Blocks on.
+5. More Blocks should now be running on your world.
+
+#### Using a text editor
+
+This is the recommended way to enable the mod on a server without using a GUI.
+
+1. Make sure Minetest is not currently running (else, it will overwrite
+ the changes when exiting).
+2. Open the world's `world.mt` file using a text editor.
+3. Add the following line at the end of the file:
+
+```
+load_mod_moreblocks = true
+```
+
+If the line is already present in the file, then replace `false` with `true` on that line.
+
+4. Save the file, then start a game on the world you enabled More Blocks on.
+5. More Blocks should now be running on your world.
+
+## Version compatibility
+
+More Blocks is currently primarily tested with Minetest 0.4.16.
+It may or may not work with newer or older versions. Issues arising in older
+versions than 0.4.16 will generally not be fixed.
+
+## License
+
+Copyright © 2011-2017 Hugo Locurcio and contributors
+
+- More Blocks code is licensed under the zlib license, see
+ [`LICENSE.md`](LICENSE.md) for details.
+- Unless otherwise specified, More Blocks textures are licensed under
+ [CC BY-SA 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/).
+
+`moreblocks_copperpatina.png` was created by pithydon, and is licensed under
+[CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).
diff --git a/circular_saw.lua b/circular_saw.lua
index 36f5fab..6c3a974 100644
--- a/circular_saw.lua
+++ b/circular_saw.lua
@@ -1,7 +1,7 @@
--[[
More Blocks: circular saw
-Copyright (c) 2011-2017 Hugo Locurcio and contributors.
+Copyright (c) 2011-2017 Hugo Locurcio, Sokomine and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
@@ -26,9 +26,9 @@ circular_saw.cost_in_microblocks = {
1, 1, 1, 1, 1, 1, 1, 2,
2, 3, 2, 4, 2, 4, 5, 6,
7, 1, 1, 2, 4, 6, 7, 8,
- 3, 1, 1, 2, 4, 4, 2, 6,
- 7, 3, 7, 7, 4, 8, 3, 2,
- 6, 2, 1, 3, 4,
+ 1, 2, 2, 3, 1, 1, 2, 4,
+ 4, 2, 6, 7, 3, 7, 7, 4,
+ 8, 3, 2, 6, 2, 1, 3, 4
}
circular_saw.names = {
@@ -40,6 +40,7 @@ circular_saw.names = {
{"panel", "_4"},
{"micro", ""},
{"panel", ""},
+
{"micro", "_12"},
{"panel", "_12"},
{"micro", "_14"},
@@ -48,6 +49,7 @@ circular_saw.names = {
{"panel", "_15"},
{"stair", "_outer"},
{"stair", ""},
+
{"stair", "_inner"},
{"slab", "_1"},
{"slab", "_2"},
@@ -56,11 +58,16 @@ circular_saw.names = {
{"slab", "_three_quarter"},
{"slab", "_14"},
{"slab", "_15"},
+
+ {"slab", "_two_sides"},
+ {"slab", "_three_sides"},
+ {"slab", "_three_sides_u"},
{"stair", "_half"},
{"stair", "_alt_1"},
{"stair", "_alt_2"},
{"stair", "_alt_4"},
{"stair", "_alt"},
+
{"slope", ""},
{"slope", "_half"},
{"slope", "_half_raised"},
@@ -69,6 +76,7 @@ circular_saw.names = {
{"slope", "_inner_half_raised"},
{"slope", "_inner_cut"},
{"slope", "_inner_cut_half"},
+
{"slope", "_inner_cut_half_raised"},
{"slope", "_outer"},
{"slope", "_outer_half"},
diff --git a/config.lua b/config.lua
index da5cd6e..8d49c3b 100644
--- a/config.lua
+++ b/config.lua
@@ -8,7 +8,7 @@ Licensed under the zlib license. See LICENSE.md for more information.
moreblocks.config = {}
local function getbool_default(setting, default)
- local value = minetest.setting_getbool(setting)
+ local value = minetest.settings:get_bool(setting)
if value == nil then
value = default
end
@@ -21,7 +21,7 @@ local function setting(settingtype, name, default)
getbool_default("moreblocks." .. name, default)
else
moreblocks.config[name] =
- minetest.setting_get("moreblocks." .. name) or default
+ minetest.settings:get("moreblocks." .. name) or default
end
end
diff --git a/crafting.lua b/crafting.lua
index 88862b7..8741c53 100644
--- a/crafting.lua
+++ b/crafting.lua
@@ -454,7 +454,7 @@ minetest.register_craft({
}
})
-if minetest.setting_getbool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then”
+if minetest.settings:get_bool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then”
minetest.register_craft({
output = "moreblocks:circular_saw",
recipe = {
diff --git a/depends.txt b/depends.txt
index 198fe8a..74e8624 100644
--- a/depends.txt
+++ b/depends.txt
@@ -1,2 +1,4 @@
default
intllib?
+farming?
+wool?
diff --git a/init.lua b/init.lua
index 5e7fc6b..c12f5e0 100644
--- a/init.lua
+++ b/init.lua
@@ -11,8 +11,12 @@ Licensed under the zlib license. See LICENSE.md for more information.
moreblocks = {}
local S
-if minetest.get_modpath("intllib") then
- S = intllib.Getter()
+if minetest.global_exists("intllib") then
+ if intllib.make_gettext_pair then
+ S = intllib.make_gettext_pair()
+ else
+ S = intllib.Getter()
+ end
else
S = function(s) return s end
end
@@ -28,6 +32,6 @@ dofile(modpath .. "/redefinitions.lua")
dofile(modpath .. "/crafting.lua")
dofile(modpath .. "/aliases.lua")
-if minetest.setting_getbool("log_mods") then
+if minetest.settings:get_bool("log_mods") then
minetest.log("action", S("[moreblocks] loaded."))
end
diff --git a/stairsplus/init.lua b/stairsplus/init.lua
index 87a356f..5cd415c 100644
--- a/stairsplus/init.lua
+++ b/stairsplus/init.lua
@@ -12,8 +12,10 @@ local modpath = minetest.get_modpath("moreblocks").. "/stairsplus"
stairsplus = {}
stairsplus.expect_infinite_stacks = false
+stairsplus.shapes_list = {}
+
if not minetest.get_modpath("unified_inventory")
-and minetest.setting_getbool("creative_mode") then
+and minetest.settings:get_bool("creative_mode") then
stairsplus.expect_infinite_stacks = true
end
diff --git a/stairsplus/microblocks.lua b/stairsplus/microblocks.lua
index 727278e..50d8487 100644
--- a/stairsplus/microblocks.lua
+++ b/stairsplus/microblocks.lua
@@ -65,6 +65,10 @@ local microblocks_defs = {
}
}
+for k,v in pairs(microblocks_defs) do
+ table.insert(stairsplus.shapes_list, { "micro_", k })
+end
+
function stairsplus:register_micro_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(microblocks_defs)
for alternate, def in pairs(defs) do
diff --git a/stairsplus/panels.lua b/stairsplus/panels.lua
index fb18f05..98e77fd 100644
--- a/stairsplus/panels.lua
+++ b/stairsplus/panels.lua
@@ -65,6 +65,10 @@ local panels_defs = {
}
}
+for k,v in pairs(panels_defs) do
+ table.insert(stairsplus.shapes_list, { "panel_", k })
+end
+
function stairsplus:register_panel_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(panels_defs)
for alternate, def in pairs(defs) do
diff --git a/stairsplus/registrations.lua b/stairsplus/registrations.lua
index ccadedc..7c5ad50 100644
--- a/stairsplus/registrations.lua
+++ b/stairsplus/registrations.lua
@@ -7,6 +7,7 @@ Licensed under the zlib license. See LICENSE.md for more information.
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
"stone",
+ "stone_block",
"cobble",
"mossycobble",
"brick",
@@ -16,7 +17,9 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
"copperblock",
"bronzeblock",
"diamondblock",
+ "tinblock",
"desert_stone",
+ "desert_stone_block",
"desert_cobble",
"meselamp",
"glass",
@@ -31,20 +34,35 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
"aspen_tree",
"aspen_wood",
"obsidian",
+ "obsidian_block",
+ "obsidianbrick",
"obsidian_glass",
"stonebrick",
"desert_stonebrick",
"sandstonebrick",
- "obsidianbrick",
+ "silver_sandstone",
+ "silver_sandstone_brick",
+ "silver_sandstone_block",
+ "desert_sandstone",
+ "desert_sandstone_brick",
+ "desert_sandstone_block",
+ "sandstone_block",
+ "coral_skeleton",
+ "farming:straw"
}
for _, name in pairs(default_nodes) do
- local nodename = "default:" .. name
+ local nodename = "default:"..name
+ local a,b = string.find(name, ":")
+ if b then
+ nodename = name
+ name = string.sub(name, b+1)
+ end
local ndef = minetest.registered_nodes[nodename]
if ndef then
local drop
if type(ndef.drop) == "string" then
- drop = ndef.drop:sub(9)
+ drop = ndef.drop:sub((b or 8)+1)
end
local tiles = ndef.tiles
@@ -63,3 +81,40 @@ for _, name in pairs(default_nodes) do
})
end
end
+
+-- wool registrations
+
+if minetest.get_modpath("wool") then
+
+ local colorlist = {
+ {"white", "White Wool"},
+ {"grey", "Grey Wool"},
+ {"black", "Black Wool"},
+ {"red", "Red Wool"},
+ {"yellow", "Yellow Wool"},
+ {"green", "Green Wool"},
+ {"cyan", "Cyan Wool"},
+ {"blue", "Blue Wool"},
+ {"magenta", "Magenta Wool"},
+ {"orange", "Orange Wool"},
+ {"violet", "Violet Wool"},
+ {"brown", "Brown Wool"},
+ {"pink", "Pink Wool"},
+ {"dark_grey", "Dark Grey Wool"},
+ {"dark_green", "Dark Green Wool"},
+ }
+
+ for i in ipairs(colorlist) do
+ local color = colorlist[i][1]
+ local colordesc = colorlist[i][2]
+
+ stairsplus:register_all("wool", color, "wool:"..color, {
+ description = colordesc,
+ tiles = {"wool_"..color..".png"},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,
+ flammable=3,wool=1,not_in_creative_inventory=1},
+ sounds = default.node_sound_defaults(),
+ sunlight_propagates = true,
+ })
+ end
+end
diff --git a/stairsplus/slabs.lua b/stairsplus/slabs.lua
index 2a86b0f..ea9dbc5 100644
--- a/stairsplus/slabs.lua
+++ b/stairsplus/slabs.lua
@@ -28,8 +28,26 @@ local slabs_defs = {
["_2"] = 2,
["_14"] = 14,
["_15"] = 15,
+ ["_two_sides"] = {
+ { -0.5, -0.5, -0.5, 0.5, -7/16, 7/16 },
+ { -0.5, -0.5, 7/16, 0.5, 0.5, 0.5 }
+ },
+ ["_three_sides"] = {
+ { -7/16, -0.5, -0.5, 0.5, -7/16, 7/16 },
+ { -7/16, -0.5, 7/16, 0.5, 0.5, 0.5 },
+ { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 }
+ },
+ ["_three_sides_u"] = {
+ { -0.5, -0.5, -0.5, 0.5, 0.5, -7/16 },
+ { -0.5, -0.5, -7/16, 0.5, -7/16, 7/16 },
+ { -0.5, -0.5, 7/16, 0.5, 0.5, 0.5 }
+ }
}
+for k,v in pairs(slabs_defs) do
+ table.insert(stairsplus.shapes_list, { "slab_", k })
+end
+
function stairsplus:register_slab_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(slabs_defs)
for alternate, def in pairs(defs) do
@@ -47,21 +65,36 @@ end
function stairsplus:register_slab(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(slabs_defs)
local desc_base = S("%s Slab"):format(fields.description)
- for alternate, num in pairs(defs) do
- local def = {
- node_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, (num/16)-0.5, 0.5},
+ for alternate, shape in pairs(defs) do
+
+ local def = {}
+
+ if type(shape) ~= "table" then
+ def = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, -0.5, 0.5, (shape/16)-0.5, 0.5},
+ },
+ description = ("%s (%d/16)"):format(desc_base, shape)
+ }
+ else
+ def = {
+ node_box = {
+ type = "fixed",
+ fixed = shape,
+ },
+ description = desc_base
}
- }
+ end
+
for k, v in pairs(fields) do
def[k] = v
end
+
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
def.on_place = minetest.rotate_node
- def.description = ("%s (%d/16)"):format(desc_base, num)
def.groups = stairsplus:prepare_groups(fields.groups)
if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname.. ":slab_" .. fields.drop .. alternate
diff --git a/stairsplus/slopes.lua b/stairsplus/slopes.lua
index cd8142f..7d18b3d 100644
--- a/stairsplus/slopes.lua
+++ b/stairsplus/slopes.lua
@@ -219,6 +219,10 @@ local slopes_defs = {
},
}
+for k,v in pairs(slopes_defs) do
+ table.insert(stairsplus.shapes_list, { "slope_", k })
+end
+
function stairsplus:register_slope_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(slopes_defs)
for alternate, def in pairs(defs) do
diff --git a/stairsplus/stairs.lua b/stairsplus/stairs.lua
index 8dd29a0..0291e7d 100644
--- a/stairsplus/stairs.lua
+++ b/stairsplus/stairs.lua
@@ -105,6 +105,10 @@ local stairs_defs = {
},
}
+for k,v in pairs(stairs_defs) do
+ table.insert(stairsplus.shapes_list, { "stair_", k })
+end
+
function stairsplus:register_stair_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(stairs_defs)
for alternate, def in pairs(defs) do
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/minetest-mod-moreblocks.git
More information about the Pkg-games-commits
mailing list