From c47c6aa54cfa9e3000668ea42702a1993bd9af80 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Sat, 19 Nov 2022 21:20:03 +0100 Subject: [PATCH] Make a use for cotton seeds #104 --- basic_machines/grinder.lua | 1 + iron_age/hammer.lua | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/basic_machines/grinder.lua b/basic_machines/grinder.lua index 97a8340..a3cc579 100644 --- a/basic_machines/grinder.lua +++ b/basic_machines/grinder.lua @@ -431,4 +431,5 @@ if minetest.global_exists("farming") then techage.add_grinder_recipe({input="farming:seed_rice 6", output="farming:rice_flour"}, true) techage.add_grinder_recipe({input="farming:oat 3", output="farming:flour"}, true) techage.add_grinder_recipe({input="farming:seed_oat 6", output="farming:flour"}, true) + techage.add_grinder_recipe({input="farming:seed_cotton 3", output="basic_materials:oil_extract"}, true) end diff --git a/iron_age/hammer.lua b/iron_age/hammer.lua index 6cd786b..c760b61 100644 --- a/iron_age/hammer.lua +++ b/iron_age/hammer.lua @@ -29,16 +29,8 @@ function techage.register_stone_gravel_pair(stone_name, gravel_name) end -- Pipeworks uses a fakeplayer based on the owner of the nodebraker. --- Since the fakeplayer position differs from the real player position, --- this can be used to detect the fakeplayer. local function is_real_player(player) - if minetest.is_player(player) then - local obj = minetest.get_player_by_name(player:get_player_name()) - if obj then - return vector.equals(obj:get_pos(), player:get_pos()) - end - end - return false + return minetest.is_player(player) and not player.is_fake_player end local function handler(player_name, node, itemstack, digparams)