added weak torches and flint and steel
@ -343,7 +343,7 @@ minetest.register_craft(
|
||||
|
||||
minetest.register_craft(
|
||||
{
|
||||
output = "default:torch 4",
|
||||
output = "default:torch 2",
|
||||
recipe = {
|
||||
{"default:lump_coal"},
|
||||
{"default:fiber"},
|
||||
@ -351,6 +351,29 @@ minetest.register_craft(
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft(
|
||||
{
|
||||
output = "default:torch_weak 2",
|
||||
recipe = {
|
||||
{"default:fiber"},
|
||||
{"default:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft(
|
||||
{
|
||||
output = "default:flint 2",
|
||||
type = "shapeless",
|
||||
recipe = {"default:gravel"},
|
||||
})
|
||||
|
||||
minetest.register_craft(
|
||||
{
|
||||
output = "default:flint_and_steel",
|
||||
type = "shapeless",
|
||||
recipe = {"default:ingot_steel", "default:flint"},
|
||||
})
|
||||
|
||||
minetest.register_craft(
|
||||
{
|
||||
output = "default:chest",
|
||||
@ -790,4 +813,36 @@ minetest.register_craftitem(
|
||||
on_use = minetest.item_eat({hp = 1, sat = 10})
|
||||
})
|
||||
|
||||
minetest.register_craftitem(
|
||||
"default:flint",
|
||||
{
|
||||
description = "Flint Shard",
|
||||
inventory_image = "default_flint.png",
|
||||
})
|
||||
|
||||
minetest.register_tool(
|
||||
"default:flint_and_steel",
|
||||
{
|
||||
description = "Flint and Steel",
|
||||
inventory_image = "default_flint_and_steel.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing == nil then return end
|
||||
if pointed_thing.type ~= "node" then return end
|
||||
|
||||
local pos = pointed_thing.under
|
||||
|
||||
if minetest.get_node(pointed_thing.under).name == "default:torch_weak" then
|
||||
local n = minetest.get_node(pointed_thing.under)
|
||||
minetest.set_node(pos, {name = "default:torch", param = n.param, param2 = n.param2})
|
||||
itemstack:add_wear(800)
|
||||
elseif minetest.get_node(pointed_thing.under).name == "default:torch_dead" then
|
||||
local n = minetest.get_node(pointed_thing.under)
|
||||
minetest.set_node(pos, {name = "default:torch_weak", param = n.param, param2 = n.param2})
|
||||
itemstack:add_wear(1300)
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
default.log("crafting", "loaded")
|
@ -268,7 +268,7 @@ minetest.register_abm( -- papyrus grows
|
||||
|
||||
minetest.register_abm( -- torch flame
|
||||
{
|
||||
nodenames = {"default:torch"},
|
||||
nodenames = {"default:torch", "default:torch_weak"},
|
||||
interval = 5,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
@ -291,4 +291,14 @@ minetest.register_abm( -- torch flame
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm( -- weak torchs burn out and die after ~3 minutes
|
||||
{
|
||||
nodenames = {"default:torch_weak"},
|
||||
interval = 3,
|
||||
chance = 60,
|
||||
action = function(pos, node)
|
||||
minetest.set_node(pos, {name = "default:torch_dead"})
|
||||
end
|
||||
})
|
||||
|
||||
default.log("functions", "loaded")
|
@ -656,6 +656,58 @@ minetest.register_node(
|
||||
groups = {water=1, liquid=1},
|
||||
})
|
||||
|
||||
minetest.register_node(
|
||||
"default:torch_dead",
|
||||
{
|
||||
description = "Dead Torch",
|
||||
drawtype = "nodebox",
|
||||
tiles ={
|
||||
{
|
||||
name = "default_torch_3d_ends.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 1.0,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "default_torch_3d_ends.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 1.0,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "default_torch_3d.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 1.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
inventory_image = "default_torch_dead.png",
|
||||
wield_image = "default_torch_dead.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
wall_top = {-2/16, 0, -2/16, 2/16, 0.5, 2/16},
|
||||
wall_bottom = {-2/16, -0.5, -2/16, 2/16, 0, 2/16},
|
||||
wall_side = {-0.5, -8/16, -0.1, -0.5+4/16, 0, 0.1},
|
||||
},
|
||||
groups = {choppy=2, dig_immediate=3, attached_node=1},
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node(
|
||||
"default:torch",
|
||||
{
|
||||
@ -708,6 +760,58 @@ minetest.register_node(
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
minetest.register_node(
|
||||
"default:torch_weak",
|
||||
{
|
||||
description = "Weak Torch",
|
||||
drawtype = "nodebox",
|
||||
tiles ={
|
||||
{
|
||||
name = "default_torch_3d_ends.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 1.0,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "default_torch_3d_ends.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 1.0,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "default_torch_3d.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 1.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
inventory_image = "default_torch.png",
|
||||
wield_image = "default_torch.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
light_source = default.LIGHT_MAX-4,
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
wall_top = {-2/16, 0, -2/16, 2/16, 0.5, 2/16},
|
||||
wall_bottom = {-2/16, -0.5, -2/16, 2/16, 0, 2/16},
|
||||
wall_side = {-0.5, -8/16, -0.1, -0.5+4/16, 0, 0.1},
|
||||
},
|
||||
groups = {choppy=2, dig_immediate=3, attached_node=1},
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node(
|
||||
"default:sign",
|
||||
|
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 308 B |
BIN
mods/default/textures/default_flint.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
mods/default/textures/default_flint.xcf
Normal file
BIN
mods/default/textures/default_flint_and_steel.png
Normal file
After Width: | Height: | Size: 429 B |
BIN
mods/default/textures/default_flint_and_steel.xcf
Normal file
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 406 B |
BIN
mods/default/textures/default_torch_dead.png
Normal file
After Width: | Height: | Size: 405 B |