Compare commits

...

4 Commits

Author SHA1 Message Date
My favourite Minetest cheat clients are Dragonfire and Waspsaliva. 23f1c51912 Merge pull request 'ITEMS/mcl_farming: Convert correct floor node to dirt as gourd grows' (#231) from fix-gourd-farmland-dirtification into master
Reviewed-on: Mineclonia/Mineclonia#231
Reviewed-by: Li0n_2 <li0n_2@noreply.git.minetest.land>
2022-01-15 22:07:24 +00:00
Nils Dagsson Moskopp 4d02af8c94
Convert correct floor node to dirt as gourd grows
Before this patch, growing a gourd (e.g. melon, pumpkin) would always
convert a node west of the node below the stem to dirt if belonged to
the group “dirtifies_below_solid”. This happened because of a loop in
which the variables floorpos and floor were re-used without setting a
new value … therefore, both floorpos and floor were always containing
the last values set in a previous loop instead of the correct values.

This patch fixes the problem by setting both variables in both loops.
2022-01-13 07:29:57 +01:00
Li0n_2 7ede0ca79a Merge pull request 'Fix shearsy wool typo in GROUPS.md' (#229) from JosiahWI/Mineclonia:fix-groups-typo into master
Reviewed-on: Mineclonia/Mineclonia#229
Reviewed-by: Li0n_2 <li0n_2@noreply.git.minetest.land>
2022-01-12 21:19:10 +00:00
JosiahWI e2e7e15b39
fix one character typo in GROUPS.md 2022-01-12 11:09:07 -06:00
2 changed files with 5 additions and 4 deletions

View File

@ -21,7 +21,7 @@ The basic digging time groups determine by which tools a node can be dug.
* `swordy=1`: Diggable by sword (any material), and this node is *not* a cobweb
* `swordy_cobweb=1`: Diggable by sword (any material), and this node is a cobweb
* `shearsy=1`: Diggable by shears, and this node is *not* wool
* `shearsy=wool=1`: Diggable by shears, and this node is wool
* `shearsy_wool=1`: Diggable by shears, and this node is wool
* `handy=1`: Breakable by hand and this node gives it useful drop when dug by hand. All nodes which are breakable by pickaxe, axe, shovel, sword or shears are also automatically breakable by hand, but not neccess
* `creative_breakable=1`: Block is breakable by hand in creative mode. This group is implied if the node belongs to any other digging group

View File

@ -388,12 +388,11 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
{ x=0, y=0, z=-1 },
{ x=0, y=0, z=1 },
}
local floorpos, floor
for n=#neighbors, 1, -1 do
local offset = neighbors[n]
local blockpos = vector.add(stempos, offset)
floorpos = { x=blockpos.x, y=blockpos.y-1, z=blockpos.z }
floor = minetest.get_node(floorpos)
local floorpos = { x=blockpos.x, y=blockpos.y-1, z=blockpos.z }
local floor = minetest.get_node(floorpos)
local block = minetest.get_node(blockpos)
local soilgroup = minetest.get_item_group(floor.name, "soil")
if not ((minetest.get_item_group(floor.name, "grass_block") == 1 or floor.name=="mcl_core:dirt" or soilgroup == 2 or soilgroup == 3) and block.name == "air") then
@ -407,6 +406,8 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
local r = math.random(1, #neighbors)
local offset = neighbors[r]
local blockpos = vector.add(stempos, offset)
local floorpos = { x=blockpos.x, y=blockpos.y-1, z=blockpos.z }
local floor = minetest.get_node(floorpos)
local p2
if offset.x == 1 then
minetest.set_node(stempos, {name=connected_stem_names[1]})