Add flint and flint-and-steel
This commit is contained in:
parent
dfee51c21e
commit
28884cc784
@ -178,6 +178,7 @@ Gambit (WTFPL):
|
||||
default_diamond_block.png
|
||||
default_ladder_steel.png
|
||||
default_sign_wall_wood.png
|
||||
default_flint.png
|
||||
|
||||
asl97 (WTFPL):
|
||||
default_ice.png
|
||||
|
@ -190,3 +190,9 @@ minetest.register_craftitem("default:obsidian_shard", {
|
||||
description = "Obsidian Shard",
|
||||
inventory_image = "default_obsidian_shard.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:flint", {
|
||||
description = "Flint",
|
||||
inventory_image = "default_flint.png"
|
||||
})
|
||||
|
||||
|
@ -353,9 +353,15 @@ minetest.register_node("default:gravel", {
|
||||
footstep = {name = "default_gravel_footstep", gain = 0.5},
|
||||
dug = {name = "default_gravel_footstep", gain = 1.0},
|
||||
}),
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {'default:flint'}, rarity = 16},
|
||||
{items = {'default:gravel'}}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("default:clay", {
|
||||
description = "Clay",
|
||||
tiles = {"default_clay.png"},
|
||||
|
BIN
mods/default/textures/default_flint.png
Normal file
BIN
mods/default/textures/default_flint.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
@ -30,3 +30,7 @@ fire_large.ogg sampled from:
|
||||
|
||||
fire_basic_flame_animated.png:
|
||||
Muadtralk
|
||||
|
||||
fire_flint_steel.png
|
||||
Gambit (WTFPL)
|
||||
|
||||
|
@ -8,7 +8,6 @@ fire = {}
|
||||
-- Register flame nodes
|
||||
|
||||
minetest.register_node("fire:basic_flame", {
|
||||
description = "Basic Flame",
|
||||
drawtype = "firelike",
|
||||
tiles = {
|
||||
{
|
||||
@ -28,7 +27,7 @@ minetest.register_node("fire:basic_flame", {
|
||||
buildable_to = true,
|
||||
sunlight_propagates = true,
|
||||
damage_per_second = 4,
|
||||
groups = {igniter = 2, dig_immediate = 3},
|
||||
groups = {igniter = 2, dig_immediate = 3, not_in_creative_inventory = 1},
|
||||
drop = "",
|
||||
|
||||
on_construct = function(pos)
|
||||
@ -71,6 +70,34 @@ minetest.register_node("fire:permanent_flame", {
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_tool("fire:flint_and_steel", {
|
||||
description = "Flint and Steel",
|
||||
inventory_image = "fire_flint_steel.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
local player_name = user:get_player_name()
|
||||
local pt = pointed_thing
|
||||
|
||||
if pt.type == "node" and minetest.get_node(pt.above).name == "air" then
|
||||
if not minetest.is_protected(pt.above, player_name) then
|
||||
minetest.set_node(pt.above, {name="fire:basic_flame"})
|
||||
else
|
||||
minetest.chat_send_player(player_name, "This area is protected")
|
||||
end
|
||||
end
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(1000)
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fire:flint_and_steel",
|
||||
recipe = {
|
||||
{"default:flint", "default:steel_ingot"}
|
||||
}
|
||||
})
|
||||
|
||||
-- Get sound area of position
|
||||
|
||||
|
BIN
mods/fire/textures/fire_flint_steel.png
Normal file
BIN
mods/fire/textures/fire_flint_steel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
Loading…
Reference in New Issue
Block a user