summaryrefslogtreecommitdiff
path: root/dryplants
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
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')
-rw-r--r--dryplants/init.lua10
-rw-r--r--dryplants/juncus.lua8
-rw-r--r--dryplants/meadowvariation.lua2
-rw-r--r--dryplants/moregrass.lua2
-rw-r--r--dryplants/reed.lua18
-rw-r--r--dryplants/reedmace.lua26
6 files changed, 33 insertions, 33 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,
})
diff --git a/dryplants/juncus.lua b/dryplants/juncus.lua
index 34176ce..4ba1cab 100644
--- a/dryplants/juncus.lua
+++ b/dryplants/juncus.lua
@@ -18,9 +18,9 @@ abstract_dryplants.grow_juncus = function(pos)
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
or minetest.get_node(right_here).name == "default:junglegrass" then
if juncus_type == 2 then
- minetest.set_node(right_here, {name="dryplants:juncus_02"})
+ minetest.swap_node(right_here, {name="dryplants:juncus_02"})
else
- minetest.set_node(right_here, {name="dryplants:juncus"})
+ minetest.swap_node(right_here, {name="dryplants:juncus"})
end
end
end
@@ -57,9 +57,9 @@ minetest.register_node("dryplants:juncus", {
local juncus_type = math.random(2,3)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
if juncus_type == 2 then
- minetest.set_node(right_here, {name="dryplants:juncus_02"})
+ minetest.swap_node(right_here, {name="dryplants:juncus_02"})
else
- minetest.set_node(right_here, {name="dryplants:juncus"})
+ minetest.swap_node(right_here, {name="dryplants:juncus"})
end
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
diff --git a/dryplants/meadowvariation.lua b/dryplants/meadowvariation.lua
index d703ae6..7554585 100644
--- a/dryplants/meadowvariation.lua
+++ b/dryplants/meadowvariation.lua
@@ -10,7 +10,7 @@
abstract_dryplants.grow_grass_variation = function(pos)
local right_here = {x=pos.x, y=pos.y, z=pos.z}
- minetest.set_node(right_here, {name="dryplants:grass_short"})
+ minetest.swap_node(right_here, {name="dryplants:grass_short"})
end
biome_lib:register_generate_plant({
diff --git a/dryplants/moregrass.lua b/dryplants/moregrass.lua
index 2593d73..41b61f4 100644
--- a/dryplants/moregrass.lua
+++ b/dryplants/moregrass.lua
@@ -13,7 +13,7 @@ abstract_dryplants.grow_grass = function(pos)
local grass_size = math.random(1,5)
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
or minetest.get_node(right_here).name == "default:junglegrass" then
- minetest.set_node(right_here, {name="default:grass_"..grass_size})
+ minetest.swap_node(right_here, {name="default:grass_"..grass_size})
end
end
diff --git a/dryplants/reed.lua b/dryplants/reed.lua
index 707cafc..155233f 100644
--- a/dryplants/reed.lua
+++ b/dryplants/reed.lua
@@ -107,7 +107,7 @@ if AUTO_ROOF_CORNER == true then
and ((node_north.name == roof and node_north.param2 == 3)
or (node_north.name == corner and node_north.param2 == 3))
then
- minetest.set_node(pos, {name=corner, param2=0})
+ minetest.swap_node(pos, {name=corner, param2=0})
end
if ((node_north.name == roof and node_north.param2 == 1)
@@ -115,7 +115,7 @@ if AUTO_ROOF_CORNER == true then
and ((node_east.name == roof and node_east.param2 == 0)
or (node_east.name == corner and node_east.param2 == 0))
then
- minetest.set_node(pos, {name=corner, param2=1})
+ minetest.swap_node(pos, {name=corner, param2=1})
end
if ((node_east.name == roof and node_east.param2 == 2)
@@ -123,7 +123,7 @@ if AUTO_ROOF_CORNER == true then
and ((node_south.name == roof and node_south.param2 == 1)
or (node_south.name == corner and node_south.param2 == 1))
then
- minetest.set_node(pos, {name=corner, param2=2})
+ minetest.swap_node(pos, {name=corner, param2=2})
end
if ((node_south.name == roof and node_south.param2 == 3)
@@ -131,7 +131,7 @@ if AUTO_ROOF_CORNER == true then
and ((node_west.name == roof and node_west.param2 == 2)
or (node_west.name == corner and node_west.param2 == 2))
then
- minetest.set_node(pos, {name=corner, param2=3})
+ minetest.swap_node(pos, {name=corner, param2=3})
end
-- corner 2
if ((node_west.name == roof and node_west.param2 == 2)
@@ -139,7 +139,7 @@ if AUTO_ROOF_CORNER == true then
and ((node_north.name == roof and node_north.param2 == 1)
or (node_north.name == corner_2 and node_north.param2 == 3))
then
- minetest.set_node(pos, {name=corner_2, param2=0})
+ minetest.swap_node(pos, {name=corner_2, param2=0})
end
if ((node_north.name == roof and node_north.param2 == 3)
@@ -147,7 +147,7 @@ if AUTO_ROOF_CORNER == true then
and ((node_east.name == roof and node_east.param2 == 2)
or (node_east.name == corner_2 and node_east.param2 == 0))
then
- minetest.set_node(pos, {name=corner_2, param2=1})
+ minetest.swap_node(pos, {name=corner_2, param2=1})
end
if ((node_east.name == roof and node_east.param2 == 0)
@@ -155,7 +155,7 @@ if AUTO_ROOF_CORNER == true then
and ((node_south.name == roof and node_south.param2 == 3)
or (node_south.name == corner_2 and node_south.param2 == 1))
then
- minetest.set_node(pos, {name=corner_2, param2=2})
+ minetest.swap_node(pos, {name=corner_2, param2=2})
end
if ((node_south.name == roof and node_south.param2 == 1)
@@ -163,7 +163,7 @@ if AUTO_ROOF_CORNER == true then
and ((node_west.name == roof and node_west.param2 == 0)
or (node_west.name == corner_2 and node_west.param2 == 2))
then
- minetest.set_node(pos, {name=corner_2, param2=3})
+ minetest.swap_node(pos, {name=corner_2, param2=3})
end
end,
@@ -255,7 +255,7 @@ if REED_WILL_DRY == true then
chance = 1,
action = function(pos)
local direction = minetest.get_node(pos).param2
- minetest.set_node(pos, {name=DRy, param2=direction})
+ minetest.swap_node(pos, {name=DRy, param2=direction})
end,
})
end
diff --git a/dryplants/reedmace.lua b/dryplants/reedmace.lua
index ec37442..e5e8b69 100644
--- a/dryplants/reedmace.lua
+++ b/dryplants/reedmace.lua
@@ -34,18 +34,18 @@ abstract_dryplants.grow_reedmace = function(pos)
if minetest.get_node(pos_01).name == "air" -- bug fix
or minetest.get_node(pos_01).name == "dryplants:reedmace_sapling" then
if minetest.get_node(pos_02).name ~= "air" then
- minetest.set_node(pos_01, {name="dryplants:reedmace_top"})
+ minetest.swap_node(pos_01, {name="dryplants:reedmace_top"})
elseif minetest.get_node(pos_03).name ~= "air" then
- minetest.set_node(pos_01, {name="dryplants:reedmace_height_2"})
+ minetest.swap_node(pos_01, {name="dryplants:reedmace_height_2"})
elseif size == 1 then
- minetest.set_node(pos_01, {name="dryplants:reedmace_top"})
+ minetest.swap_node(pos_01, {name="dryplants:reedmace_top"})
elseif size == 2 then
- minetest.set_node(pos_01, {name="dryplants:reedmace_height_2"})
+ minetest.swap_node(pos_01, {name="dryplants:reedmace_height_2"})
elseif size == 3 then
if spikes == 1 then
- minetest.set_node(pos_01, {name="dryplants:reedmace_height_3_spikes"})
+ minetest.swap_node(pos_01, {name="dryplants:reedmace_height_3_spikes"})
else
- minetest.set_node(pos_01, {name="dryplants:reedmace_height_3"})
+ minetest.swap_node(pos_01, {name="dryplants:reedmace_height_3"})
end
end
end
@@ -61,18 +61,18 @@ abstract_dryplants.grow_reedmace_water = function(pos)
minetest.add_entity(pos_01, "dryplants:reedmace_water_entity")
if minetest.get_node(pos_02).name == "air" then -- bug fix
if minetest.get_node(pos_03).name ~= "air" then
- minetest.set_node(pos_02, {name="dryplants:reedmace_top"})
+ minetest.swap_node(pos_02, {name="dryplants:reedmace_top"})
elseif minetest.get_node(pos_04).name ~= "air" then
- minetest.set_node(pos_02, {name="dryplants:reedmace_height_2"})
+ minetest.swap_node(pos_02, {name="dryplants:reedmace_height_2"})
elseif size == 1 then
- minetest.set_node(pos_02, {name="dryplants:reedmace_top"})
+ minetest.swap_node(pos_02, {name="dryplants:reedmace_top"})
elseif size == 2 then
- minetest.set_node(pos_02, {name="dryplants:reedmace_height_2"})
+ minetest.swap_node(pos_02, {name="dryplants:reedmace_height_2"})
elseif size == 3 then
if spikes == 1 then
- minetest.set_node(pos_02, {name="dryplants:reedmace_height_3_spikes"})
+ minetest.swap_node(pos_02, {name="dryplants:reedmace_height_3_spikes"})
else
- minetest.set_node(pos_02, {name="dryplants:reedmace_height_3"})
+ minetest.swap_node(pos_02, {name="dryplants:reedmace_height_3"})
end
end
end
@@ -286,7 +286,7 @@ minetest.register_abm({
if minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name == "air" then
abstract_dryplants.grow_reedmace_water({x = pos.x, y = pos.y - 1, z = pos.z})
end
- minetest.set_node({x=pos.x, y=pos.y, z=pos.z}, {name="default:water_source"})
+ minetest.swap_node({x=pos.x, y=pos.y, z=pos.z}, {name="default:water_source"})
else
abstract_dryplants.grow_reedmace({x = pos.x, y = pos.y - 1, z = pos.z})
end