Updated renewal mechanics for Minetest Game 5.1.1

master
Alexand(er|ra) Yst 2020-03-31 14:20:15 -07:00
parent 54dbb25d2c
commit dec527de0d
27 changed files with 470 additions and 331 deletions

View File

@ -1,49 +0,0 @@
All textures included in this mod were derived from textures licensed
under CC BY-SA 3.0, and are therefore licenced under CC BY-SA 3.0
themselves. Specifically:
-----------------------------------------------------------------------
renew-compost.png
-----------------------------------------------------------------------
This image uses pixel data from the following images:
* default_acacia_leaves_simple.png by paramat (CC BY-SA 3.0)
* default_aspen_leaves.png by BlockMen (CC BY-SA 3.0)
* This image was derived from an image by Sofar (CC BY-SA 3.0)
* default_dirt.png by Neuromancer (CC BY-SA 3.0)
* default_jungleleaves.png by PilzAdam (CC BY-SA 3.0)
* default_leaves.png by Cisoun (CC BY-SA 3.0)
-----------------------------------------------------------------------
renew-grinder_front.png
-----------------------------------------------------------------------
This texture was derived from the following images, with a very slight
addition from Alex Yst <https://y.st./>:
* default_steel_block.png by kilbith (CC BY-SA 3.0)
* default_furnace_front.png by Neuromancer (CC BY-SA 3.0)
-----------------------------------------------------------------------
renew-grinder_side.png
-----------------------------------------------------------------------
This texture was derived from default_steel_block.png by kilbith
(CC BY-SA 3.0), but also inspired by (but not including material from)
default_furnace_side.png by Neuromancer (CC BY-SA 3.0).
-----------------------------------------------------------------------
renew-grinder_top.png
-----------------------------------------------------------------------
This texture was derived from default_steel_block.png by kilbith
(CC BY-SA 3.0), but also inspired by (but not including material from)
default_furnace_top.png by Neuromancer (CC BY-SA 3.0).
-----------------------------------------------------------------------
renew-mineral_obsidian.png
-----------------------------------------------------------------------
This image splices the mineral shape of coal ore with the pattern and
colours of obsidian. Images used:
* default_mineral_coal.png by Perttu "celeron55" Ahola <celeron55@gmail.com> (CC BY-SA 3.0)
* default_obsidian.png by jojoa1997 (CC BY-SA 3.0)

View File

@ -15,50 +15,13 @@
-- License along with this program. If not, see
-- <https://www.gnu.org./licenses/>.
minetest.register_node("renew:compost", {
description = "Compost",
tiles = {"renew-compost.png"},
groups = {crumbly=3, soil=1},
sounds = default.node_sound_dirt_defaults(),
})
minetest.register_alias("renew:compost", "default:dirt")
minetest.register_craft({
output = "renew:compost",
output = "default:dirt",
recipe = {
{"group:leaves", "group:leaves", "group:leaves"},
{"group:leaves", "group:leaves", "group:leaves"},
{"group:leaves", "group:leaves", "group:leaves"},
}
})
minetest.register_abm({
label = "Compost rotting",
nodenames = {"renew:compost"},
neighbors = {"group:spreading_dirt_type", "group:flora", "flowers:mushroom_brown", "flowers:mushroom_red"},
interval = 60,
chance = 60,
catch_up = true,
action = function(pos)
-- If the node above is not air, a plant, or a decomposer (a mushroom),
-- decomposition cannot occur.
local node_above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
if node_above.name ~= "air"
and node_above.name ~= "flowers:mushroom_brown"
and node_above.name ~= "flowers:mushroom_red"
and minetest.get_item_group(node_above.name, "flora") == 0 then
return
end
-- Spreading dirt types will take over compost, converting it into
-- their specific type of dirt.
local spreader_pos = minetest.find_node_near(pos, 1, "group:spreading_dirt_type")
if spreader_pos then
local spreader = minetest.get_node(spreader_pos)
minetest.set_node(pos, {name=spreader.name})
return
-- If a spreading dirt type isn't around, compost will simply decompose
-- into regular dirt, but only if something is growing on it.
elseif node_above.name ~= "air" then
minetest.set_node(pos, {name="default:dirt"})
end
end,
})

View File

@ -15,7 +15,18 @@
-- License along with this program. If not, see
-- <https://www.gnu.org./licenses/>.
if minetest.get_mapgen_params().mgname ~= "v6" then
if minetest.get_mapgen_setting("mgname") ~= "v6" then
local coral_colour = {
"default:coral_brown" ,
"default:coral_orange",
}
local rooted_coral_colour = {
"default:coral_cyan",
"default:coral_green",
"default:coral_pink",
}
minetest.register_abm({
label = "Coral Propagation",
nodenames = {"default:coral_brown", "default:coral_orange"},
@ -38,11 +49,7 @@ if minetest.get_mapgen_params().mgname ~= "v6" then
and minetest.get_item_group(old_node.name, "water") > 0
and minetest.find_node_near(new_pos, 4, "group:sand")
and not minetest.find_node_near(new_pos, 1, "air") then
local new_node = {
"default:coral_brown" ,
"default:coral_orange",
}
minetest.set_node(new_pos, {name = new_node[math.random(2)]})
minetest.set_node(new_pos, {name = coral_colour[math.random(2)]})
end
end,
})
@ -57,11 +64,27 @@ if minetest.get_mapgen_params().mgname ~= "v6" then
action = function(pos)
if pos.y >= -8 and pos.y <= 0
and not minetest.find_node_near(pos, 1, "air") then
local new_node = {
"default:coral_brown" ,
"default:coral_orange",
}
minetest.set_node(pos, {name = new_node[math.random(2)]})
minetest.set_node(pos, {name = coral_colour[math.random(2)]})
end
end,
})
minetest.register_abm({
label = "Rooted Coral Propagation",
nodenames = {"default:coral_skeleton"},
neighbors = {"group:water"},
interval = 1800,
chance = 900,
catch_up = true,
action = function(pos)
if minetest.get_node({
x = pos.x,
y = pos.y + 1,
z = pos.z,
}).name == "default:water_source" then
minetest.set_node(new_pos, {
name = rooted_coral_colour[math.random(3)],
})
end
end,
})

View File

@ -1,4 +0,0 @@
default
flowers
minequest?
minestats?

View File

@ -1,12 +0,0 @@
minetest.register_craft({
type = "cooking",
output = "default:desert_stone",
recipe = "default:desert_sandstone",
})
minetest.register_craft({
type = "cooking",
output = "default:stone",
recipe = "default:silver_sandstone",
})

View File

@ -1,5 +1,5 @@
-- Renew mod for Minetest
-- Copyright © 2018 Alex Yst <https://y.st./>
-- Copyright © 2020 Alex Yst <https://y.st./>
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
@ -15,17 +15,23 @@
-- License along with this program. If not, see
-- <https://www.gnu.org./licenses/>.
-- When stone is mined, it degrades into cobble. When cobble is mined,
-- it occasionally degrades into gravel. When gravel is mined, it
-- more-frequently degrades into flint.
minetest.override_item("default:cobble", {
drop = {
max_items = 1,
items = {
{items = {"default:gravel", "default:silver_sand"}, rarity = 20},
{items = {"default:cobble"}},
},
minetest.register_abm({
label = "Soil Moisture Loss",
nodenames = {
"default:dry_grass_1",
"default:dry_grass_2",
"default:dry_grass_3",
"default:dry_grass_4",
"default:dry_grass_5",
},
neighbors = {"default:dirt"},
interval = 1800,
chance = 900,
catch_up = true,
action = function(pos)
pos.y = pos.y - 1
if minetest.get_node(pos).name == "default:dirt" then
minetest.set_node(pos, {name = "default:dry_dirt_with_dry_grass"})
end
end,
})

16
ice.lua
View File

@ -15,14 +15,12 @@
-- License along with this program. If not, see
-- <https://www.gnu.org./licenses/>.
minetest.register_abm({
label = "Snow Freezing",
nodenames = {"default:snowblock"},
neighbors = {"group:water"},
interval = 60,
chance = 16,
catch_up = true,
action = function(pos)
minetest.set_node(pos, {name = "default:ice"})
minetest.override_item("default:snow", {
on_flood = function(pos, oldnode, newnode)
if minetest.registered_items[newnode.name]
and minetest.registered_items[newnode.name].groups
and minetest.registered_items[newnode.name].groups.water then
minetest.set_node(pos, {name = "default:cave_ice"})
end
end,
})

View File

@ -1,5 +1,5 @@
-- Renew mod for Minetest
-- Copyright © 2018 Alex Yst <https://y.st./>
-- Copyright © 2018, 2020 Alex Yst <https://y.st./>
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
@ -18,14 +18,13 @@
dofile(minetest.get_modpath("renew").."/clay.lua")
dofile(minetest.get_modpath("renew").."/compost.lua")
dofile(minetest.get_modpath("renew").."/coral.lua")
dofile(minetest.get_modpath("renew").."/desert_stone.lua")
dofile(minetest.get_modpath("renew").."/gravel.lua")
dofile(minetest.get_modpath("renew").."/dry_dirt.lua")
dofile(minetest.get_modpath("renew").."/ice.lua")
dofile(minetest.get_modpath("renew").."/insects.lua")
dofile(minetest.get_modpath("renew").."/kelp.lua")
dofile(minetest.get_modpath("renew").."/lava.lua")
dofile(minetest.get_modpath("renew").."/lava_cooling.lua")
dofile(minetest.get_modpath("renew").."/minequest.lua")
dofile(minetest.get_modpath("renew").."/minestats.lua")
dofile(minetest.get_modpath("renew").."/obsidian.lua")
dofile(minetest.get_modpath("renew").."/sand.lua")
dofile(minetest.get_modpath("renew").."/water.lua")
dofile(minetest.get_modpath("renew").."/marram_grass.lua")
dofile(minetest.get_modpath("renew").."/permafrost.lua")
dofile(minetest.get_modpath("renew").."/waterlily.lua")

View File

@ -1,5 +1,5 @@
-- Renew mod for Minetest
-- Copyright © 2018 Alex Yst <https://y.st./>
-- Copyright © 2020 Alex Yst <https://y.st./>
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
@ -15,15 +15,22 @@
-- License along with this program. If not, see
-- <https://www.gnu.org./licenses/>.
if minetest.get_modpath("minestats") then
__minestats__.register_is_countable(function(node_name, drop, drop_opts)
if node_name:sub(1, 6) == "renew:" then
local start = drop:find(":") + 1
return drop:sub(start) == node_name:sub(7)
else
return (drop == "default:coral_skeleton" and minetest.get_mapgen_params().mgname ~= "v6")
or (node_name == "default:cobble" and drop == "default:gravel")
or (node_name == "default:cobble" and drop == "default:silver_sand")
minetest.register_abm({
label = "Insect Breeding",
nodenames = {
"butterflies:hidden_butterfly_red",
"butterflies:hidden_butterfly_violet",
"butterflies:hidden_butterfly_white",
"fireflies:hidden_firefly",
},
interval = 1800,
chance = 900,
catch_up = true,
action = function(pos)
local egg = minetest.find_node_near(pos, 16, "air", false)
if egg then
minetest.set_node(egg, minetest.get_node(pos))
minetest.get_node_timer(egg):start(1)
end
end)
end
end,
})

55
kelp.lua Normal file
View File

@ -0,0 +1,55 @@
-- Renew mod for Minetest
-- Copyright © 2020 Alex Yst <https://y.st./>
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
-- This software is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public
-- License along with this program. If not, see
-- <https://www.gnu.org./licenses/>.
minetest.register_abm({
label = "Kelp Spread",
nodenames = {"default:sand_with_kelp"},
interval = 30,
chance = 50,
action = function(pos)
local seeds = {}
local potential_seeds = minetest.find_nodes_in_area({
x = pos.x - 5,
y = pos.y - 5,
z = pos.z - 5,
}, {
x = pos.x + 5,
y = pos.y + 5,
z = pos.z + 5,
}, "default:sand")
for _, seed_pos in next, potential_seeds do
local water = minetest.find_nodes_in_area({
x = seed_pos.x,
y = seed_pos.y + 1,
z = seed_pos.z,
}, {
x = seed_pos.x,
y = seed_pos.y + 6,
z = seed_pos.z,
}, "default:water_source")
if #water == 6 then
seeds[#seeds+1] = seed_pos
end
end
if #seeds > 0 then
minetest.set_node(seeds[math.random(#seeds)], {
name = "default:sand_with_kelp",
param2 = math.random(4, 6) * 16,
})
end
end,
})

View File

@ -142,24 +142,31 @@ local function spawn_diamond(y)
end
function default.cool_lava(pos, node)
if spawn_coal(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_coal"})
elseif spawn_iron(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_iron"})
elseif spawn_copper(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_copper"})
elseif spawn_tin(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_tin"})
elseif spawn_gold(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_gold"})
elseif spawn_mese(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_mese"})
elseif spawn_diamond(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_diamond"})
elseif spawn_diamond(pos.y) then
minetest.set_node(pos, {name = "renew:obsidian_shard"})
local wet = minetest.find_node_near(pos, 1, "group:water")
if node.name == "default:lava_source" and not wet then
minetest.set_node(pos, {name = "default:obsidian"})
elseif wet or (pos.y < -112 and node.name ~= "default:lava_source") then
if spawn_coal(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_coal"})
elseif spawn_iron(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_iron"})
elseif spawn_copper(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_copper"})
elseif spawn_tin(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_tin"})
elseif spawn_gold(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_gold"})
elseif spawn_mese(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_mese"})
elseif spawn_diamond(pos.y) then
minetest.set_node(pos, {name = "default:stone_with_diamond"})
else
minetest.set_node(pos, {name = "default:stone"})
end
else
minetest.set_node(pos, {name = "default:stone"})
minetest.set_node(pos, {name = "default:desert_stone"})
end
minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25})
end
minetest.register_alias("renew:obsidian_shard", "default:obsidian")

45
marram_grass.lua Normal file
View File

@ -0,0 +1,45 @@
-- Renew mod for Minetest
-- Copyright © 2020 Alex Yst <https://y.st./>
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
-- This software is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public
-- License along with this program. If not, see
-- <https://www.gnu.org./licenses/>.
local nodenames = {
"default:marram_grass_1",
"default:marram_grass_2",
"default:marram_grass_3"
}
minetest.register_abm({
label = "Marram Grass Propagation",
nodenames = nodenames,
neighbors = {"default:sand"},
interval = 1800,
chance = 900,
catch_up = true,
action = function(pos)
local candidates = minetest.find_nodes_in_area_under_air({
x = pos.x - 1,
y = pos.y - 1,
z = pos.z - 1,
}, {
x = pos.x + 1,
y = pos.y + 1,
z = pos.z + 1,
}, "default:sand")
if #candidates > 0 then
minetest.set_node(math.random(#candidates), {name = nodenames[math.random(3)]})
end
end,
})

View File

@ -1,3 +0,0 @@
if minetest.get_modpath("minequest") then
__minequest__.register_element("default:silver_sand", "default:silver_sand")
end

2
mod.conf Normal file
View File

@ -0,0 +1,2 @@
name = renew
depends = butterflies, default, fireflies, flowers

View File

@ -1,62 +0,0 @@
-- Renew mod for Minetest
-- Copyright © 2018 Alex Yst <https://y.st./>
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
-- This software is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public
-- License along with this program. If not, see
-- <https://www.gnu.org./licenses/>.
-- This file contains numbers from the ore-spawning code from Minetest
-- Game's default mod. That code is copyright Perttu "celeron55" Ahola
-- <celeron55@gmail.com>, and was likewise released under the GNU
-- LGPLv2.1+.
minetest.register_node("renew:obsidian_shard", {
-- description = "Obsidian Ore",
tiles = {"default_stone.png^renew-mineral_obsidian.png"},
groups = {cracky = 1},
drop = "default:obsidian_shard",
sounds = default.node_sound_stone_defaults(),
})
minetest.register_ore({
ore_type = "scatter",
ore = "renew:obsidian_shard",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 4,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "renew:obsidian_shard",
wherein = "default:stone",
clust_scarcity = 17 * 17 * 17,
clust_num_ores = 4,
clust_size = 3,
y_min = -255,
y_max = -128,
})
minetest.register_ore({
ore_type = "scatter",
ore = "renew:obsidian_shard",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 4,
clust_size = 3,
y_min = -31000,
y_max = -256,
})

43
permafrost.lua Normal file
View File

@ -0,0 +1,43 @@
-- Renew mod for Minetest
-- Copyright © 2020 Alex Yst <https://y.st./>
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
-- This software is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public
-- License along with this program. If not, see
-- <https://www.gnu.org./licenses/>.
minetest.register_craft({
output = "default:permafrost 9",
recipe = {
{"default:dirt", "default:ice", "default:dirt"},
{"default:ice", "default:dirt", "default:ice" },
{"default:dirt", "default:ice", "default:dirt"},
}
})
minetest.register_craft({
output = "default:permafrost_with_moss 9",
recipe = {
{"default:dirt", "default:ice", "default:dirt"},
{"default:ice", "default:mossycobble", "default:ice" },
{"default:dirt", "default:ice", "default:dirt"},
}
})
minetest.register_craft({
output = "default:permafrost_with_stones 9",
recipe = {
{"default:dirt", "default:ice" , "default:dirt"},
{"default:ice", "default:cobble", "default:ice" },
{"default:dirt", "default:ice" , "default:dirt"},
}
})

248
sand.lua
View File

@ -1,53 +1,225 @@
minetest.register_craft({
type = "shapeless",
output = "default:sand 8",
recipe = {
"default:silver_sand",
"default:silver_sand",
"default:silver_sand",
"default:silver_sand",
"default:silver_sand",
"default:silver_sand",
"default:silver_sand",
"default:silver_sand",
"default:iron_lump",
-- Renew mod for Minetest
-- Copyright © 2020 Alex Yst <https://y.st./>
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
-- This software is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public
-- License along with this program. If not, see
-- <https://www.gnu.org./licenses/>.
-- Tools
minetest.register_tool("renew:sledgehammer_wood", {
description = "Wooden Sledgehammer",
inventory_image = "renew-sledgehammer_wood.png",
tool_capabilities = {
full_punch_interval = 1.2,
max_drop_level=0,
groupcaps={
pulverizeable = {times={[3]=1.60}, uses=10, maxlevel=1},
},
damage_groups = {fleshy=2},
},
groups = {flammable = 2},
sound = {breaks = "default_tool_breaks"},
})
minetest.register_tool("renew:sledgehammer_stone", {
description = "Stone Sledgehammer",
inventory_image = "renew-sledgehammer_stone.png",
tool_capabilities = {
full_punch_interval = 1.3,
max_drop_level=0,
groupcaps={
pulverizeable = {times={[2]=2.0, [3]=1.00}, uses=20, maxlevel=1},
},
damage_groups = {fleshy=3},
},
sound = {breaks = "default_tool_breaks"},
})
minetest.register_tool("renew:sledgehammer_steel", {
description = "Steel Sledgehammer",
inventory_image = "renew-sledgehammer_steel.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=1,
groupcaps={
pulverizeable = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=20, maxlevel=2},
},
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
})
minetest.register_tool("renew:sledgehammer_bronze", {
description = "Bronze Sledgehammer",
inventory_image = "renew-sledgehammer_bronze.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=1,
groupcaps={
pulverizeable = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=30, maxlevel=2},
},
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
})
minetest.register_tool("renew:sledgehammer_mese", {
description = "Mese Sledgehammer",
inventory_image = "renew-sledgehammer_mese.png",
tool_capabilities = {
full_punch_interval = 0.9,
max_drop_level=3,
groupcaps={
pulverizeable = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=20, maxlevel=3},
},
damage_groups = {fleshy=5},
},
sound = {breaks = "default_tool_breaks"},
})
minetest.register_tool("renew:sledgehammer_diamond", {
description = "Diamond Sledgehammer",
inventory_image = "renew-sledgehammer_diamond.png",
tool_capabilities = {
full_punch_interval = 0.9,
max_drop_level=3,
groupcaps={
pulverizeable = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=30, maxlevel=3},
},
damage_groups = {fleshy=5},
},
sound = {breaks = "default_tool_breaks"},
})
-- Recipes
minetest.register_craft({
output = "renew:sledgehammer_wood",
recipe = {
{"group:wood", "group:stick", "group:wood"},
{"" , "group:stick", "" },
{"" , "group:stick", "" },
}
})
minetest.register_craft({
type = "shapeless",
output = "default:desert_sand 8",
output = "renew:sledgehammer_stone",
recipe = {
"default:sand",
"default:sand",
"default:sand",
"default:sand",
"default:sand",
"default:sand",
"default:sand",
"default:sand",
"default:iron_lump",
},
{"group:stone", "group:stick", "group:stone"},
{"" , "group:stick", "" },
{"" , "group:stick", "" },
}
})
minetest.register_craft({
type = "shapeless",
output = "default:desert_sand 4",
output = "renew:sledgehammer_steel",
recipe = {
"default:silver_sand",
"default:silver_sand",
"default:silver_sand",
"default:silver_sand",
"default:iron_lump",
},
{"default:steel_ingot", "group:stick", "default:steel_ingot"},
{"" , "group:stick", "" },
{"" , "group:stick", "" },
}
})
minetest.register_craft({
type = "shapeless",
output = "default:sand 2",
output = "renew:sledgehammer_bronze",
recipe = {
"default:silver_sand",
"default:desert_sand",
},
{"default:bronze_ingot", "group:stick", "default:bronze_ingot"},
{"" , "group:stick", "" },
{"" , "group:stick", "" },
}
})
minetest.register_craft({
output = "renew:sledgehammer_mese",
recipe = {
{"default:mese_crystal", "group:stick", "default:mese_crystal"},
{"" , "group:stick", "" },
{"" , "group:stick", "" },
}
})
minetest.register_craft({
output = "renew:sledgehammer_diamond",
recipe = {
{"default:diamond", "group:stick", "default:diamond"},
{"" , "group:stick", "" },
{"" , "group:stick", "" },
}
})
-- Node modifications
minetest.registered_nodes["default:cobble"].groups.pulverizeable = minetest.registered_nodes["default:cobble"].groups.cracky
minetest.override_item("default:cobble", {
on_dig = function(pos, node, digger)
if not minetest.is_protected(pos, digger:get_player_name())
and string.sub(digger:get_wielded_item():get_name(), 1, 19) == "renew:sledgehammer_" then
minetest.set_node(pos, {name="default:sandstone"})
local tool = digger:get_wielded_item()
local groups = minetest.registered_nodes["default:cobble"].groups
tool:add_wear(minetest.get_dig_params(groups, tool:get_tool_capabilities()).wear)
digger:set_wielded_item(tool)
else
minetest.node_dig(pos, node, digger)
end
end,
})
minetest.registered_nodes["default:stone"].groups.pulverizeable = minetest.registered_nodes["default:stone"].groups.cracky
minetest.override_item("default:stone", {
on_dig = function(pos, node, digger)
if not minetest.is_protected(pos, digger:get_player_name())
and string.sub(digger:get_wielded_item():get_name(), 1, 19) == "renew:sledgehammer_" then
minetest.set_node(pos, {name="default:gravel"})
local tool = digger:get_wielded_item()
local groups = minetest.registered_nodes["default:stone"].groups
tool:add_wear(minetest.get_dig_params(groups, tool:get_tool_capabilities()).wear)
digger:set_wielded_item(tool)
else
minetest.node_dig(pos, node, digger)
end
end,
})
minetest.registered_nodes["default:desert_cobble"].groups.pulverizeable = minetest.registered_nodes["default:desert_cobble"].groups.cracky
minetest.override_item("default:desert_cobble", {
on_dig = function(pos, node, digger)
if not minetest.is_protected(pos, digger:get_player_name())
and string.sub(digger:get_wielded_item():get_name(), 1, 19) == "renew:sledgehammer_" then
minetest.set_node(pos, {name="default:desert_sand"})
local tool = digger:get_wielded_item()
local groups = minetest.registered_nodes["default:desert_cobble"].groups
tool:add_wear(minetest.get_dig_params(groups, tool:get_tool_capabilities()).wear)
digger:set_wielded_item(tool)
else
minetest.node_dig(pos, node, digger)
end
end,
})
minetest.registered_nodes["default:coral_skeleton"].groups.pulverizeable = minetest.registered_nodes["default:coral_skeleton"].groups.cracky
minetest.override_item("default:coral_skeleton", {
on_dig = function(pos, node, digger)
if not minetest.is_protected(pos, digger:get_player_name())
and string.sub(digger:get_wielded_item():get_name(), 1, 19) == "renew:sledgehammer_" then
minetest.set_node(pos, {name="default:silver_sand"})
local tool = digger:get_wielded_item()
local groups = minetest.registered_nodes["default:coral_skeleton"].groups
tool:add_wear(minetest.get_dig_params(groups, tool:get_tool_capabilities()).wear)
digger:set_wielded_item(tool)
else
minetest.node_dig(pos, node, digger)
end
end,
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

View File

@ -1,51 +0,0 @@
-- Renew mod for Minetest
-- Copyright © 2018 Alex Yst <https://y.st./>
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
-- This software is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public
-- License along with this program. If not, see
-- <https://www.gnu.org./licenses/>.
if minetest.get_mapgen_params().mgname == "valleys" then
minetest.register_craft({
type = "shapeless",
output = "bucket:bucket_river_water",
recipe = {"bucket:bucket_water", "default:gravel", "default:desert_sand", "bucket:bucket_empty"},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"},
{"default:gravel", "default:gravel"},
{"default:desert_sand", "default:desert_sand"},
},
})
minetest.register_craft({
type = "shapeless",
output = "bucket:bucket_river_water",
recipe = {"bucket:bucket_water", "default:gravel", "default:sand", "bucket:bucket_empty"},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"},
{"default:gravel", "default:gravel"},
{"default:sand", "default:sand"},
},
})
minetest.register_craft({
type = "shapeless",
output = "bucket:bucket_river_water",
recipe = {"bucket:bucket_water", "default:gravel", "default:silver_sand", "bucket:bucket_empty"},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"},
{"default:gravel", "default:gravel"},
{"default:silver_sand", "default:silver_sand"},
},
})
end

View File

@ -16,8 +16,8 @@
-- <https://www.gnu.org./licenses/>.
minetest.register_abm({
label = "Water lily spread",
nodenames = {"flowers:waterlily"},
label = "Water Lily Spread",
nodenames = {"flowers:waterlily_waving"},
interval = 11,
chance = 50,
action = function(pos)
@ -58,7 +58,7 @@ minetest.register_abm({
x=seedling_above.x+1,
y=seedling_above.y,
z=seedling_above.z+1,
}, "flowers:waterlily")
}, "flowers:waterlily_waving")
-- The new location has the same requirements as the old location, but
-- with the added requirement that a new water lily will not grow where
@ -71,7 +71,7 @@ minetest.register_abm({
or nearby_lilies > 4 then
return
end
minetest.set_node(seedling_above, {name = "flowers:waterlily", param2=math.random(0, 3)})
minetest.set_node(seedling_above, {name = "flowers:waterlily_waving", param2=math.random(0, 3)})
end
end
})