Add group:feather support for arrow recipes

This commit is contained in:
Juraj Vajda 2023-04-08 22:50:23 -04:00
parent 681c3a1150
commit c901d9c204

View File

@ -18,6 +18,12 @@
local S = minetest.get_translator(minetest.get_current_modname()) local S = minetest.get_translator(minetest.get_current_modname())
local arrow_tail_recipe_material = 'group:wool'
if minetest.get_modpath('animalia') then
arrow_tail_recipe_material = 'group:feather'
end
XBows:register_bow('bow_wood', { XBows:register_bow('bow_wood', {
description = S('Wooden Bow'), description = S('Wooden Bow'),
short_description = S('Wooden Bow'), short_description = S('Wooden Bow'),
@ -49,7 +55,7 @@ XBows:register_arrow('arrow_wood', {
recipe = { recipe = {
{ 'default:flint' }, { 'default:flint' },
{ 'group:stick' }, { 'group:stick' },
{ 'group:wool' } { arrow_tail_recipe_material }
}, },
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1, full_punch_interval = 1,
@ -68,7 +74,7 @@ XBows:register_arrow('arrow_stone', {
recipe = { recipe = {
{ 'default:flint' }, { 'default:flint' },
{ 'group:stone' }, { 'group:stone' },
{ 'group:wool' } { arrow_tail_recipe_material }
}, },
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.2, full_punch_interval = 1.2,
@ -86,7 +92,7 @@ XBows:register_arrow('arrow_bronze', {
recipe = { recipe = {
{ 'default:flint' }, { 'default:flint' },
{ 'default:bronze_ingot' }, { 'default:bronze_ingot' },
{ 'group:wool' } { arrow_tail_recipe_material }
}, },
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.8, full_punch_interval = 0.8,
@ -104,7 +110,7 @@ XBows:register_arrow('arrow_steel', {
recipe = { recipe = {
{ 'default:flint' }, { 'default:flint' },
{ 'default:steel_ingot' }, { 'default:steel_ingot' },
{ 'group:wool' } { arrow_tail_recipe_material }
}, },
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.7, full_punch_interval = 0.7,
@ -122,7 +128,7 @@ XBows:register_arrow('arrow_mese', {
recipe = { recipe = {
{ 'default:flint' }, { 'default:flint' },
{ 'default:mese_crystal' }, { 'default:mese_crystal' },
{ 'group:wool' } { arrow_tail_recipe_material }
}, },
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.7, full_punch_interval = 0.7,
@ -140,7 +146,7 @@ XBows:register_arrow('arrow_diamond', {
recipe = { recipe = {
{ 'default:flint' }, { 'default:flint' },
{ 'default:diamond' }, { 'default:diamond' },
{ 'group:wool' } { arrow_tail_recipe_material }
}, },
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.7, full_punch_interval = 0.7,