Skip to content
Permalink
Browse files
Add flint and flint-and-steel
  • Loading branch information
kilbith authored and paramat committed Mar 15, 2016
1 parent dfee51c commit 28884cc784626544871bd28032130899393c74e9
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 3 deletions.
@@ -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"},
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -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

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 28884cc

Please sign in to comment.