Remove hard dependency on default

This commit is contained in:
Juraj Vajda 2023-03-31 13:31:18 -04:00
parent 611a05f516
commit 4dfb23e87d
3 changed files with 6 additions and 10 deletions

View File

@ -849,11 +849,6 @@ GNU Lesser General Public License v2.1 or later (see included LICENSE file)
- everness_grass_with_blue_extra_top_2.png
- everness_grass_with_yellow_extra_top_1.png
**CC-BY-SA-3.0, Pithydon**
- everness_coral_skeleton.png
### Sounds
**CC0-1.0, by ProdMultimediasHQI**, https://freesound.org/people/ProdMultimediasHQI/sounds/512501/

View File

@ -221,15 +221,16 @@ Everness = {
}
function Everness.grow_cactus(self, pos, node, params)
local node_copy = table.copy(node)
if node.param2 >= 4 then
return
end
pos.y = pos.y - 1
if minetest.get_item_group(minetest.get_node(pos).name, 'mold_soil') == 0
or minetest.get_item_group(minetest.get_node(pos).name, 'sand') == 0
or minetest.get_item_group(minetest.get_node(pos).name, 'everness_sand') == 0
if minetest.get_item_group(minetest.get_node(pos).name, 'sand') == 0
and minetest.get_item_group(minetest.get_node(pos).name, 'everness_sand') == 0
then
return
end
@ -252,7 +253,7 @@ function Everness.grow_cactus(self, pos, node, params)
return
end
minetest.set_node(pos, { name = node.name })
minetest.set_node(pos, { name = node_copy.name })
return true
end

View File

@ -515,7 +515,7 @@ minetest.register_abm({
'everness:cactus_orange',
'everness:cactus_blue'
},
neighbors = { 'group:mold_soil' },
neighbors = { 'group:sand', 'group:everness_sand' },
interval = 12,
chance = 83,
action = function(...)