1
0
mirror of https://gitlab.com/echoes91/spears.git synced 2025-06-29 14:10:25 +02:00

Version MFF.

This commit is contained in:
sys4-fr
2018-09-08 16:41:47 +02:00
parent 94e812644f
commit 7694b95d08
13 changed files with 120 additions and 38 deletions

37
tools.lua Normal file → Executable file
View File

@ -11,13 +11,6 @@ function spears_register_spear(kind, desc, eq, toughness, material)
end
return itemstack
end,
on_place = function(itemstack, user, pointed_thing)
minetest.add_item(pointed_thing.above, itemstack)
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end,
tool_capabilities = {
full_punch_interval = 1.5,
max_drop_level=1,
@ -27,18 +20,19 @@ function spears_register_spear(kind, desc, eq, toughness, material)
damage_groups = {fleshy=eq},
}
})
SPEAR_ENTITY=spears_set_entity(kind, eq, toughness)
local SPEAR_ENTITY=spears_set_entity(kind, eq, toughness)
minetest.register_entity("spears:spear_" .. kind .. "_entity", SPEAR_ENTITY)
minetest.register_craft({
output = 'spears:spear_' .. kind,
recipe = {
{'group:wood', 'group:wood', material},
}
})
minetest.register_craft({
output = 'spears:spear_' .. kind,
recipe = {
@ -48,17 +42,22 @@ function spears_register_spear(kind, desc, eq, toughness, material)
end
if not DISABLE_STONE_SPEAR then
spears_register_spear('stone', 'Stone', 4, 20, 'group:stone')
spears_register_spear('stone', 'Stone (Hunter)', 3, 25, 'group:stone') --MFF crabman(28/09/2015) damage and wear
end
if not DISABLE_STEEL_SPEAR then
spears_register_spear('steel', 'Steel', 6, 30, 'default:steel_ingot')
end
if not DISABLE_OBSIDIAN_SPEAR then
spears_register_spear('obsidian', 'Obsidian', 8, 30, 'default:obsidian')
spears_register_spear('steel', 'Steel (Hunter)', 4, 30, 'default:steel_ingot') --MFF crabman(28/09/2015) damage and wear
end
if not DISABLE_DIAMOND_SPEAR then
spears_register_spear('diamond', 'Diamond', 8, 40, 'default:diamond')
spears_register_spear('diamond', 'Diamond (Hunter)', 7, 50, 'default:diamond') --MFF crabman(28/09/2015) damage and wear
end
if not DISABLE_OBSIDIAN_SPEAR then
spears_register_spear('obsidian', 'Obsidian (Hunter)', 5, 40, 'default:obsidian') --MFF crabman(28/09/2015) damage and wear
end
if not DISABLE_MITHRIL_SPEAR then
spears_register_spear('mithril', 'Mithril (Hunter)', 8, 200, 'default:mithril_ingot') --MFF crabman(28/09/2015) damage and wear
end