2019-12-30 19:06:44 +01:00
|
|
|
local gunpowder = "grenades_basic:gun_power"
|
2019-04-03 20:58:31 +02:00
|
|
|
|
2019-12-30 19:06:44 +01:00
|
|
|
if not minetest.get_modpath("tnt") then
|
2019-04-03 20:58:31 +02:00
|
|
|
minetest.register_craftitem("grenades_basic:gun_powder", {
|
|
|
|
description = "A dark powder used for crafting some grenades",
|
2019-12-30 19:06:44 +01:00
|
|
|
inventory_image = "grenades_basic_gun_powder.png"
|
2019-04-03 20:58:31 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
output = "grenades_basic:gun_powder",
|
|
|
|
recipe = {"default:coal_lump", "default:coal_lump", "default:coal_lump", "default:coal_lump"},
|
|
|
|
})
|
|
|
|
else
|
2019-12-30 19:06:44 +01:00
|
|
|
gunpowder = "tnt:gunpowder"
|
2019-04-03 21:42:24 +02:00
|
|
|
end
|
2019-12-30 19:06:44 +01:00
|
|
|
|
|
|
|
-- Frag Grenade
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shaped",
|
|
|
|
output = "grenades_basic:frag",
|
|
|
|
recipe = {
|
|
|
|
{"default:obsidian_shard", "default:steel_ingot", "default:obsidian_shard"},
|
|
|
|
{"default:steel_ingot", gunpowder, "default:steel_ingot"},
|
|
|
|
{"default:obsidian_shard", "default:steel_ingot", "default:obsidian_shard"}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Smoke Grenade
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shaped",
|
|
|
|
output = "grenades_basic:smoke",
|
|
|
|
recipe = {
|
|
|
|
{"default:coal_lump", "default:steel_ingot", "default:coal_lump"},
|
|
|
|
{"default:steel_ingot", gunpowder, "default:steel_ingot"},
|
|
|
|
{"default:coal_lump", "default:steel_ingot", "default:coal_lump"}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
--Flashbang Grenade
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shaped",
|
|
|
|
output = "grenades_basic:flashbang",
|
|
|
|
recipe = {
|
|
|
|
{"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"},
|
|
|
|
{"default:steel_ingot", gunpowder, "default:steel_ingot"},
|
|
|
|
{"", "default:steel_ingot", ""}
|
|
|
|
},
|
|
|
|
})
|