cleaned up some mistakes left from last push.
parent
994ec6cd12
commit
7eb75b6c9c
|
@ -107,6 +107,12 @@ minetest.register_craft({
|
|||
burntime = 35,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'fuel',
|
||||
recipe = 'more_fire:oil',
|
||||
burntime = 10,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'fuel',
|
||||
recipe = 'more_fire:charcoal_block',
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
default
|
||||
|
||||
vessels
|
||||
|
|
80
nodes.lua
80
nodes.lua
|
@ -13,30 +13,30 @@ minetest.override_item('default:gravel', {
|
|||
},
|
||||
})
|
||||
|
||||
minetest.register_node(":default:torch", {
|
||||
description = "Torch",
|
||||
drawtype = "nodebox",
|
||||
minetest.register_node(':default:torch', {
|
||||
description = 'Torch',
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
{name = "more_fire_torch_top.png"},
|
||||
{name = "more_fire_torch_bottom.png"},
|
||||
{name = "more_fire_torch_side.png"},
|
||||
{name = 'more_fire_torch_top.png'},
|
||||
{name = 'more_fire_torch_bottom.png'},
|
||||
{name = 'more_fire_torch_side.png'},
|
||||
},
|
||||
inventory_image = "more_fire_torch_inv.png",
|
||||
wield_image = "more_fire_torch_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
inventory_image = 'more_fire_torch_inv.png',
|
||||
wield_image = 'more_fire_torch_inv.png',
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'wallmounted',
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
light_source = LIGHT_MAX - 1,
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
type = 'wallmounted',
|
||||
wall_top = {-0.0625, -0.0625, -0.0625, 0.0625, 0.5 , 0.0625},
|
||||
wall_bottom = {-0.0625, -0.5 , -0.0625, 0.0625, 0.0625, 0.0625},
|
||||
wall_side = {-0.5 , -0.5 , -0.0625, -0.375, 0.0625, 0.0625},
|
||||
},
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
type = 'wallmounted',
|
||||
wall_top = {-0.1, -0.05, -0.1, 0.1, 0.5 , 0.1},
|
||||
wall_bottom = {-0.1, -0.5 , -0.1, 0.1, 0.0625, 0.1},
|
||||
wall_side = {-0.35, -0.5 , -0.1, -0.5, 0.0625, 0.1},
|
||||
|
@ -52,36 +52,34 @@ minetest.register_node(":default:torch", {
|
|||
on_timer = function(pos, elapsed)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
print (node.name)
|
||||
print (node)
|
||||
minetest.swap_node(pos, {name = 'more_fire:torch_stub', param2 = node.param2})
|
||||
timer:stop()
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:torch_stub', {
|
||||
description = "burnt out torch",
|
||||
drawtype = "nodebox",
|
||||
description = 'burnt out torch',
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
{name = "more_fire_torch_stub_top.png"},
|
||||
{name = "more_fire_torch_stub_bottom.png"},
|
||||
{name = "more_fire_torch_stub_side.png"},
|
||||
{name = 'more_fire_torch_stub_top.png'},
|
||||
{name = 'more_fire_torch_stub_bottom.png'},
|
||||
{name = 'more_fire_torch_stub_side.png'},
|
||||
},
|
||||
inventory_image = "more_fire_torch_stub_inv.png",
|
||||
wield_image = "more_fire_torch_stub_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
inventory_image = 'more_fire_torch_stub_inv.png',
|
||||
wield_image = 'more_fire_torch_stub_inv.png',
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'wallmounted',
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
type = 'wallmounted',
|
||||
wall_top = {-0.0625, 0.2, -0.0625, 0.0625, 0.5 , 0.0625},
|
||||
wall_bottom = {-0.0625, -0.5 , -0.0625, 0.0625, -0.2, 0.0625},
|
||||
wall_side = {-0.5 , -0.5 , -0.0625, -0.375, -0.2, 0.0625},
|
||||
},
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
type = 'wallmounted',
|
||||
wall_top = {-0.1, 0.2, -0.1, 0.1, 0.5 , 0.1},
|
||||
wall_bottom = {-0.1, -0.5 , -0.1, 0.1, -0.2, 0.1},
|
||||
wall_side = {-0.35, -0.5 , -0.1, -0.5, -0.2, 0.1},
|
||||
|
@ -336,9 +334,7 @@ minetest.register_node('more_fire:oil_lamp_on', {
|
|||
local timer = minetest.get_node_timer(pos)
|
||||
if inv:contains_item('fuel', 'more_fire:oil') then
|
||||
local fuelstack = inv:get_stack('fuel', 1)
|
||||
print 'there is oil in the lantern.'
|
||||
timer:start(12*60)
|
||||
print 'taking oil from lamp.'
|
||||
fuelstack:take_item()
|
||||
inv:set_stack('fuel', 1, fuelstack)
|
||||
if inv:is_empty('fuel') then
|
||||
|
@ -346,11 +342,15 @@ minetest.register_node('more_fire:oil_lamp_on', {
|
|||
end
|
||||
timer:stop()
|
||||
elseif inv:is_empty('fuel') then
|
||||
print 'no fuel left.'
|
||||
minetest.set_node(pos, {name = 'more_fire:oil_lamp_off', param2=node.param2})
|
||||
timer:stop()
|
||||
end
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty('fuel')
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:oil_lamp_off', {
|
||||
|
@ -372,14 +372,14 @@ minetest.register_node('more_fire:oil_lamp_off', {
|
|||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
inv:set_size('main', 8*4)
|
||||
inv:set_size('fuel', 1)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"label[1,0;Add lantern oil for a brighter flame.]" ..
|
||||
"list[current_name;fuel;1,1.5;1,1]"..
|
||||
"list[current_player;main;0,5;8,4;]")
|
||||
meta:set_string("infotext", "Oil Lantern")
|
||||
meta:set_string('formspec',
|
||||
'size[8,6]'..
|
||||
'label[2,.75;Add lantern oil for a brighter flame.]' ..
|
||||
'list[current_name;fuel;1,.5;1,1]'..
|
||||
'list[current_player;main;0,2;8,4;]')
|
||||
meta:set_string('infotext', 'Oil Lantern')
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
|
@ -390,11 +390,11 @@ minetest.register_node('more_fire:oil_lamp_off', {
|
|||
minetest.swap_node(pos, {name = 'more_fire:oil_lamp_on', param2=node.param2})
|
||||
timer:start(12*60) --one oil unit will burn for 12 minutes
|
||||
meta:set_string('infotext', 'Burning Oil Lamp')
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"label[1,0;keep filled with lantern oil for a bright flame.]" ..
|
||||
"list[current_name;fuel;1,1.5;1,1]"..
|
||||
"list[current_player;main;0,5;8,4;]")
|
||||
meta:set_string('formspec',
|
||||
'size[8,6]'..
|
||||
'label[2,.75;keep filled with lantern oil for a bright flame.]' ..
|
||||
'list[current_name;fuel;1,.5;1,1]'..
|
||||
'list[current_player;main;0,2;8,4;]')
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
If you have any ideas for more fire related things please let me know, or consider forking the project on GIT. I'm always ready to add more good stuff.
|
||||
|
||||
# Mod Contributors
|
||||
Nathan
|
||||
|
||||
# More_fire
|
||||
This is a Minetest mod that adds more/better fire related stuff
|
||||
|
||||
## Forum Topic
|
||||
https://forum.minetest.net/viewtopic.php?f=11&t=10372
|
||||
|
||||
## Licensing
|
||||
CC0
|
||||
|
||||
## Dependencies
|
||||
- default
|
||||
- vessels
|
||||
|
||||
#
|
||||
Items currently included:
|
||||
- Campfires
|
||||
- Finite torches, they burn out
|
||||
- oil lanterns, use these instead of torches.
|
||||
- a lighter, for starting the campfires.
|
||||
- charcoal, much like coal, but made by cooking wood.
|
||||
|
||||
#
|
||||
Planned:
|
||||
Cooking capabilities in the campfires.
|
||||
The ability to light a campfire by putting a torch in it's fuel slot, and then adding other wood.
|
|
@ -1,7 +0,0 @@
|
|||
Put this folder into your Mods folder and enable.
|
||||
|
||||
This mod is using the newly added Mesh type so you need a recent build for it to work. If you are on linux consider using the daily build PPA or build from source.
|
||||
|
||||
If you have any ideas for more fire related things please let me know, or consider forking the project on GIT. I'm always ready to add more good stuff.
|
||||
|
||||
There is a bug where placing torches on a stone wall sometimes reacts strangly. If you put two torches next to each other one will usually fall off the wall. Not sure why...
|
Loading…
Reference in New Issue