wood and farming items are now correctly detected as non-ground nodes
This commit is contained in:
parent
dfcaf568e0
commit
b68e2a95b5
@ -19,3 +19,4 @@ grounds?
|
||||
moreblocks?
|
||||
bell?
|
||||
mobf_trader?
|
||||
docfarming?
|
||||
|
@ -89,10 +89,15 @@ replacements_group['farming'].add_material = function( fruit, fruit_item, prefix
|
||||
replacements_group['farming'].data[ fruit_item ] = data;
|
||||
|
||||
-- farming nodes do not count as ground (except for soil - which is not handled here)
|
||||
local c_ignore = minetest.get_content_id( 'ignore' );
|
||||
for _,v in ipairs( data ) do
|
||||
replacements_group.node_is_ground[ v ] = false;
|
||||
local id = minetest.get_content_id( v );
|
||||
if( id and id ~= c_ignore ) then
|
||||
replacements_group.node_is_ground[ id ] = false;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if( is_loaded and mobf_trader and mobf_trader.add_trader ) then
|
||||
|
||||
-- TODO: use replacements for the payments where needed
|
||||
@ -126,6 +131,7 @@ replacements_group['farming'].construct_farming_type_list = function()
|
||||
-- farming from minetest_game
|
||||
replacements_group['farming'].add_material( 'wheat', 'farming:wheat', 'farming:', '_', '' );
|
||||
replacements_group['farming'].add_material( 'cotton', 'farming:cotton', 'farming:', '_', '' );
|
||||
replacements_group['farming'].add_material( 'pumpkin','farming:pumpkin', 'farming:', '_', '' );
|
||||
|
||||
-- RealTest
|
||||
replacements_group['farming'].add_material( 'flax', 'farming:string', 'farming:', '_', '' );
|
||||
|
@ -119,11 +119,14 @@ replacements_group['wood'].add_material = function( candidate_list, mod_prefix,
|
||||
replacements_group['wood'].data[ wood_name ] = data;
|
||||
|
||||
-- none of the wood nodes counts as ground
|
||||
local c_ignore = minetest.get_content_id( 'ignore' );
|
||||
for _,v in ipairs( data ) do
|
||||
replacements_group.node_is_ground[ v ] = false;
|
||||
local id = minetest.get_content_id( v );
|
||||
if( id and id ~= c_ignore ) then
|
||||
replacements_group.node_is_ground[ id ] = false;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if( is_loaded and mobf_trader and mobf_trader.add_trader ) then
|
||||
-- TODO: check if all offered payments exist
|
||||
local goods = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user