Moved the Spreader buff from shovels to hoes and updated the Transplanter buff to not allow it to transplant tilled soil

master
Alexand(er|ra) Yst 2021-01-14 21:17:02 -08:00
parent 81416e8af2
commit 4c2c481ef4
4 changed files with 29 additions and 28 deletions

@ -1 +1 @@
Subproject commit 22de1455c6893ae10d8ca4d7f6372706add788b4
Subproject commit e3bd7b75636e5b71fa87720440a1871a72672fde

View File

@ -126,33 +126,33 @@ return {
sand = "soulbound",
coal_lump = "soulbound",
iron_lump = "soulbound",
sapling = "soulbound",
sapling = "spreader",
mese_crystal = "durable",
copper_lump = "soulbound",
diamond = "durable",
gold_lump = "soulbound",
junglesapling = "soulbound",
seed_cotton = "soulbound",
seed_wheat = "soulbound",
junglesapling = "spreader",
seed_cotton = "spreader",
seed_wheat = "spreader",
string = "soulbound",
wheat = "soulbound",
cotton = "soulbound",
pine_sapling = "soulbound",
acacia_sapling = "soulbound",
pine_sapling = "spreader",
acacia_sapling = "spreader",
mushroom_brown = "soulbound",
mushroom_red = "soulbound",
mushroom_spores_brown = "soulbound",
mushroom_spores_red = "soulbound",
aspen_sapling = "soulbound",
mushroom_spores_brown = "spreader",
mushroom_spores_red = "spreader",
aspen_sapling = "spreader",
flint = "soulbound",
coral_skeleton = "soulbound",
acacia_bush_sapling = "soulbound",
bush_sapling = "soulbound",
acacia_bush_sapling = "spreader",
bush_sapling = "spreader",
tin_lump = "soulbound",
blueberries = "soulbound",
blueberry_bush_sapling = "soulbound",
blueberry_bush_sapling = "spreader",
ice = "soulbound",
pine_bush_sapling = "soulbound",
pine_bush_sapling = "spreader",
dry_dirt = "soulbound",
},
screwdriver = {
@ -205,9 +205,9 @@ return {
cotton = "rapid",
pine_sapling = "thirst",
acacia_sapling = "thirst",
mushroom_brown = "spreader",
mushroom_brown = "soulbound",
mushroom_red = "soulbound",
mushroom_spores_brown = "spreader",
mushroom_spores_brown = "soulbound",
mushroom_spores_red = "soulbound",
aspen_sapling = "thirst",
flint = "thirst",

View File

@ -710,7 +710,8 @@ liblevelup.register.startup_function(function()
and tool:get_meta():get("thirst") then
drops[1] = force_drop[drops.node_dug].drop
end
elseif drops[1] == "default:dirt" and drops.node_dug ~= "default:dirt" then
elseif drops[1] == "default:dirt" and drops.node_dug ~= "default:dirt"
and minetest.get_item_group(drops.node_dug, "spreading_dirt_type") ~= 0 then
local tool = digger:get_wielded_item()
if tool:get_name() == "runes:shovel"
and tool:get_meta():get("transplanter") then

View File

@ -152,17 +152,6 @@ minetest.register_tool("runes:shovel", {
},
sound = {breaks = "default_tool_breaks"},
groups = {shovel = 1, disable_repair = 1},
on_place = function(itemstack, user, pointed_thing)
local target = minetest.get_node(pointed_thing.under)
if target.name == "default:dirt" and itemstack:get_meta():get_string("spreader") then
spread_function(pointed_thing.under, target)
itemstack:add_wear(1)
return itemstack
elseif minetest.registered_nodes[target.name]
and minetest.registered_nodes[target.name].on_rightclick then
return minetest.registered_nodes[target.name].on_rightclick(pointed_thing.under, target, user, itemstack, pointed_thing)
end
end,
})
minetest.register_tool("runes:axe", {
@ -299,6 +288,17 @@ farming.register_hoe("runes:hoe", {
minetest.override_item("runes:hoe", {
inventory_overlay = "farming_tool_stonehoe.png",
wield_overlay = "farming_tool_stonehoe.png",
on_place = function(itemstack, user, pointed_thing)
local target = minetest.get_node(pointed_thing.under)
if target.name == "default:dirt" and itemstack:get_meta():get_string("spreader") then
spread_function(pointed_thing.under, target)
itemstack:add_wear(math.floor(65536/810))
return itemstack
elseif minetest.registered_nodes[target.name]
and minetest.registered_nodes[target.name].on_rightclick then
return minetest.registered_nodes[target.name].on_rightclick(pointed_thing.under, target, user, itemstack, pointed_thing)
end
end,
})
minetest.register_tool("runes:screwdriver", {