aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-03-24 12:08:53 +0100
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-03-24 12:08:53 +0100
commit9ccd07171051737c3c258076f683aa0b95d9c886 (patch)
treee12a577f5ef10faa6d16705860b18bee07c6cba4
parent1947ed03c2e146607dfa3306eb805f532ac3a413 (diff)
downloadmoreblocks-9ccd07171051737c3c258076f683aa0b95d9c886.tar.gz
moreblocks-9ccd07171051737c3c258076f683aa0b95d9c886.tar.bz2
moreblocks-9ccd07171051737c3c258076f683aa0b95d9c886.zip
more stuff from Och_Noe
-rw-r--r--circular_saw.lua15
-rw-r--r--crafting.lua104
-rw-r--r--depends.txt1
-rw-r--r--nodes.lua125
-rw-r--r--stairsplus/registrations.lua5
5 files changed, 231 insertions, 19 deletions
diff --git a/circular_saw.lua b/circular_saw.lua
index 6c3a974..b0a6d64 100644
--- a/circular_saw.lua
+++ b/circular_saw.lua
@@ -299,6 +299,20 @@ function circular_saw.on_metadata_inventory_put(
end
end
+function circular_saw.allow_metadata_inventory_take(pos, listname, index, stack, player)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ local input_stack = inv:get_stack(listname, index)
+ local player_inv = player:get_inventory()
+ if not player_inv:room_for_item("main", input_stack) then
+ return 0
+ else return stack:get_count()
+ end
+end
+
+
+
+
function circular_saw.on_metadata_inventory_take(
pos, listname, index, stack, player)
@@ -417,6 +431,7 @@ minetest.register_node("moreblocks:circular_saw", {
allow_metadata_inventory_move = circular_saw.allow_metadata_inventory_move,
-- Only input- and recycle-slot are intended as input slots:
allow_metadata_inventory_put = circular_saw.allow_metadata_inventory_put,
+ allow_metadata_inventory_take = circular_saw.allow_metadata_inventory_take,
-- Taking is allowed from all slots (even the internal microblock slot). Moving is forbidden.
-- Putting something in is slightly more complicated than taking anything because we have to make sure it is of a suitable material:
on_metadata_inventory_put = circular_saw.on_metadata_inventory_put,
diff --git a/crafting.lua b/crafting.lua
index 8741c53..56ffa35 100644
--- a/crafting.lua
+++ b/crafting.lua
@@ -12,12 +12,12 @@ minetest.register_craft({
minetest.register_craft({
output = "default:stick",
- recipe = {{"default:sapling"},}
+ recipe = {{"group:sapling"},}
})
minetest.register_craft({
- output = "default:stick",
- recipe = {{"default:junglesapling"},}
+ output = "default:wood",
+ recipe = {{"group:wood"},}
})
minetest.register_craft({
@@ -139,6 +139,44 @@ minetest.register_craft({
{"default:jungletree", "default:jungletree", "default:jungletree"},
}
})
+minetest.register_craft({
+ output = "moreblocks:all_faces_pine_tree 8",
+ recipe = {
+ {"default:pine_tree", "default:pine_tree", "default:pine_tree"},
+ {"default:pine_tree", "", "default:pine_tree"},
+ {"default:pine_tree", "default:pine_tree", "default:pine_tree"},
+ }
+})
+
+minetest.register_craft({
+ output = "moreblocks:all_faces_acacia_tree 8",
+ recipe = {
+ {"default:acacia_tree", "default:acacia_tree", "default:acacia_tree"},
+ {"default:acacia_tree", "", "default:acacia_tree"},
+ {"default:acacia_tree", "default:acacia_tree", "default:acacia_tree"},
+ }
+})
+
+minetest.register_craft({
+ output = "moreblocks:all_faces_aspen_tree 8",
+ recipe = {
+ {"default:aspen_tree", "default:aspen_tree", "default:aspen_tree"},
+ {"default:aspen_tree", "", "default:aspen_tree"},
+ {"default:aspen_tree", "default:aspen_tree", "default:aspen_tree"},
+ }
+})
+
+minetest.register_craft({
+ output = "moreblocks:all_faces_mushroom_tree 8",
+ recipe = {
+ {"ethereal:mushroom_trunk", "ethereal:mushroom_trunk", "ethereal:mushroom_trunk"},
+ {"ethereal:mushroom_trunk", "", "ethereal:mushroom_trunk"},
+ {"ethereal:mushroom_trunk", "ethereal:mushroom_trunk", "ethereal:mushroom_trunk"},
+ }
+})
+
+
+
minetest.register_craft({
output = "moreblocks:sweeper 4",
@@ -382,12 +420,36 @@ minetest.register_craft({
})
minetest.register_craft({
+ output = "moreblocks:trap_desert_stone",
+ type = "shapeless",
+ recipe = {"default:mese_crystal_fragment", "default:desert_stone"},
+})
+
+minetest.register_craft({
output = "moreblocks:trap_glass",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "default:glass"},
})
minetest.register_craft({
+ output = "moreblocks:trap_obsidian_glass",
+ type = "shapeless",
+ recipe = {"default:mese_crystal_fragment", "default:obsidian_glass"},
+})
+
+minetest.register_craft({
+ output = "moreblocks:trap_obsidian",
+ type = "shapeless",
+ recipe = {"default:mese_crystal_fragment", "default:obsidian"},
+})
+
+minetest.register_craft({
+ output = "moreblocks:trap_sandstone",
+ type = "shapeless",
+ recipe = {"default:mese_crystal_fragment", "default:sandstone"},
+})
+
+minetest.register_craft({
output = "moreblocks:cactus_brick",
type = "shapeless",
recipe = {"default:cactus", "default:brick"},
@@ -419,6 +481,20 @@ minetest.register_craft({
})
minetest.register_craft({
+ output = "moreblocks:dirt_compressed",
+ recipe = {
+ {'default:dirt', 'default:dirt', 'default:dirt'},
+ {'default:dirt', 'default:dirt', 'default:dirt'},
+ {'default:dirt', 'default:dirt', 'default:dirt'},
+ }
+})
+
+minetest.register_craft({
+ output = "default:dirt 9",
+ recipe = {{"moreblocks:dirt_compressed"}},
+})
+
+minetest.register_craft({
output = "moreblocks:cobble_compressed",
recipe = {
{"default:cobble", "default:cobble", "default:cobble"},
@@ -435,15 +511,33 @@ minetest.register_craft({
})
minetest.register_craft({
+ output = "moreblocks:cobble_condensed",
+ recipe = {
+ {"moreblocks:cobble_compressed", "moreblocks:cobble_compressed",
+ "moreblocks:cobble_compressed"},
+ {"moreblocks:cobble_compressed", "moreblocks:cobble_compressed",
+ "moreblocks:cobble_compressed"},
+ {"moreblocks:cobble_compressed", "moreblocks:cobble_compressed",
+ "moreblocks:cobble_compressed"},
+ }
+})
+
+minetest.register_craft({
+ type = "shapeless",
+ output = "moreblocks:cobble_compressed 9",
+ recipe = {"moreblocks:cobble_condensed"}
+})
+
+minetest.register_craft({
type = "cooking", output = "moreblocks:tar", recipe = "default:gravel",
})
minetest.register_craft({
type = "shapeless",
output = "moreblocks:copperpatina",
- recipe = {"bucket:bucket_water", "default:copperblock"},
+ recipe = {"group:bucket_water", "default:copperblock"},
replacements = {
- {"bucket:bucket_water", "bucket:bucket_empty"}
+ {"group:bucket_water", "bucket:bucket_empty"}
}
})
diff --git a/depends.txt b/depends.txt
index 74e8624..380e312 100644
--- a/depends.txt
+++ b/depends.txt
@@ -2,3 +2,4 @@ default
intllib?
farming?
wool?
+ehlphabet?
diff --git a/nodes.lua b/nodes.lua
index 709655f..54ff1d7 100644
--- a/nodes.lua
+++ b/nodes.lua
@@ -7,6 +7,7 @@ Licensed under the zlib license. See LICENSE.md for more information.
local S = moreblocks.intllib
+local sound_dirt = default.node_sound_dirt_defaults()
local sound_wood = default.node_sound_wood_defaults()
local sound_stone = default.node_sound_stone_defaults()
local sound_glass = default.node_sound_glass_defaults()
@@ -127,11 +128,25 @@ local nodes = {
groups = {cracky = 2, tar_block = 1},
sounds = sound_stone,
},
+ ["dirt_compressed"] = {
+ description = S("Compressed Dirt"),
+ groups = {crumbly=2},
+ is_ground_content = false,
+ sounds = sound_dirt,
+ },
["cobble_compressed"] = {
description = S("Compressed Cobblestone"),
groups = {cracky = 1},
sounds = sound_stone,
},
+ ["cobble_condensed"] = {
+ description = "Condensed Cobblestone",
+ tiles = {"moreblocks_cobble_compressed.png^[colorize:black:255]"},
+ is_ground_content = false,
+ groups = {cracky = 1, stone = 2},
+ stack_max = 999,
+ sounds = default.node_sound_stone_defaults(),
+ },
["plankstone"] = {
description = S("Plankstone"),
groups = {cracky = 3},
@@ -141,8 +156,9 @@ local nodes = {
["iron_glass"] = {
description = S("Iron Glass"),
drawtype = "glasslike_framed_optional",
- --tiles = {"moreblocks_iron_glass.png", "moreblocks_iron_glass_detail.png"},
- tiles = {"moreblocks_iron_glass.png"},
+ tiles = {"moreblocks_iron_glass.png", "moreblocks_iron_glass_detail.png"},
+ --tiles = {"moreblocks_iron_glass.png"},
+ one_texture = true,
paramtype = "light",
sunlight_propagates = true,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
@@ -151,8 +167,9 @@ local nodes = {
["coal_glass"] = {
description = S("Coal Glass"),
drawtype = "glasslike_framed_optional",
- --tiles = {"moreblocks_coal_glass.png", "moreblocks_coal_glass_detail.png"},
- tiles = {"moreblocks_coal_glass.png"},
+ tiles = {"moreblocks_coal_glass.png", "moreblocks_coal_glass_detail.png"},
+ --tiles = {"moreblocks_coal_glass.png"},
+ one_texture = true,
paramtype = "light",
sunlight_propagates = true,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
@@ -161,8 +178,9 @@ local nodes = {
["clean_glass"] = {
description = S("Clean Glass"),
drawtype = "glasslike_framed_optional",
- --tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"},
+ tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"},
tiles = {"moreblocks_clean_glass.png"},
+ one_texture = true,
paramtype = "light",
sunlight_propagates = true,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
@@ -232,11 +250,22 @@ local nodes = {
sounds = sound_stone,
no_stairs = true,
},
+ ["trap_desert_stone"] = {
+ description = S("Trap Desert Stone"),
+ drawtype = "glasslike_framed",
+ tiles = {"default_desert_stone.png^moreblocks_trap_box.png"},
+ walkable = false,
+ groups = {cracky = 3},
+ paramtype = "light",
+ is_ground_content = false,
+ sounds = sound_stone,
+ no_stairs = true,
+ },
["trap_glass"] = {
description = S("Trap Glass"),
drawtype = "glasslike_framed_optional",
- --tiles = {"moreblocks_trap_glass.png", "default_glass_detail.png"},
- tiles = {"moreblocks_trap_glass.png"},
+ tiles = {"moreblocks_trap_glass.png", "default_glass_detail.png"},
+ --tiles = {"moreblocks_trap_glass.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@@ -244,6 +273,40 @@ local nodes = {
sounds = sound_glass,
no_stairs = true,
},
+ ["trap_obsidian_glass"] = {
+ description = S("Trap Obsidian Glass"),
+ drawtype = "glasslike_framed_optional",
+ tiles = {"default_obsidian_glass.png^moreblocks_trap_box_glass.png", "default_obsidian_glass_detail.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ is_ground_content = false,
+ walkable = false,
+ groups = {cracky = 3, oddly_breakable_by_hand = 3},
+ sounds = sound_glass,
+ no_stairs = true,
+ },
+ ["trap_obsidian"] = {
+ description = S("Trap Obsidian"),
+ drawtype = "glasslike_framed",
+ tiles = {"default_obsidian.png^moreblocks_trap_box.png"},
+ walkable = false,
+ groups = {cracky = 1, level = 2},
+ paramtype = "light",
+ is_ground_content = false,
+ sounds = sound_stone,
+ no_stairs = true,
+ },
+ ["trap_sandstone"] = {
+ description = S("Trap Sandstone"),
+ drawtype = "glasslike_framed",
+ tiles = {"default_sandstone.png^moreblocks_trap_box.png"},
+ walkable = false,
+ groups = {crumbly = 1, cracky = 3},
+ paramtype = "light",
+ is_ground_content = false,
+ sounds = sound_stone,
+ no_stairs = true,
+ },
["all_faces_tree"] = {
description = S("All-faces Tree"),
tiles = {"default_tree_top.png"},
@@ -258,11 +321,33 @@ local nodes = {
sounds = sound_wood,
furnace_burntime = 30,
},
+ ["all_faces_pine_tree"] = {
+ description = S("All-faces Pine Tree"),
+ tiles = {"default_pine_tree_top.png"},
+ groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
+ sounds = sound_wood,
+ furnace_burntime = 26,
+ },
+ ["all_faces_acacia_tree"] = {
+ description = S("All-faces Acacia Tree"),
+ tiles = {"default_acacia_tree_top.png"},
+ groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
+ sounds = sound_wood,
+ furnace_burntime = 34,
+ },
+ ["all_faces_aspen_tree"] = {
+ description = S("All-faces Aspen Tree"),
+ tiles = {"default_aspen_tree_top.png"},
+ groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
+ sounds = sound_wood,
+ furnace_burntime = 22,
+ },
["glow_glass"] = {
description = S("Glow Glass"),
drawtype = "glasslike_framed_optional",
- --tiles = {"moreblocks_glow_glass.png", "moreblocks_glow_glass_detail.png"},
+ tiles = {"moreblocks_glow_glass.png", "moreblocks_glow_glass_detail.png"},
tiles = {"moreblocks_glow_glass.png"},
+ one_texture = true,
paramtype = "light",
sunlight_propagates = true,
light_source = 11,
@@ -272,8 +357,8 @@ local nodes = {
["trap_glow_glass"] = {
description = S("Trap Glow Glass"),
drawtype = "glasslike_framed_optional",
- --tiles = {"moreblocks_trap_glass.png", "moreblocks_glow_glass_detail.png"},
- tiles = {"moreblocks_trap_glass.png"},
+ tiles = {"moreblocks_trap_glass.png", "moreblocks_glow_glass_detail.png"},
+ --tiles = {"moreblocks_trap_glass.png"},
paramtype = "light",
sunlight_propagates = true,
light_source = 11,
@@ -285,9 +370,10 @@ local nodes = {
["super_glow_glass"] = {
description = S("Super Glow Glass"),
drawtype = "glasslike_framed_optional",
- --tiles = {"moreblocks_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"},
+ tiles = {"moreblocks_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"},
--tiles = {"moreblocks_super_glow_glass.png"},
- tiles = {"default_glass.png^[colorize:#FFFF78"},
+ one_texture = true,
+ -- tiles = {"default_glass.png^[colorize:#FFFF78"},
paramtype = "light",
sunlight_propagates = true,
light_source = 14,
@@ -297,8 +383,8 @@ local nodes = {
["trap_super_glow_glass"] = {
description = S("Trap Super Glow Glass"),
drawtype = "glasslike_framed_optional",
- --tiles = {"moreblocks_trap_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"},
- tiles = {"moreblocks_trap_super_glow_glass.png"},
+ tiles = {"moreblocks_trap_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"},
+ --tiles = {"moreblocks_trap_super_glow_glass.png"},
paramtype = "light",
sunlight_propagates = true,
light_source = 14,
@@ -329,6 +415,17 @@ local nodes = {
},
}
+if minetest.get_modpath("ethereal") then
+ nodes["all_faces_mushroom_tree"] = {
+ description = S("All-faces Mushroom Tree"),
+ tiles = {"mushroom_trunk_top.png"},
+ groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
+ sounds = sound_wood,
+ furnace_burntime = 22,
+ }
+end
+
+
for name, def in pairs(nodes) do
def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"}
minetest.register_node("moreblocks:" ..name, def)
diff --git a/stairsplus/registrations.lua b/stairsplus/registrations.lua
index 7c5ad50..5e07de4 100644
--- a/stairsplus/registrations.lua
+++ b/stairsplus/registrations.lua
@@ -51,6 +51,11 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
"farming:straw"
}
+if minetest.get_modpath("ehlphabet") then
+ table.insert(default_nodes,"ehlphabet:block")
+end
+
+
for _, name in pairs(default_nodes) do
local nodename = "default:"..name
local a,b = string.find(name, ":")