summaryrefslogtreecommitdiff
path: root/dryplants/init.lua
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-10-25 12:14:05 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-10-25 12:14:05 -0400
commitf23603a325cfad46e16550521d4409300af40b49 (patch)
tree7884df937ec836ac4b79d90ab3ed6e068ed2c60d /dryplants/init.lua
parent9d67dc5e829951b288f266a316c0bce06e9ae66e (diff)
downloaddreambuilder_modpack-f23603a325cfad46e16550521d4409300af40b49.tar
dreambuilder_modpack-f23603a325cfad46e16550521d4409300af40b49.tar.gz
dreambuilder_modpack-f23603a325cfad46e16550521d4409300af40b49.tar.bz2
dreambuilder_modpack-f23603a325cfad46e16550521d4409300af40b49.tar.xz
dreambuilder_modpack-f23603a325cfad46e16550521d4409300af40b49.zip
update biome_lib, plantlife (which includes switching
to Tenplus1's vines fork), and moretrees
Diffstat (limited to 'dryplants/init.lua')
-rw-r--r--dryplants/init.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/dryplants/init.lua b/dryplants/init.lua
index 461a9dd..9fde6eb 100644
--- a/dryplants/init.lua
+++ b/dryplants/init.lua
@@ -86,7 +86,7 @@ local function sickle_on_use(itemstack, user, pointed_thing, uses)
-- check if flora but no flower
if minetest.get_item_group(under.name, "flora") == 1 and minetest.get_item_group(under.name, "flower") == 0 then
-- turn the node into cut grass, wear out item and play sound
- minetest.set_node(pt.under, {name="dryplants:grass"})
+ minetest.swap_node(pt.under, {name="dryplants:grass"})
else -- otherwise dig the node
if not minetest.node_dig(pt.under, under, user) then
return
@@ -102,8 +102,8 @@ local function sickle_on_use(itemstack, user, pointed_thing, uses)
if minetest.is_protected(above_pos, user:get_player_name()) or above.name ~= "air" then
return
end
- minetest.set_node(pt.under, {name="dryplants:grass_short"})
- minetest.set_node(above_pos, {name="dryplants:grass"})
+ minetest.swap_node(pt.under, {name="dryplants:grass_short"})
+ minetest.swap_node(above_pos, {name="dryplants:grass"})
minetest.sound_play("default_dig_crumbly", {
pos = pt.under,
gain = 0.5,
@@ -148,7 +148,7 @@ minetest.register_abm({
interval = HAY_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
chance = 1,
action = function(pos)
- minetest.set_node(pos, {name="dryplants:hay"})
+ minetest.swap_node(pos, {name="dryplants:hay"})
end,
})
@@ -196,7 +196,7 @@ minetest.register_abm({
-- Only become dirt with grass if no cut grass or hay lies on top
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
if above.name ~= "dryplants:grass" and above.name ~= "dryplants:hay" then
- minetest.set_node(pos, {name="default:dirt_with_grass"})
+ minetest.swap_node(pos, {name="default:dirt_with_grass"})
end
end,
})