mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-02-10 15:50:21 +01:00
daily checkpoint, not much improved, stairsplus still completely nonfunctional
This commit is contained in:
parent
da7d0f94dc
commit
9e68ca91b8
@ -68,6 +68,7 @@ Copyright © 2011-2020 Hugo Locurcio and contributors
|
|||||||
|
|
||||||
- More Blocks code is licensed under the zlib license, see
|
- More Blocks code is licensed under the zlib license, see
|
||||||
[`LICENSE.md`](LICENSE.md) for details.
|
[`LICENSE.md`](LICENSE.md) for details.
|
||||||
|
- This is an altered version of the code which is not distributed by Hugo Locurcio.
|
||||||
- Unless otherwise specified, More Blocks textures are licensed under
|
- Unless otherwise specified, More Blocks textures are licensed under
|
||||||
[CC BY-SA 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/).
|
[CC BY-SA 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/).
|
||||||
|
|
||||||
|
6
stairsplus/api/init.lua
Normal file
6
stairsplus/api/init.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
stairsplus.api = {}
|
||||||
|
|
||||||
|
stairsplus.dofile("api", "shape")
|
||||||
|
stairsplus.dofile("api", "node")
|
||||||
|
stairsplus.dofile("api", "station")
|
||||||
|
stairsplus.dofile("api", "recipe")
|
1
stairsplus/api/node.lua
Normal file
1
stairsplus/api/node.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
-- for registering variants of a specific node
|
3
stairsplus/api/recipe.lua
Normal file
3
stairsplus/api/recipe.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- for registering recipe schemas
|
||||||
|
-- should register schemas w/ unified_inventory and i3 and whatever else,
|
||||||
|
-- and hide the recipes for the individual nodes (possibly a setting for such)
|
2
stairsplus/api/shape.lua
Normal file
2
stairsplus/api/shape.lua
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
-- register shapes (e.g. 1/16 slab, 1/8 slab, 1/4 slab, etc)
|
||||||
|
-- register shape groups (e.g. slab, stair, etc.)
|
1
stairsplus/api/station.lua
Normal file
1
stairsplus/api/station.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
-- for creating the circular saw and similar nodes
|
3
stairsplus/compat/init.lua
Normal file
3
stairsplus/compat/init.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
-- unified_inventory, sfinv, i3
|
||||||
|
|
3
stairsplus/compat/legacy.lua
Normal file
3
stairsplus/compat/legacy.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- legacy: register all the expected variants for e.g. default, wool, gloopblocks, etc.
|
||||||
|
-- provide a configuration option to *disable* legacy. it must be enabled by default, to prevent breaking
|
||||||
|
-- existing servers
|
1
stairsplus/compat/stairs.lua
Normal file
1
stairsplus/compat/stairs.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
-- stairs compat: override what stairs does, and "fix" any stairs which were already registered...
|
@ -1,4 +1,4 @@
|
|||||||
|
local cm = stairsplus.resources.craft_materials
|
||||||
|
|
||||||
if cm.steel_ingot then
|
if cm.steel_ingot then
|
||||||
if moreblocks.settings.circular_saw_crafting then
|
if moreblocks.settings.circular_saw_crafting then
|
||||||
|
@ -61,7 +61,6 @@ local subset = {
|
|||||||
}
|
}
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- luacheck: no unused
|
|
||||||
local function register_custom_subset(subset, modname, subname, recipeitem, groups, images, description, drop, light)
|
local function register_custom_subset(subset, modname, subname, recipeitem, groups, images, description, drop, light)
|
||||||
stairsplus:register_custom_subset(subset, modname, subname, recipeitem, {
|
stairsplus:register_custom_subset(subset, modname, subname, recipeitem, {
|
||||||
groups = groups,
|
groups = groups,
|
||||||
|
@ -6,20 +6,40 @@ Licensed under the zlib license. See LICENSE.md for more information.
|
|||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- Nodes will be called <modname>:{stair,slab,panel,micro,slope}_<subname>
|
-- Nodes will be called <modname>:{stair,slab,panel,micro,slope}_<subname>
|
||||||
|
local modname = minetest.get_current_modname()
|
||||||
|
local modpath = minetest.get_modpath(modname)
|
||||||
|
local S = minetest.get_translator(modname)
|
||||||
|
|
||||||
local modpath = minetest.get_modpath("moreblocks") .. "/stairsplus"
|
stairsplus = {
|
||||||
|
version = {3, 0, 0},
|
||||||
|
fork = "minetest_mods",
|
||||||
|
|
||||||
stairsplus = {}
|
modname = modname,
|
||||||
stairsplus.expect_infinite_stacks = false
|
modpath = modpath,
|
||||||
|
|
||||||
|
S = S,
|
||||||
|
|
||||||
|
has = {
|
||||||
|
basic_materials = minetest.get_modpath("basic_materials"),
|
||||||
|
default = minetest.get_modpath("default"),
|
||||||
|
gloopblocks = minetest.get_modpath("gloopblocks"),
|
||||||
|
stairs = minetest.get_modpath("stairs"),
|
||||||
|
technic = minetest.get_modpath("technic"),
|
||||||
|
prefab = minetest.get_modpath("prefab"),
|
||||||
|
wool = minetest.get_modpath("wool"),
|
||||||
|
},
|
||||||
|
|
||||||
|
log = function(level, messagefmt, ...)
|
||||||
|
return minetest.log(level, ("[%s] %s"):format(modname, messagefmt:format(...)))
|
||||||
|
end,
|
||||||
|
|
||||||
|
dofile = function(...)
|
||||||
|
return dofile(table.concat({modpath, ...}, DIR_DELIM) .. ".lua")
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
stairsplus.shapes_list = {}
|
stairsplus.shapes_list = {}
|
||||||
|
|
||||||
if
|
|
||||||
not minetest.get_modpath("unified_inventory")
|
|
||||||
and minetest.settings:get_bool("creative_mode")
|
|
||||||
then
|
|
||||||
stairsplus.expect_infinite_stacks = true
|
|
||||||
end
|
|
||||||
|
|
||||||
function stairsplus:prepare_groups(groups)
|
function stairsplus:prepare_groups(groups)
|
||||||
local result = {}
|
local result = {}
|
||||||
@ -30,9 +50,11 @@ function stairsplus:prepare_groups(groups)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not moreblocks.config.stairsplus_in_creative_inventory then
|
|
||||||
|
if not stairsplus.settings.in_creative_inventory then
|
||||||
result.not_in_creative_inventory = 1
|
result.not_in_creative_inventory = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -59,7 +81,6 @@ function stairsplus:register_alias_force_all(modname_old, subname_old, modname_n
|
|||||||
self:register_micro_alias_force(modname_old, subname_old, modname_new, subname_new)
|
self:register_micro_alias_force(modname_old, subname_old, modname_new, subname_new)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- luacheck: no unused
|
|
||||||
local function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
local function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||||
stairsplus:register_all(modname, subname, recipeitem, {
|
stairsplus:register_all(modname, subname, recipeitem, {
|
||||||
groups = groups,
|
groups = groups,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: moreblocks
|
# textdomain: stairsplus
|
||||||
|
|
||||||
# German translation for More Blocks.
|
# German translation for More Blocks.
|
||||||
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: moreblocks
|
# textdomain: stairsplus
|
||||||
|
|
||||||
# Spanish translation for More Blocks.
|
# Spanish translation for More Blocks.
|
||||||
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: moreblocks
|
# textdomain: stairsplus
|
||||||
|
|
||||||
# French translation for More Blocks.
|
# French translation for More Blocks.
|
||||||
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: moreblocks
|
# textdomain: stairsplus
|
||||||
|
|
||||||
# Italian translation for More Blocks.
|
# Italian translation for More Blocks.
|
||||||
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: moreblocks
|
# textdomain: stairsplus
|
||||||
|
|
||||||
# Polish translation for More Blocks.
|
# Polish translation for More Blocks.
|
||||||
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: moreblocks
|
# textdomain: stairsplus
|
||||||
|
|
||||||
# Russian translation for MOREBLOCKS minetest mod.
|
# Russian translation for MOREBLOCKS minetest mod.
|
||||||
# Copyright (C) 2018 Hugo Locurcio and contributors
|
# Copyright (C) 2018 Hugo Locurcio and contributors
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: moreblocks
|
# textdomain: stairsplus
|
||||||
|
|
||||||
#: circular_saw.lua
|
#: circular_saw.lua
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: moreblocks
|
# textdomain: stairsplus
|
||||||
|
|
||||||
# zh_CN translation for More Blocks.
|
# zh_CN translation for More Blocks.
|
||||||
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: moreblocks
|
# textdomain: stairsplus
|
||||||
|
|
||||||
# zh_TW translation for More Blocks.
|
# zh_TW translation for More Blocks.
|
||||||
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
# Copyright © 2011-2020 Hugo Locurcio and contributors
|
||||||
|
@ -7,7 +7,6 @@ Licensed under the zlib license. See LICENSE.md for more information.
|
|||||||
|
|
||||||
-- Node will be called <modname>:micro_<subname>
|
-- Node will be called <modname>:micro_<subname>
|
||||||
|
|
||||||
-- luacheck: no unused
|
|
||||||
local function register_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
local function register_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||||
stairsplus:register_micro(modname, subname, recipeitem, {
|
stairsplus:register_micro(modname, subname, recipeitem, {
|
||||||
groups = groups,
|
groups = groups,
|
||||||
|
@ -7,7 +7,6 @@ Licensed under the zlib license. See LICENSE.md for more information.
|
|||||||
|
|
||||||
-- Node will be called <modname>:panel_<subname>
|
-- Node will be called <modname>:panel_<subname>
|
||||||
|
|
||||||
-- luacheck: no unused
|
|
||||||
local function register_panel(modname, subname, recipeitem, groups, images, description, drop, light)
|
local function register_panel(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||||
stairsplus:register_panel(modname, subname, recipeitem, {
|
stairsplus:register_panel(modname, subname, recipeitem, {
|
||||||
groups = groups,
|
groups = groups,
|
||||||
|
9
stairsplus/resources/craft_materials.lua
Normal file
9
stairsplus/resources/craft_materials.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
local table_set_all = stairsplus.util.table_set_all
|
||||||
|
|
||||||
|
stairsplus.resources.craft_materials = {}
|
||||||
|
|
||||||
|
if stairsplus.has.default then
|
||||||
|
table_set_all(stairsplus.resources.craft_materials, {
|
||||||
|
steel_ingot = "default:steel_ingot",
|
||||||
|
})
|
||||||
|
end
|
4
stairsplus/resources/init.lua
Normal file
4
stairsplus/resources/init.lua
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
stairsplus.resources = {}
|
||||||
|
|
||||||
|
stairsplus.dofile("resources", "craft_materials")
|
||||||
|
stairsplus.dofile("resources", "sounds")
|
9
stairsplus/resources/sounds.lua
Normal file
9
stairsplus/resources/sounds.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
local table_set_all = moreblocks.util.table_set_all
|
||||||
|
|
||||||
|
moreblocks.resources.sounds = {}
|
||||||
|
|
||||||
|
if moreblocks.has.default then
|
||||||
|
table_set_all(moreblocks.resources.sounds, {
|
||||||
|
wood = default.node_sound_wood_defaults(),
|
||||||
|
})
|
||||||
|
end
|
@ -1,4 +1,7 @@
|
|||||||
stairsplus.settings = {
|
stairsplus.settings = {
|
||||||
in_creative_inventory = minetest.settings:get_bool("stairsplus.in_creative_inventory", false),
|
in_creative_inventory = minetest.settings:get_bool("stairsplus.in_creative_inventory", false),
|
||||||
circular_saw_crafting = minetest.settings:get_bool("stairsplus.circular_saw_crafting", true)
|
circular_saw_crafting = minetest.settings:get_bool("stairsplus.circular_saw_crafting", true),
|
||||||
|
expect_infinite_stacks = minetest.settings:get_bool("stairsplus.expect_infinite_stacks",
|
||||||
|
minetest.settings:get_bool("creative_mode", false)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ Licensed under the zlib license. See LICENSE.md for more information.
|
|||||||
|
|
||||||
-- Node will be called <modname>:slab_<subname>
|
-- Node will be called <modname>:slab_<subname>
|
||||||
|
|
||||||
-- luacheck: no unused
|
|
||||||
local function register_slab(modname, subname, recipeitem, groups, images, description, drop, light)
|
local function register_slab(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||||
stairsplus:register_slab(modname, subname, recipeitem, {
|
stairsplus:register_slab(modname, subname, recipeitem, {
|
||||||
groups = groups,
|
groups = groups,
|
||||||
|
@ -7,7 +7,6 @@ Licensed under the zlib license. See LICENSE.md for more information.
|
|||||||
|
|
||||||
-- Node will be called <modname>:slope_<subname>
|
-- Node will be called <modname>:slope_<subname>
|
||||||
|
|
||||||
-- luacheck: no unused
|
|
||||||
local function register_slope(modname, subname, recipeitem, groups, images, description, drop, light)
|
local function register_slope(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||||
stairsplus:register_slope(modname, subname, recipeitem, {
|
stairsplus:register_slope(modname, subname, recipeitem, {
|
||||||
groups = groups,
|
groups = groups,
|
||||||
|
@ -7,7 +7,6 @@ Licensed under the zlib license. See LICENSE.md for more information.
|
|||||||
|
|
||||||
-- Node will be called <modname>:stair_<subname>
|
-- Node will be called <modname>:stair_<subname>
|
||||||
|
|
||||||
-- luacheck: no unused
|
|
||||||
local function register_stair(modname, subname, recipeitem, groups, images, description, drop, light)
|
local function register_stair(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||||
stairsplus:register_stair(modname, subname, recipeitem, {
|
stairsplus:register_stair(modname, subname, recipeitem, {
|
||||||
groups = groups,
|
groups = groups,
|
||||||
|
Before Width: | Height: | Size: 574 B After Width: | Height: | Size: 574 B |
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 439 B After Width: | Height: | Size: 439 B |
Loading…
Reference in New Issue
Block a user