|
@ -15,3 +15,4 @@ Napiophelios, from the forum, who gave me some really good ideas from the old ca
|
|||
Sound Effects:
|
||||
Sparker sound from BroAsis on Freesound. https://www.freesound.org/people/BroAsis/sounds/106853/
|
||||
|
||||
Thanks to everybody that gave advice and helped me fix problems.
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
minetest.register_abm({ -- Controls non-contained fire
|
||||
nodenames = {'more_fire:embers','more_fire:campfire'},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
for i, name in ipairs({
|
||||
'fuel_totaltime',
|
||||
'fuel_time',
|
||||
}) do
|
||||
if meta:get_string(name) == '' then
|
||||
meta:set_float(name, 5.0)
|
||||
end
|
||||
end
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local was_active = false
|
||||
if meta:get_float('fuel_time') < meta:get_float('fuel_totaltime') then
|
||||
was_active = true
|
||||
meta:set_float('fuel_time', meta:get_float('fuel_time') + 0.25)
|
||||
end
|
||||
if meta:get_float('fuel_time') < meta:get_float('fuel_totaltime') then
|
||||
minetest.sound_play({name='fire_small'},{gain=0.07},
|
||||
{loop=true})
|
||||
local percent = math.floor(meta:get_float('fuel_time') /
|
||||
meta:get_float('fuel_totaltime') * 100)
|
||||
meta:set_string('infotext','Campfire active: '..percent..'%')
|
||||
minetest.swap_node(pos, {name = 'more_fire:campfire'})
|
||||
meta:set_string('formspec',
|
||||
'size[8,6.75]'..
|
||||
default.gui_bg..
|
||||
default.gui_slots..
|
||||
'background[5,5;1,1;more_fire_campfire_active.png;true]'..
|
||||
'list[current_name;fuel;1,1.5;1,1;]'..
|
||||
'list[current_player;main;0,2.75;8,1;]'..
|
||||
'list[current_player;main;0,4;8,3;8]')
|
||||
return
|
||||
end
|
||||
local fuel = nil
|
||||
local fuellist = inv:get_list('fuel')
|
||||
if fuellist then
|
||||
fuel = minetest.get_craft_result({method = 'fuel', width = 1, items = fuellist})
|
||||
end
|
||||
if fuel.time <= 0 then
|
||||
local node = minetest.get_node(pos)
|
||||
if node.name == 'more_fire:campfire' then
|
||||
meta:set_string('infotext','Put more wood on the fire!')
|
||||
minetest.swap_node(pos, {name = 'more_fire:embers'})
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
meta:set_string('formspec', more_fire.embers_formspec)
|
||||
timer:start(180)
|
||||
end
|
||||
return
|
||||
end
|
||||
meta:set_string('fuel_totaltime', fuel.time)
|
||||
meta:set_string('fuel_time', 0)
|
||||
local stack = inv:get_stack('fuel', 1)
|
||||
stack:take_item()
|
||||
inv:set_stack('fuel', 1, stack)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_abm({ -- Controls the contained fires.
|
||||
nodenames = {'more_fire:embers_contained', 'more_fire:campfire_contained'},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
for i, name in ipairs({
|
||||
'fuel_totaltime',
|
||||
'fuel_time',
|
||||
}) do
|
||||
if meta:get_string(name) == '' then
|
||||
meta:set_float(name, 0.0)
|
||||
end
|
||||
end
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local was_active = false
|
||||
if meta:get_float('fuel_time') < meta:get_float('fuel_totaltime') then
|
||||
was_active = true
|
||||
meta:set_float('fuel_time', meta:get_float('fuel_time') + 0.25)
|
||||
end
|
||||
if meta:get_float('fuel_time') < meta:get_float('fuel_totaltime') then
|
||||
minetest.sound_play({name='fire_small'},{gain=0.07},
|
||||
{loop=true})
|
||||
local percent = math.floor(meta:get_float('fuel_time') /
|
||||
meta:get_float('fuel_totaltime') * 100)
|
||||
meta:set_string('infotext','Campfire active: '..percent..'%')
|
||||
minetest.swap_node(pos, {name = 'more_fire:campfire_contained'})
|
||||
meta:set_string('formspec',
|
||||
'size[8,6.75]'..
|
||||
default.gui_bg..
|
||||
default.gui_slots..
|
||||
'background[5,5;1,1;more_fire_campfire_active.png;true]'..
|
||||
'list[current_name;fuel;1,1.5;1,1;]'..
|
||||
'list[current_player;main;0,2.75;8,1;]'..
|
||||
'list[current_player;main;0,4;8,3;8]')
|
||||
return
|
||||
end
|
||||
local fuel = nil
|
||||
local fuellist = inv:get_list('fuel')
|
||||
if fuellist then
|
||||
fuel = minetest.get_craft_result({method = 'fuel', width = 1, items = fuellist})
|
||||
end
|
||||
if fuel.time <= 0 then
|
||||
local node = minetest.get_node(pos)
|
||||
if node.name == 'more_fire:campfire_contained' then
|
||||
meta:set_string('infotext','Put more wood on the fire!')
|
||||
minetest.swap_node(pos, {name = 'more_fire:embers_contained'})
|
||||
meta:set_string('formspec', more_fire.embers_formspec)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(190)
|
||||
end
|
||||
return
|
||||
end
|
||||
meta:set_string('fuel_totaltime', fuel.time)
|
||||
meta:set_string('fuel_time', 0)
|
||||
local stack = inv:get_stack('fuel', 1)
|
||||
stack:take_item()
|
||||
inv:set_stack('fuel', 1, stack)
|
||||
end,
|
||||
})
|
|
@ -1,3 +1,14 @@
|
|||
4-15-15:
|
||||
All fires now die after time. When you create embers either by lighting kindling or crafting directly you have about three minutes to add wood. After the wood all burns up you have three minutes to add more wood or the embers turn back into kindling and need to be activated with a lighter again.
|
||||
|
||||
4-13-15:
|
||||
Changed some how I add the drops to gravel, no longer do I replace the entire node, just add the new drop info to it. This should keep it from breaking anything that does the same to gravel.
|
||||
|
||||
4-12-15:
|
||||
Some major overhauling, not of code, but layout, no longer is everything stored in the init.lua, it's all broken down into neat files.
|
||||
I added finite torches, change the settings in the config, right now you can only turn them on or off, settings are not retro-active, only torches placed after the update will burn out. When a torch burns out it turns into a torch stub which can be picked up and burnt as fuel.
|
||||
I changed a couple textures down to 16x16, they had been 32x32. Renamed textures to follow proper naming methods, this won't change any placed nodes.
|
||||
|
||||
11-22-14:
|
||||
Changed a couple textures.
|
||||
Currently using nodeboxes for torches, so they are no longer invisible.
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
--config file.
|
||||
--Change the following line if you want torches to burn infinitly.
|
||||
--(true/false)
|
||||
--when true torches will burn out after a day.
|
||||
finite_torches = true
|
|
@ -0,0 +1,20 @@
|
|||
minetest.register_craftitem('more_fire:charcoal', {
|
||||
description = 'Charcoal',
|
||||
inventory_image = 'more_fire_charcoal_lump.png',
|
||||
groups = {coal = 1}
|
||||
})
|
||||
|
||||
minetest.register_craftitem('more_fire:flintstone', {
|
||||
description = 'Flintstone',
|
||||
inventory_image = 'more_fire_flintstone.png',
|
||||
})
|
||||
|
||||
minetest.register_craftitem('more_fire:lighter', {
|
||||
description = 'Flint and Steel',
|
||||
inventory_image = 'more_fire_lighter.png',
|
||||
})
|
||||
|
||||
minetest.register_craftitem('more_fire:oil', {
|
||||
description = 'lantern oil',
|
||||
inventory_image = 'more_fire_oil.png',
|
||||
})
|
|
@ -0,0 +1,140 @@
|
|||
minetest.register_craft({
|
||||
output = 'more_fire:charcoal_block 1',
|
||||
recipe = {
|
||||
{'more_fire:charcoal', 'more_fire:charcoal', 'more_fire:charcoal'},
|
||||
{'more_fire:charcoal', 'more_fire:charcoal', 'more_fire:charcoal'},
|
||||
{'more_fire:charcoal', 'more_fire:charcoal', 'more_fire:charcoal'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:charcoal 9',
|
||||
recipe = {
|
||||
{'more_fire:charcoal_block'}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:embers 1',
|
||||
recipe = {
|
||||
{'more_fire:kindling'},
|
||||
{'default:torch'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:embers 1',
|
||||
recipe = {
|
||||
{'', '', ''},
|
||||
{'default:stick', 'default:torch', 'default:stick'},
|
||||
{'group:wood', 'group:wood', 'group:wood'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:embers_contained 1',
|
||||
recipe = {
|
||||
{'', 'more_fire:embers', ''},
|
||||
{'default:cobble', 'default:cobble', 'default:cobble'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:embers_contained 1',
|
||||
recipe = {
|
||||
{'more_fire:kindling_contained'},
|
||||
{'default:torch'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:torch 4',
|
||||
recipe = {
|
||||
{'more_fire:charcoal'},
|
||||
{'group:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'shapeless',
|
||||
output = 'more_fire:kindling 1',
|
||||
recipe = {'group:stick', 'group:wood', 'group:flammable', 'group:flammable'},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:kindling_contained 1',
|
||||
recipe = {
|
||||
{'','more_fire:kindling', ''},
|
||||
{'default:cobble','default:cobble','default:cobble'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:oil_lamp_off 1',
|
||||
recipe = {
|
||||
{'default:glass'},
|
||||
{'farming:cotton'},
|
||||
{'default:iron_lump'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:oil 1',
|
||||
recipe = {
|
||||
{'group:leaves', 'group:leaves', 'group:leaves'},
|
||||
{'group:leaves', 'group:leaves', 'group:leaves'},
|
||||
{'', 'vessels:glass_bottle', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'shapeless',
|
||||
output = 'more_fire:lighter 1',
|
||||
recipe = {'more_fire:flintstone', 'default:steel_ingot'}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:oil_lamp_off 1',
|
||||
recipe = {
|
||||
{'more_fire:oil_lamp_table_off'}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:oil_lamp_table_off 1',
|
||||
recipe = {
|
||||
{'more_fire:oil_lamp_off'}
|
||||
}
|
||||
})
|
||||
|
||||
-- cooking recipes
|
||||
minetest.register_craft({
|
||||
type = 'cooking',
|
||||
recipe = 'group:tree',
|
||||
output = 'more_fire:charcoal',
|
||||
})
|
||||
|
||||
-- fuel recipes
|
||||
minetest.register_craft({
|
||||
type = 'fuel',
|
||||
recipe = 'more_fire:charcoal',
|
||||
burntime = 35,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'fuel',
|
||||
recipe = 'more_fire:oil',
|
||||
burntime = 10,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'fuel',
|
||||
recipe = 'more_fire:charcoal_block',
|
||||
burntime = 315,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'fuel',
|
||||
recipe = 'more_fire:torch_stub',
|
||||
burntime = 2,
|
||||
})
|
|
@ -1,2 +1,2 @@
|
|||
default
|
||||
|
||||
vessels
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
|
||||
function default.get_hotbar_bg(x,y)
|
||||
local out = ''
|
||||
for i=0,7,1 do
|
||||
out = out ..'image['..x+i..','..y..';1,1;gui_hb_bg.png]'
|
||||
end
|
||||
return out
|
||||
end
|
||||
|
||||
function more_fire.campfire(pos, percent, item_percent)
|
||||
local formspec =
|
||||
'size[8,6.75]'..
|
||||
default.gui_bg..
|
||||
default.gui_bg_img..
|
||||
default.gui_slots..
|
||||
'background[5,5;1,1;more_fire_campfire_active.png;true]'..
|
||||
'list[current_name;fuel;1,1.5;1,1;]'..
|
||||
'list[current_player;main;0,2.75;8,1;]'..
|
||||
'list[current_player;main;0,4;8,3;8]'..
|
||||
default.get_hotbar_bg(0,2.75)
|
||||
return formspec
|
||||
end
|
||||
|
||||
function more_fire.get_campfire_formspec(pos, percent)
|
||||
local meta = minetest.get_meta(pos)local inv = meta:get_inventory()
|
||||
local fuellist = inv:get_list('fuel')
|
||||
if fuellist then
|
||||
end
|
||||
return more_fire.campfire(pos, percent, item_percent)
|
||||
end
|
||||
|
||||
function burn(pointed_thing) --kindling doesn't always start from the first spark
|
||||
local ignite_chance = math.random(5)
|
||||
if ignite_chance == 1
|
||||
and string.find(minetest.get_node(pointed_thing.under).name, 'more_fire:kindling_contained')
|
||||
then
|
||||
minetest.set_node(pointed_thing.under, {name = 'more_fire:embers_contained'})
|
||||
elseif ignite_chance == 1
|
||||
and string.find(minetest.get_node(pointed_thing.under).name, 'more_fire:kindling')
|
||||
then
|
||||
minetest.set_node(pointed_thing.under, {name = 'more_fire:embers'})
|
||||
else --Do nothing
|
||||
end
|
||||
end
|
536
init.lua
|
@ -7,51 +7,6 @@ default.gui_slots = 'listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]'
|
|||
|
||||
more_fire = {}
|
||||
|
||||
function default.get_hotbar_bg(x,y)
|
||||
local out = ''
|
||||
for i=0,7,1 do
|
||||
out = out ..'image['..x+i..','..y..';1,1;gui_hb_bg.png]'
|
||||
end
|
||||
return out
|
||||
end
|
||||
|
||||
function more_fire.campfire(pos, percent, item_percent)
|
||||
local formspec =
|
||||
'size[8,6.75]'..
|
||||
default.gui_bg..
|
||||
default.gui_bg_img..
|
||||
default.gui_slots..
|
||||
'background[5,5;1,1;campfire_active.png;true]'..
|
||||
'list[current_name;fuel;1,1.5;1,1;]'..
|
||||
'list[current_player;main;0,2.75;8,1;]'..
|
||||
'list[current_player;main;0,4;8,3;8]'..
|
||||
default.get_hotbar_bg(0,2.75)
|
||||
return formspec
|
||||
end
|
||||
|
||||
function more_fire.get_campfire_formspec(pos, percent)
|
||||
local meta = minetest.get_meta(pos)local inv = meta:get_inventory()
|
||||
local fuellist = inv:get_list('fuel')
|
||||
if fuellist then
|
||||
end
|
||||
return more_fire.campfire(pos, percent, item_percent)
|
||||
end
|
||||
|
||||
function burn(pointed_thing) --kindling doesn't always start from the first spark
|
||||
ignite_chance = math.random(5)
|
||||
if ignite_chance == 1
|
||||
and string.find(minetest.get_node(pointed_thing.under).name, 'more_fire:kindling_contained')
|
||||
then
|
||||
minetest.swap_node(pointed_thing.under, {name = 'more_fire:embers_contained'})
|
||||
elseif ignite_chance == 1
|
||||
and string.find(minetest.get_node(pointed_thing.under).name, 'more_fire:kindling')
|
||||
then
|
||||
minetest.swap_node(pointed_thing.under, {name = 'more_fire:embers'})
|
||||
else --Do nothing
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- formspecs
|
||||
more_fire.embers_formspec =
|
||||
'size[8,6.75]'..
|
||||
|
@ -59,490 +14,19 @@ default.gui_bg..
|
|||
default.gui_bg_img..
|
||||
default.gui_slots..
|
||||
'listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]'..
|
||||
'background[5,5;1,1;campfire_inactive.png;true]'..
|
||||
'background[5,5;1,1;more_fire_campfire_inactive.png;true]'..
|
||||
'list[current_name;fuel;1,1.5;1,1;]'..
|
||||
'list[current_player;main;0,2.75;8,1;]'..
|
||||
'list[current_player;main;0,4;8,3;8]'..
|
||||
default.get_hotbar_bg(0,2.75)
|
||||
|
||||
-- ABMs
|
||||
minetest.register_abm({ -- Controls non-contained fire
|
||||
nodenames = {'more_fire:embers','more_fire:campfire'},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
for i, name in ipairs({
|
||||
'fuel_totaltime',
|
||||
'fuel_time',
|
||||
}) do
|
||||
if meta:get_string(name) == '' then
|
||||
meta:set_float(name, 5.0)
|
||||
end
|
||||
end
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local was_active = false
|
||||
if meta:get_float('fuel_time') < meta:get_float('fuel_totaltime') then
|
||||
was_active = true
|
||||
meta:set_float('fuel_time', meta:get_float('fuel_time') + 0.25)
|
||||
end
|
||||
if meta:get_float('fuel_time') < meta:get_float('fuel_totaltime') then
|
||||
minetest.sound_play({name='fire_small'},{gain=0.07},
|
||||
{loop=true})
|
||||
local percent = math.floor(meta:get_float('fuel_time') /
|
||||
meta:get_float('fuel_totaltime') * 100)
|
||||
meta:set_string('infotext','Campfire active: '..percent..'%')
|
||||
minetest.swap_node(pos, {name = 'more_fire:campfire'})
|
||||
meta:set_string('formspec',
|
||||
'size[8,6.75]'..
|
||||
default.gui_bg..
|
||||
default.gui_slots..
|
||||
'background[5,5;1,1;campfire_active.png;true]'..
|
||||
'list[current_name;fuel;1,1.5;1,1;]'..
|
||||
'list[current_player;main;0,2.75;8,1;]'..
|
||||
'list[current_player;main;0,4;8,3;8]')
|
||||
return
|
||||
end
|
||||
local fuel = nil
|
||||
local fuellist = inv:get_list('fuel')
|
||||
if fuellist then
|
||||
fuel = minetest.get_craft_result({method = 'fuel', width = 1, items = fuellist})
|
||||
end
|
||||
if fuel.time <= 0 then
|
||||
meta:set_string('infotext','Put more wood on the fire!')
|
||||
minetest.swap_node(pos, {name = 'more_fire:embers'})
|
||||
meta:set_string('formspec', more_fire.embers_formspec)
|
||||
return
|
||||
end
|
||||
meta:set_string('fuel_totaltime', fuel.time)
|
||||
meta:set_string('fuel_time', 0)
|
||||
local stack = inv:get_stack('fuel', 1)
|
||||
stack:take_item()
|
||||
inv:set_stack('fuel', 1, stack)
|
||||
end,
|
||||
})
|
||||
--configpath = minetest.get_mod_directory() ..'/config.txt'
|
||||
--dofile(configpath)
|
||||
dofile(minetest.get_modpath('more_fire')..'/config.txt')
|
||||
dofile(minetest.get_modpath('more_fire')..'/functions.lua')
|
||||
dofile(minetest.get_modpath('more_fire')..'/abms.lua')
|
||||
dofile(minetest.get_modpath('more_fire')..'/nodes.lua')
|
||||
dofile(minetest.get_modpath('more_fire')..'/craftitems.lua')
|
||||
dofile(minetest.get_modpath('more_fire')..'/crafts.lua')
|
||||
dofile(minetest.get_modpath('more_fire')..'/tools.lua')
|
||||
|
||||
minetest.register_abm({ -- Controls the contained fires.
|
||||
nodenames = {'more_fire:embers_contained', 'more_fire:campfire_contained'},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
for i, name in ipairs({
|
||||
'fuel_totaltime',
|
||||
'fuel_time',
|
||||
}) do
|
||||
if meta:get_string(name) == '' then
|
||||
meta:set_float(name, 0.0)
|
||||
end
|
||||
end
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local was_active = false
|
||||
if meta:get_float('fuel_time') < meta:get_float('fuel_totaltime') then
|
||||
was_active = true
|
||||
meta:set_float('fuel_time', meta:get_float('fuel_time') + 0.25)
|
||||
end
|
||||
if meta:get_float('fuel_time') < meta:get_float('fuel_totaltime') then
|
||||
minetest.sound_play({name='fire_small'},{gain=0.07},
|
||||
{loop=true})
|
||||
local percent = math.floor(meta:get_float('fuel_time') /
|
||||
meta:get_float('fuel_totaltime') * 100)
|
||||
meta:set_string('infotext','Campfire active: '..percent..'%')
|
||||
minetest.swap_node(pos, {name = 'more_fire:campfire_contained'})
|
||||
meta:set_string('formspec',
|
||||
'size[8,6.75]'..
|
||||
default.gui_bg..
|
||||
default.gui_slots..
|
||||
'background[5,5;1,1;campfire_active.png;true]'..
|
||||
'list[current_name;fuel;1,1.5;1,1;]'..
|
||||
'list[current_player;main;0,2.75;8,1;]'..
|
||||
'list[current_player;main;0,4;8,3;8]')
|
||||
return
|
||||
end
|
||||
local fuel = nil
|
||||
local fuellist = inv:get_list('fuel')
|
||||
if fuellist then
|
||||
fuel = minetest.get_craft_result({method = 'fuel', width = 1, items = fuellist})
|
||||
end
|
||||
if fuel.time <= 0 then
|
||||
meta:set_string('infotext','Put more wood on the fire!')
|
||||
minetest.swap_node(pos, {name = 'more_fire:embers_contained'})
|
||||
meta:set_string('formspec', more_fire.embers_formspec)
|
||||
return
|
||||
end
|
||||
meta:set_string('fuel_totaltime', fuel.time)
|
||||
meta:set_string('fuel_time', 0)
|
||||
local stack = inv:get_stack('fuel', 1)
|
||||
stack:take_item()
|
||||
inv:set_stack('fuel', 1, stack)
|
||||
end,
|
||||
})
|
||||
|
||||
-- node definitions
|
||||
minetest.register_node(':default:gravel', {
|
||||
description = 'Gravel',
|
||||
tiles = {'default_gravel.png'},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2, falling_node=1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {'more_fire:flintstone'},
|
||||
rarity = 15,
|
||||
},
|
||||
{
|
||||
items = {'default:gravel'},
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name='default_gravel_footstep', gain=0.45},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node(":default:torch", {
|
||||
description = "Torch",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
{name = "default_torch_new_top.png", animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.0}},
|
||||
{name = "default_torch_new_bottom.png", animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.0}},
|
||||
{name = "default_torch_new_side.png", animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.0}},
|
||||
},
|
||||
inventory_image = "default_torch_new_inv.png",
|
||||
wield_image = "default_torch_new_inv.png",
|
||||
wield_scale = {x = 1, y = 1, z = 1.25},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
light_source = LIGHT_MAX - 1,
|
||||
node_box = {
|
||||
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",
|
||||
wall_top = {-0.05, -0.05, -0.25, 0.25, 0.5 , 0.25},
|
||||
wall_bottom = {-0.25, -0.5 , -0.25, 0.25, 0.0625, 0.25},
|
||||
wall_side = {-0.25, -0.5 , -0.25, -0.5, 0.0625, 0.25},
|
||||
},
|
||||
groups = {choppy = 2, dig_immediate = 3, flammable = 1, attached_node = 1, hot = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:charcoal_block', {
|
||||
description = 'Charcoal Block',
|
||||
tiles = {'more_fire_charcoal_block.png'},
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand=2,cracky=3,flammable=1,},
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:kindling', {
|
||||
description = 'Kindling',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_kindling.obj',
|
||||
tiles = {'more_fire_campfire_logs.png'},
|
||||
inventory_image = 'more_fire_kindling.png',
|
||||
wield_image = 'more_fire_kindling.png',
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {dig_immediate=2, flammable=1,},
|
||||
paramtype = 'light',
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, -0.5, 0.48 },
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
meta:set_string('formspec', more_fire.embers_formspec)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size('fuel', 4)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:embers', {
|
||||
description = 'Campfire',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_kindling.obj',
|
||||
tiles = {'more_fire_campfire_logs.png'},
|
||||
inventory_image = 'more_fire_campfire.png',
|
||||
wield_image = 'more_fire_campfire.png',
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {dig_immediate=3, flammable=1,},
|
||||
paramtype = 'light',
|
||||
drop = 'more_fire:kindling',
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, -0.5, 0.48 },
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
meta:set_string('formspec', more_fire.embers_formspec)
|
||||
meta:set_string('infotext', 'Campfire');
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size('fuel', 4)
|
||||
end,
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty('fuel') then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:campfire', {
|
||||
description = 'Burning Campfire',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_campfire.obj',
|
||||
tiles = {
|
||||
{name='fire_basic_flame_animated.png', animation={type='vertical_frames', aspect_w=16, aspect_h=16, length=1}}, {name='more_fire_campfire_logs.png'}},
|
||||
inventory_image = 'more_fire_campfire.png',
|
||||
wield_image = 'more_fire_campfire.png',
|
||||
paramtype = 'light',
|
||||
walkable = false,
|
||||
damage_per_second = 1,
|
||||
light_source = 14,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2,hot=2,attached_node=1,igniter=1,not_in_creative_inventory=1},
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, -0.5, 0.48 },
|
||||
},
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty('fuel') then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
get_staticdata = function(self)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:kindling_contained', {
|
||||
description = 'Contained Kindling',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_kindling_contained.obj',
|
||||
tiles = {'more_fire_campfire_logs.png'},
|
||||
inventory_image = 'more_fire_kindling_contained.png',
|
||||
wield_image = 'more_fire_kindling.png',
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {dig_immediate=3,flammable=1},
|
||||
paramtype = 'light',
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, -0.5, 0.48 },
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
meta:set_string('formspec', more_fire.embers_formspec)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size('fuel', 4)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:embers_contained', {
|
||||
description = 'Contained Campfire',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_kindling_contained.obj',
|
||||
tiles = {'more_fire_campfire_logs.png'},
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {dig_immediate=3, flammable=1, not_in_creative_inventory=1},
|
||||
paramtype = 'light',
|
||||
drop = 'more_fire:kindling_contained',
|
||||
inventory_image = 'more_fire_campfire_contained.png',
|
||||
wield_image = 'more_fire_campfire_contained.png',
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, -0.5, 0.48 },
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
meta:set_string('formspec', more_fire.embers_formspec)
|
||||
meta:set_string('infotext', 'Campfire');
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size('fuel', 4)
|
||||
end,
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty('fuel') then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:campfire_contained', {
|
||||
description = 'Contained Campfire',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_contained_campfire.obj',
|
||||
tiles = {
|
||||
{name='fire_basic_flame_animated.png', animation={type='vertical_frames', aspect_w=16, aspect_h=16, length=1}}, {name='more_fire_campfire_logs.png'}},
|
||||
inventory_image = 'more_fire_campfire_contained.png',
|
||||
wield_image = 'more_fire_campfire_contained.png',
|
||||
paramtype = 'light',
|
||||
walkable = false,
|
||||
damage_per_second = 1,
|
||||
drop = 'more_fire:charcoal',
|
||||
light_source = 14,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2,hot=2,attached_node=1,dig_immediate=3,not_in_creative_inventory=1},
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, -0.5, 0.48 },
|
||||
},
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty('fuel') then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
get_staticdata = function(self)
|
||||
end,
|
||||
})
|
||||
|
||||
-- craft items
|
||||
minetest.register_craftitem('more_fire:charcoal', {
|
||||
description = 'Charcoal',
|
||||
inventory_image = 'more_fire_charcoal_lump.png',
|
||||
groups = {coal = 1}
|
||||
})
|
||||
|
||||
minetest.register_craftitem('more_fire:flintstone', {
|
||||
description = 'Flintstone',
|
||||
inventory_image = 'more_fire_flintstone.png',
|
||||
})
|
||||
|
||||
minetest.register_craftitem('more_fire:lighter', {
|
||||
description = 'Flint and Steel',
|
||||
inventory_image = 'more_fire_lighter.png',
|
||||
})
|
||||
|
||||
-- craft recipes
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:charcoal_block 1',
|
||||
recipe = {
|
||||
{'more_fire:charcoal', 'more_fire:charcoal', 'more_fire:charcoal'},
|
||||
{'more_fire:charcoal', 'more_fire:charcoal', 'more_fire:charcoal'},
|
||||
{'more_fire:charcoal', 'more_fire:charcoal', 'more_fire:charcoal'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:charcoal 9',
|
||||
recipe = {
|
||||
{'more_fire:charcoal_block'}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:embers 1',
|
||||
recipe = {
|
||||
{'more_fire:kindling'},
|
||||
{'default:torch'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:embers 1',
|
||||
recipe = {
|
||||
{'', '', ''},
|
||||
{'default:stick', 'default:torch', 'default:stick'},
|
||||
{'group:wood', 'group:wood', 'group:wood'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:embers_contained 1',
|
||||
recipe = {
|
||||
{'', 'more_fire:embers', ''},
|
||||
{'default:cobble', 'default:cobble', 'default:cobble'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:torch 4',
|
||||
recipe = {
|
||||
{'more_fire:charcoal'},
|
||||
{'group:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'shapeless',
|
||||
output = 'more_fire:kindling 1',
|
||||
recipe = {'group:stick', 'group:wood', 'group:flammable', 'group:flammable'},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'more_fire:kindling_contained 1',
|
||||
recipe = {
|
||||
{'','more_fire:kindling', ''},
|
||||
{'default:cobble','default:cobble','default:cobble'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'shapeless',
|
||||
output = 'more_fire:lighter 1',
|
||||
recipe = {'more_fire:flintstone', 'default:steel_ingot'}
|
||||
})
|
||||
|
||||
-- cooking recipes
|
||||
minetest.register_craft({
|
||||
type = 'cooking',
|
||||
recipe = 'group:tree',
|
||||
output = 'more_fire:charcoal',
|
||||
})
|
||||
|
||||
-- fuel recipes
|
||||
minetest.register_craft({
|
||||
type = 'fuel',
|
||||
recipe = 'more_fire:charcoal',
|
||||
burntime = 35,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'fuel',
|
||||
recipe = 'more_fire:charcoal_block',
|
||||
burntime = 315,
|
||||
})
|
||||
|
||||
-- tools
|
||||
minetest.register_tool('more_fire:lighter', {
|
||||
description = 'Lighter',
|
||||
inventory_image = 'more_fire_lighter.png',
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 0,
|
||||
groupcaps = {
|
||||
flammable = {uses = 200, maxlevel = 1},
|
||||
}
|
||||
},
|
||||
on_use = function(itemstack, user, pointed_thing, pos)
|
||||
minetest.sound_play("spark", {gain = 1.0, max_hear_distance = 32, loop = false })
|
||||
if pointed_thing.type == 'node'
|
||||
and string.find(minetest.get_node(pointed_thing.under).name, 'more_fire:kindling')
|
||||
then
|
||||
burn(pointed_thing)
|
||||
itemstack:add_wear(65535/200)
|
||||
return itemstack
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -0,0 +1,160 @@
|
|||
# Blender v2.74 (sub 5) OBJ File: 'lamp.blend'
|
||||
# www.blender.org
|
||||
o TabletopLamp_Cube.002
|
||||
v 0.140000 -0.399025 -0.139882
|
||||
v 0.200000 0.200975 -0.199882
|
||||
v 0.140000 -0.399025 0.140118
|
||||
v 0.200000 0.200975 0.200118
|
||||
v -0.140000 -0.399025 -0.139882
|
||||
v -0.200000 0.200975 -0.199882
|
||||
v -0.140000 -0.399025 0.140118
|
||||
v -0.200000 0.200975 0.200118
|
||||
v 0.196000 -0.399025 -0.195882
|
||||
v 0.196000 -0.399025 0.196118
|
||||
v -0.196000 -0.399025 -0.195882
|
||||
v -0.196000 -0.399025 0.196118
|
||||
v 0.196000 -0.498858 -0.195882
|
||||
v 0.196000 -0.498858 0.196118
|
||||
v -0.196000 -0.498857 -0.195882
|
||||
v -0.196000 -0.498857 0.196118
|
||||
v 0.063585 -0.434677 0.063703
|
||||
v 0.063585 -0.434677 -0.063467
|
||||
v -0.063585 -0.434677 0.063703
|
||||
v -0.063585 -0.434677 -0.063467
|
||||
v 0.000000 -0.362197 -0.068012
|
||||
v 0.000000 -0.362197 0.067749
|
||||
v 0.000000 -0.296697 -0.029923
|
||||
v 0.000000 -0.296697 0.029661
|
||||
v 0.067880 -0.362197 -0.068012
|
||||
v 0.067880 -0.362197 0.067749
|
||||
v 0.029792 -0.296697 -0.029923
|
||||
v 0.029792 -0.296697 0.029661
|
||||
v -0.067880 -0.362197 -0.068011
|
||||
v -0.067880 -0.362197 0.067749
|
||||
v -0.029792 -0.296697 -0.029923
|
||||
v -0.029792 -0.296697 0.029661
|
||||
v 0.000000 -0.095525 -0.000131
|
||||
v 0.000000 -0.414885 -0.000131
|
||||
v 0.029792 -0.296697 -0.000131
|
||||
v 0.067880 -0.362197 -0.000131
|
||||
v -0.067880 -0.362197 -0.000131
|
||||
v -0.029792 -0.296697 -0.000131
|
||||
vt 0.000184 0.100646
|
||||
vt 0.245094 0.025548
|
||||
vt 0.321566 0.406010
|
||||
vt 0.150129 0.458578
|
||||
vt 0.500000 0.000184
|
||||
vt 0.500000 0.388255
|
||||
vt 0.754906 0.025548
|
||||
vt 0.678434 0.406010
|
||||
vt 0.999816 0.100646
|
||||
vt 0.849871 0.458578
|
||||
vt 0.126413 0.785921
|
||||
vt 0.324583 0.785910
|
||||
vt 0.364220 0.825542
|
||||
vt 0.086781 0.825558
|
||||
vt 0.364204 0.548103
|
||||
vt 0.086765 0.548119
|
||||
vt 0.086761 0.477462
|
||||
vt 0.364200 0.477446
|
||||
vt 0.324572 0.587740
|
||||
vt 0.126401 0.587751
|
||||
vt 0.538369 0.694413
|
||||
vt 0.828479 0.694413
|
||||
vt 0.828479 0.984522
|
||||
vt 0.538370 0.984522
|
||||
vt 0.434861 0.548099
|
||||
vt 0.434876 0.825538
|
||||
vt 0.016124 0.825562
|
||||
vt 0.016108 0.548123
|
||||
vt 0.364224 0.896199
|
||||
vt 0.086785 0.896215
|
||||
vt 0.128242 0.782956
|
||||
vt 0.128359 0.588263
|
||||
vt 0.184733 0.643133
|
||||
vt 0.183276 0.726280
|
||||
vt 0.266422 0.644797
|
||||
vt 0.267527 0.727647
|
||||
vt 0.321989 0.589472
|
||||
vt 0.323247 0.783309
|
||||
vt 0.710670 0.483156
|
||||
vt 0.731303 0.458009
|
||||
vt 0.938416 0.548420
|
||||
vt 0.722804 0.505829
|
||||
vt 0.668840 0.608672
|
||||
vt 0.623856 0.671057
|
||||
vt 0.584008 0.546251
|
||||
vt 0.665070 0.585205
|
||||
vt 0.730212 0.636289
|
||||
vt 0.709888 0.610891
|
||||
vt 0.722299 0.588369
|
||||
vt 0.669598 0.484873
|
||||
vt 0.665541 0.508292
|
||||
vt 0.625380 0.421942
|
||||
vt 0.710294 0.566741
|
||||
vt 0.676652 0.564725
|
||||
vt 0.670759 0.546782
|
||||
vt 0.721862 0.547095
|
||||
vt 0.710535 0.527308
|
||||
vt 0.676871 0.528913
|
||||
vn 0.995000 -0.099500 -0.000000
|
||||
vn 0.000000 -0.099500 0.995000
|
||||
vn -0.995000 -0.099500 0.000000
|
||||
vn -0.000000 -0.099500 -0.995000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn -0.000000 0.000000 -1.000000
|
||||
vn -0.000000 -1.000000 0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 1.000000 -0.000000 -0.000000
|
||||
vn 0.000000 0.000000 1.000000
|
||||
vn 0.000000 0.906200 0.422800
|
||||
vn 0.422800 0.906200 -0.000000
|
||||
vn -0.422800 0.906200 0.000000
|
||||
vn -0.000000 0.906200 -0.422800
|
||||
vn 0.692100 0.205000 -0.692100
|
||||
vn -0.340200 -0.876600 -0.340200
|
||||
vn -0.692100 0.205000 -0.692100
|
||||
vn 0.864500 0.502700 -0.000000
|
||||
vn 0.340200 -0.876600 -0.340200
|
||||
vn -0.864500 0.502700 0.000000
|
||||
vn -0.000000 0.502700 -0.864500
|
||||
vn 0.000000 0.502700 0.864500
|
||||
vn 0.692100 0.205000 0.692100
|
||||
vn -0.340200 -0.876600 0.340200
|
||||
vn -0.692100 0.205000 0.692100
|
||||
vn 0.340200 -0.876600 0.340200
|
||||
s off
|
||||
f 2/1/1 4/2/1 3/3/1 1/4/1
|
||||
f 4/2/2 8/5/2 7/6/2 3/3/2
|
||||
f 8/5/3 6/7/3 5/8/3 7/6/3
|
||||
f 6/7/4 2/9/4 1/10/4 5/8/4
|
||||
f 3/11/5 7/12/5 12/13/5 10/14/5
|
||||
f 11/15/6 9/16/6 13/17/6 15/18/6
|
||||
f 5/19/5 1/20/5 9/16/5 11/15/5
|
||||
f 7/12/5 5/19/5 11/15/5 12/13/5
|
||||
f 1/20/5 3/11/5 10/14/5 9/16/5
|
||||
f 13/21/7 14/22/7 16/23/7 15/24/7
|
||||
f 12/13/8 11/15/8 15/25/8 16/26/8
|
||||
f 9/16/9 10/14/9 14/27/9 13/28/9
|
||||
f 10/14/10 12/13/10 16/29/10 14/30/10
|
||||
f 1/31/11 5/32/11 20/33/11 18/34/11
|
||||
f 19/35/5 17/36/5 18/34/5 20/33/5
|
||||
f 5/32/12 7/37/12 19/35/12 20/33/12
|
||||
f 3/38/13 1/31/13 18/34/13 17/36/13
|
||||
f 7/37/14 3/38/14 17/36/14 19/35/14
|
||||
f 27/39/15 23/40/15 33/41/15 35/42/15
|
||||
f 29/43/16 21/44/16 34/45/16 37/46/16
|
||||
f 23/47/17 31/48/17 38/49/17 33/41/17
|
||||
f 25/50/18 27/39/18 35/42/18 36/51/18
|
||||
f 21/52/19 25/50/19 36/51/19 34/45/19
|
||||
f 31/48/20 29/43/20 37/46/20 38/49/20
|
||||
f 27/39/21 25/50/21 21/52/21 23/40/21
|
||||
f 32/53/22 30/54/22 22/55/22 24/56/22
|
||||
f 35/42/23 33/41/23 24/56/23 28/57/23
|
||||
f 37/46/24 34/45/24 22/55/24 30/54/24
|
||||
f 23/47/21 21/44/21 29/43/21 31/48/21
|
||||
f 24/56/22 22/55/22 26/58/22 28/57/22
|
||||
f 33/41/25 38/49/25 32/53/25 24/56/25
|
||||
f 36/51/18 35/42/18 28/57/18 26/58/18
|
||||
f 34/45/26 36/51/26 26/58/26 22/55/26
|
||||
f 38/49/20 37/46/20 30/54/20 32/53/20
|
|
@ -0,0 +1,187 @@
|
|||
# Blender v2.74 (sub 5) OBJ File: 'lamp.blend'
|
||||
# www.blender.org
|
||||
o Cube.001
|
||||
v 0.140000 -0.280515 0.022415
|
||||
v 0.200000 0.319485 -0.037585
|
||||
v 0.140000 -0.280515 0.302415
|
||||
v 0.200000 0.319485 0.362415
|
||||
v -0.140000 -0.280515 0.022415
|
||||
v -0.200000 0.319485 -0.037585
|
||||
v -0.140000 -0.280515 0.302415
|
||||
v -0.200000 0.319485 0.362415
|
||||
v 0.196000 -0.280515 -0.033585
|
||||
v 0.196000 -0.280515 0.358415
|
||||
v -0.196000 -0.280515 -0.033585
|
||||
v -0.196000 -0.280515 0.358415
|
||||
v 0.196000 -0.380348 -0.033585
|
||||
v 0.196000 -0.380348 0.358415
|
||||
v -0.196000 -0.380348 -0.033585
|
||||
v -0.196000 -0.380348 0.358415
|
||||
v -0.117783 -0.280515 0.437568
|
||||
v 0.117783 -0.280515 0.437568
|
||||
v -0.117783 -0.380348 0.437568
|
||||
v 0.117783 -0.380348 0.437568
|
||||
v -0.222778 -0.190702 0.499030
|
||||
v 0.222778 -0.190702 0.499029
|
||||
v -0.222778 -0.380348 0.499030
|
||||
v 0.222778 -0.380348 0.499029
|
||||
v 0.063585 -0.316167 0.226000
|
||||
v 0.063585 -0.316167 0.098830
|
||||
v -0.063585 -0.316167 0.226000
|
||||
v -0.063585 -0.316167 0.098830
|
||||
v 0.000000 -0.243687 0.094285
|
||||
v 0.000000 -0.243687 0.230046
|
||||
v 0.000000 -0.178187 0.132373
|
||||
v 0.000000 -0.178187 0.191958
|
||||
v 0.067880 -0.243687 0.094285
|
||||
v 0.067880 -0.243687 0.230046
|
||||
v 0.029792 -0.178187 0.132373
|
||||
v 0.029792 -0.178187 0.191958
|
||||
v -0.067880 -0.243687 0.094285
|
||||
v -0.067880 -0.243687 0.230046
|
||||
v -0.029792 -0.178187 0.132373
|
||||
v -0.029792 -0.178187 0.191958
|
||||
v 0.000000 0.022985 0.162166
|
||||
v 0.000000 -0.296375 0.162166
|
||||
v 0.029792 -0.178187 0.162166
|
||||
v 0.067880 -0.243687 0.162166
|
||||
v -0.067880 -0.243687 0.162166
|
||||
v -0.029792 -0.178187 0.162166
|
||||
vt 0.000184 0.100646
|
||||
vt 0.245094 0.025548
|
||||
vt 0.321566 0.406010
|
||||
vt 0.150129 0.458578
|
||||
vt 0.500000 0.000184
|
||||
vt 0.500000 0.388255
|
||||
vt 0.754906 0.025548
|
||||
vt 0.678434 0.406010
|
||||
vt 0.999816 0.100646
|
||||
vt 0.849871 0.458578
|
||||
vt 0.314421 0.800681
|
||||
vt 0.318222 0.575143
|
||||
vt 0.363809 0.525366
|
||||
vt 0.362687 0.863618
|
||||
vt 0.105089 0.564675
|
||||
vt 0.089347 0.790322
|
||||
vt 0.017624 0.857183
|
||||
vt 0.018081 0.506752
|
||||
vt 0.138376 0.596328
|
||||
vt 0.130292 0.760686
|
||||
vt 0.605426 0.689137
|
||||
vt 0.886635 0.689137
|
||||
vt 0.886635 0.970346
|
||||
vt 0.605426 0.970346
|
||||
vt 0.354343 0.937588
|
||||
vt 0.465557 0.832974
|
||||
vt 0.442159 0.934100
|
||||
vt 0.361926 0.441181
|
||||
vt 0.570612 0.907416
|
||||
vt 0.489202 0.967153
|
||||
vt 0.441846 0.565238
|
||||
vt 0.426006 0.454242
|
||||
vt 0.943417 0.745248
|
||||
vt 0.943417 0.914235
|
||||
vt 0.570612 0.498898
|
||||
vt 0.485731 0.420788
|
||||
vt 0.987508 0.669927
|
||||
vt 0.987508 0.989556
|
||||
vt 0.315130 0.800066
|
||||
vt 0.132668 0.760847
|
||||
vt 0.188257 0.717364
|
||||
vt 0.266689 0.731056
|
||||
vt 0.186969 0.642567
|
||||
vt 0.267853 0.635424
|
||||
vt 0.138529 0.595618
|
||||
vt 0.318539 0.576008
|
||||
vt 0.710670 0.483156
|
||||
vt 0.731303 0.458009
|
||||
vt 0.938416 0.548420
|
||||
vt 0.722804 0.505829
|
||||
vt 0.668840 0.608672
|
||||
vt 0.623856 0.671057
|
||||
vt 0.584008 0.546251
|
||||
vt 0.665070 0.585205
|
||||
vt 0.730212 0.636289
|
||||
vt 0.709888 0.610891
|
||||
vt 0.722299 0.588369
|
||||
vt 0.669598 0.484873
|
||||
vt 0.665541 0.508292
|
||||
vt 0.625380 0.421942
|
||||
vt 0.710294 0.566741
|
||||
vt 0.676652 0.564725
|
||||
vt 0.670759 0.546782
|
||||
vt 0.721862 0.547095
|
||||
vt 0.710535 0.527308
|
||||
vt 0.676871 0.528913
|
||||
vn 0.995000 -0.099500 -0.000000
|
||||
vn 0.000000 -0.099500 0.995000
|
||||
vn -0.995000 -0.099500 0.000000
|
||||
vn -0.000000 -0.099500 -0.995000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn -0.000000 0.000000 -1.000000
|
||||
vn -0.000000 -1.000000 0.000000
|
||||
vn 0.711300 -0.000000 0.702900
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 1.000000 -0.000000 -0.000000
|
||||
vn 0.505200 0.000000 -0.863000
|
||||
vn -0.711300 0.000000 0.702900
|
||||
vn -0.000000 0.564800 -0.825300
|
||||
vn -0.505200 0.000000 -0.863000
|
||||
vn 0.000000 0.906200 0.422800
|
||||
vn 0.422800 0.906200 -0.000000
|
||||
vn -0.422800 0.906200 0.000000
|
||||
vn 0.000000 0.906200 -0.422800
|
||||
vn 0.692100 0.205000 -0.692100
|
||||
vn -0.340200 -0.876600 -0.340200
|
||||
vn -0.692100 0.205000 -0.692100
|
||||
vn 0.864500 0.502700 -0.000000
|
||||
vn 0.340200 -0.876600 -0.340200
|
||||
vn -0.864500 0.502700 0.000000
|
||||
vn -0.000000 0.502700 -0.864500
|
||||
vn 0.000000 0.502700 0.864500
|
||||
vn 0.692100 0.205000 0.692100
|
||||
vn -0.340200 -0.876600 0.340200
|
||||
vn -0.692100 0.205000 0.692100
|
||||
vn 0.340200 -0.876600 0.340200
|
||||
s off
|
||||
f 2/1/1 4/2/1 3/3/1 1/4/1
|
||||
f 4/2/2 8/5/2 7/6/2 3/3/2
|
||||
f 8/5/3 6/7/3 5/8/3 7/6/3
|
||||
f 6/7/4 2/9/4 1/10/4 5/8/4
|
||||
f 3/11/5 7/12/5 12/13/5 10/14/5
|
||||
f 11/15/6 9/16/6 13/17/6 15/18/6
|
||||
f 5/19/5 1/20/5 9/16/5 11/15/5
|
||||
f 7/12/5 5/19/5 11/15/5 12/13/5
|
||||
f 1/20/5 3/11/5 10/14/5 9/16/5
|
||||
f 13/21/7 14/22/7 16/23/7 15/24/7
|
||||
f 14/25/8 10/14/8 18/26/8 20/27/8
|
||||
f 12/13/9 11/15/9 15/18/9 16/28/9
|
||||
f 9/16/10 10/14/10 14/25/10 13/17/10
|
||||
f 20/27/11 18/26/11 22/29/11 24/30/11
|
||||
f 10/14/5 12/13/5 17/31/5 18/26/5
|
||||
f 12/13/12 16/28/12 19/32/12 17/31/12
|
||||
f 16/23/7 14/22/7 20/33/7 19/34/7
|
||||
f 18/26/13 17/31/13 21/35/13 22/29/13
|
||||
f 17/31/14 19/32/14 23/36/14 21/35/14
|
||||
f 19/34/7 20/33/7 24/37/7 23/38/7
|
||||
f 1/39/15 5/40/15 28/41/15 26/42/15
|
||||
f 27/43/5 25/44/5 26/42/5 28/41/5
|
||||
f 5/40/16 7/45/16 27/43/16 28/41/16
|
||||
f 3/46/17 1/39/17 26/42/17 25/44/17
|
||||
f 7/45/18 3/46/18 25/44/18 27/43/18
|
||||
f 35/47/19 31/48/19 41/49/19 43/50/19
|
||||
f 37/51/20 29/52/20 42/53/20 45/54/20
|
||||
f 31/55/21 39/56/21 46/57/21 41/49/21
|
||||
f 33/58/22 35/47/22 43/50/22 44/59/22
|
||||
f 29/60/23 33/58/23 44/59/23 42/53/23
|
||||
f 39/56/24 37/51/24 45/54/24 46/57/24
|
||||
f 35/47/25 33/58/25 29/60/25 31/48/25
|
||||
f 40/61/26 38/62/26 30/63/26 32/64/26
|
||||
f 43/50/27 41/49/27 32/64/27 36/65/27
|
||||
f 45/54/28 42/53/28 30/63/28 38/62/28
|
||||
f 31/55/25 29/52/25 37/51/25 39/56/25
|
||||
f 32/64/26 30/63/26 34/66/26 36/65/26
|
||||
f 41/49/29 46/57/29 40/61/29 32/64/29
|
||||
f 44/59/22 43/50/22 36/65/22 34/66/22
|
||||
f 42/53/30 44/59/30 34/66/30 30/63/30
|
||||
f 46/57/24 45/54/24 38/62/24 40/61/24
|
|
@ -1,64 +0,0 @@
|
|||
# Blender v2.72 (sub 0) OBJ File: 'torch.blend'
|
||||
# www.blender.org
|
||||
mtllib more_fire_torch.mtl
|
||||
o Torch_Ground_Cube.001
|
||||
v -0.053243 0.005921 0.053243
|
||||
v -0.053243 0.005921 -0.053243
|
||||
v 0.053243 0.005921 -0.053243
|
||||
v 0.053243 0.005921 0.053243
|
||||
v -0.056479 0.112407 0.056479
|
||||
v -0.056479 0.112407 -0.056479
|
||||
v 0.056479 0.112407 -0.056479
|
||||
v 0.056479 0.112407 0.056479
|
||||
v 0.059423 -0.495953 -0.059423
|
||||
v 0.059423 -0.495953 0.059423
|
||||
v -0.059423 -0.495953 0.059423
|
||||
v -0.059423 -0.495953 -0.059423
|
||||
v 0.059423 0.008013 -0.059423
|
||||
v 0.059423 0.008013 0.059423
|
||||
v -0.059423 0.008013 0.059423
|
||||
v -0.059423 0.008013 -0.059423
|
||||
vt 0.992873 0.992178
|
||||
vt 0.831122 0.992178
|
||||
vt 0.835756 0.839624
|
||||
vt 0.988240 0.839624
|
||||
vt 0.993136 0.992250
|
||||
vt 0.831385 0.992250
|
||||
vt 0.836019 0.839695
|
||||
vt 0.988503 0.839695
|
||||
vt 0.992823 0.992462
|
||||
vt 0.831072 0.992462
|
||||
vt 0.835705 0.839908
|
||||
vt 0.988189 0.839908
|
||||
vt 0.831335 0.992158
|
||||
vt 0.835968 0.839604
|
||||
vt 0.988452 0.839604
|
||||
vt 0.800000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 0.200000
|
||||
vt 0.800000 0.200000
|
||||
vt 0.998597 0.203293
|
||||
vt 0.998597 0.395526
|
||||
vt 0.806364 0.395526
|
||||
vt 0.806364 0.203293
|
||||
vt 0.400000 0.000000
|
||||
vt 0.400000 1.000000
|
||||
vt 0.200000 1.000000
|
||||
vt 0.200000 0.000000
|
||||
vt 0.800000 1.000000
|
||||
vt 0.600000 1.000000
|
||||
vt 0.600000 0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
usemtl Material
|
||||
s off
|
||||
f 5/1 6/2 2/3 1/4
|
||||
f 6/5 7/6 3/7 2/8
|
||||
f 7/9 8/10 4/11 3/12
|
||||
f 8/5 5/13 1/14 4/15
|
||||
f 9/16 10/17 11/18 12/19
|
||||
f 13/20 16/21 15/22 14/23
|
||||
f 9/24 13/25 14/26 10/27
|
||||
f 10/16 14/28 15/29 11/30
|
||||
f 11/31 15/32 16/27 12/26
|
||||
f 13/30 9/29 12/25 16/24
|
|
@ -1,64 +0,0 @@
|
|||
# Blender v2.72 (sub 0) OBJ File: 'torch.blend'
|
||||
# www.blender.org
|
||||
mtllib more_fire_torch_wall.mtl
|
||||
o Torch_Wall_Cube.000
|
||||
v 0.389233 0.142734 0.048199
|
||||
v 0.300888 0.104164 0.048199
|
||||
v 0.300888 0.104164 -0.048199
|
||||
v 0.389233 0.142734 -0.048199
|
||||
v 0.353348 0.232252 0.051129
|
||||
v 0.259632 0.191337 0.051129
|
||||
v 0.259632 0.191337 -0.051129
|
||||
v 0.353348 0.232252 -0.051129
|
||||
v 0.477546 -0.314455 -0.053794
|
||||
v 0.576146 -0.271408 -0.053794
|
||||
v 0.576146 -0.271408 0.053794
|
||||
v 0.477546 -0.314455 0.053794
|
||||
v 0.295003 0.103660 -0.053794
|
||||
v 0.393603 0.146708 -0.053794
|
||||
v 0.393603 0.146708 0.053794
|
||||
v 0.295003 0.103660 0.053794
|
||||
vt 0.992873 0.992178
|
||||
vt 0.831122 0.992178
|
||||
vt 0.835756 0.839624
|
||||
vt 0.988240 0.839624
|
||||
vt 0.993136 0.992250
|
||||
vt 0.831385 0.992250
|
||||
vt 0.836019 0.839695
|
||||
vt 0.988503 0.839695
|
||||
vt 0.992823 0.992462
|
||||
vt 0.831072 0.992462
|
||||
vt 0.835705 0.839908
|
||||
vt 0.988189 0.839908
|
||||
vt 0.831335 0.992158
|
||||
vt 0.835968 0.839604
|
||||
vt 0.988452 0.839604
|
||||
vt 0.800000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 0.200000
|
||||
vt 0.800000 0.200000
|
||||
vt 0.998597 0.203293
|
||||
vt 0.998597 0.395526
|
||||
vt 0.806364 0.395526
|
||||
vt 0.806364 0.203293
|
||||
vt 0.400000 0.000000
|
||||
vt 0.400000 1.000000
|
||||
vt 0.200000 1.000000
|
||||
vt 0.200000 0.000000
|
||||
vt 0.800000 1.000000
|
||||
vt 0.600000 1.000000
|
||||
vt 0.600000 0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
usemtl Material
|
||||
s off
|
||||
f 5/1 6/2 2/3 1/4
|
||||
f 6/5 7/6 3/7 2/8
|
||||
f 7/9 8/10 4/11 3/12
|
||||
f 8/5 5/13 1/14 4/15
|
||||
f 9/16 10/17 11/18 12/19
|
||||
f 13/20 16/21 15/22 14/23
|
||||
f 9/24 13/25 14/26 10/27
|
||||
f 10/16 14/28 15/29 11/30
|
||||
f 11/31 15/32 16/27 12/26
|
||||
f 13/30 9/29 12/25 16/24
|
|
@ -0,0 +1,509 @@
|
|||
minetest.override_item('default:gravel', {
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {'more_fire:flintstone'},
|
||||
rarity = 15,
|
||||
},
|
||||
{
|
||||
items = {'default:gravel'},
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
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'},
|
||||
},
|
||||
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',
|
||||
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',
|
||||
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},
|
||||
},
|
||||
groups = {choppy = 2, dig_immediate = 3, flammable = 1, attached_node = 1, hot = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_construct = function(pos)
|
||||
if finite_torches == true then
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(960)
|
||||
end
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
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',
|
||||
tiles = {
|
||||
{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',
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
node_box = {
|
||||
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',
|
||||
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},
|
||||
},
|
||||
groups = {choppy = 2, dig_immediate = 3, flammable = 1, attached_node = 1, not_in_creative_inventory =1},
|
||||
sounds = default.node_sound_wood_defaults(),})
|
||||
|
||||
minetest.register_node('more_fire:charcoal_block', {
|
||||
description = 'Charcoal Block',
|
||||
tiles = {'more_fire_charcoal_block.png'},
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand=2,cracky=3,flammable=1,},
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:kindling', {
|
||||
description = 'Kindling',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_kindling.obj',
|
||||
tiles = {'more_fire_campfire_logs.png'},
|
||||
inventory_image = 'more_fire_kindling.png',
|
||||
wield_image = 'more_fire_kindling.png',
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {dig_immediate=2, flammable=1,},
|
||||
paramtype = 'light',
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, 0.0, 0.48 }, -- Right, Bottom, Back, Left, Top, Front
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
-- meta:set_string('formspec', more_fire.embers_formspec)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size('fuel', 4)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:embers', {
|
||||
description = 'Campfire',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_kindling.obj',
|
||||
tiles = {'more_fire_campfire_logs.png'},
|
||||
inventory_image = 'more_fire_campfire.png',
|
||||
wield_image = 'more_fire_campfire.png',
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {dig_immediate=3, flammable=1,},
|
||||
paramtype = 'light',
|
||||
light_source = 5,
|
||||
drop = 'more_fire:kindling',
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, 0.0, 0.48 },
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
meta:set_string('formspec', more_fire.embers_formspec)
|
||||
meta:set_string('infotext', 'Campfire');
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size('fuel', 1)
|
||||
timer:start(180)
|
||||
end,
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty('fuel') then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:stop()
|
||||
minetest.set_node(pos, {name = 'more_fire:kindling'})
|
||||
end,
|
||||
after_place_node = function(pos)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local fuel = nil
|
||||
local fuellist = inv:get_list('fuel')
|
||||
if fuellist then
|
||||
fuel = minetest.get_craft_result({method = 'fuel', width = 1, items = fuellist})
|
||||
end
|
||||
if fuel.time <= 0 then
|
||||
if inv:is_empty('fuel') then
|
||||
timer:start(180)
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:campfire', {
|
||||
description = 'Burning Campfire',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_campfire.obj',
|
||||
tiles = {
|
||||
{name='fire_basic_flame_animated.png', animation={type='vertical_frames', aspect_w=16, aspect_h=16, length=1}}, {name='more_fire_campfire_logs.png'}},
|
||||
inventory_image = 'more_fire_campfire.png',
|
||||
wield_image = 'more_fire_campfire.png',
|
||||
paramtype = 'light',
|
||||
walkable = false,
|
||||
damage_per_second = 1,
|
||||
light_source = 14,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2,hot=2,attached_node=1,igniter=1,not_in_creative_inventory=1},
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, 0.0, 0.48 },
|
||||
},
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty('fuel') then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
get_staticdata = function(self)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:kindling_contained', {
|
||||
description = 'Contained Kindling',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_kindling_contained.obj',
|
||||
tiles = {'more_fire_campfire_logs.png'},
|
||||
inventory_image = 'more_fire_kindling_contained.png',
|
||||
wield_image = 'more_fire_kindling.png',
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {dig_immediate=3,flammable=1},
|
||||
paramtype = 'light',
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, 0.0, 0.48 },
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size('fuel', 4)
|
||||
end,
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty('fuel') then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:embers_contained', {
|
||||
description = 'Contained Campfire',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_kindling_contained.obj',
|
||||
tiles = {'more_fire_campfire_logs.png'},
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
groups = {dig_immediate=3, flammable=1, not_in_creative_inventory=1},
|
||||
paramtype = 'light',
|
||||
light_source = 5,
|
||||
drop = 'more_fire:kindling_contained',
|
||||
inventory_image = 'more_fire_campfire_contained.png',
|
||||
wield_image = 'more_fire_campfire_contained.png',
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, 0.0, 0.48 },
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
meta:set_string('formspec', more_fire.embers_formspec)
|
||||
meta:set_string('infotext', 'Campfire');
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size('fuel', 4)
|
||||
timer:start(190)
|
||||
end,
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty('fuel') then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:stop()
|
||||
minetest.set_node(pos, {name = 'more_fire:kindling_contained'})
|
||||
end,
|
||||
after_place_node = function(pos)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local fuel = nil
|
||||
local fuellist = inv:get_list('fuel')
|
||||
if fuellist then
|
||||
fuel = minetest.get_craft_result({method = 'fuel', width = 1, items = fuellist})
|
||||
end
|
||||
if fuel.time <= 0 then
|
||||
if inv:is_empty('fuel') then
|
||||
timer:start(190)
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:campfire_contained', {
|
||||
description = 'Contained Campfire',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_contained_campfire.obj',
|
||||
tiles = {
|
||||
{name='fire_basic_flame_animated.png', animation={type='vertical_frames', aspect_w=16, aspect_h=16, length=1}}, {name='more_fire_campfire_logs.png'}},
|
||||
inventory_image = 'more_fire_campfire_contained.png',
|
||||
wield_image = 'more_fire_campfire_contained.png',
|
||||
paramtype = 'light',
|
||||
walkable = false,
|
||||
damage_per_second = 1,
|
||||
drop = 'more_fire:charcoal',
|
||||
light_source = 14,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2,hot=2,attached_node=1,dig_immediate=3,not_in_creative_inventory=1},
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = { -0.48, -0.5, -0.48, 0.48, 0.0, 0.48 },
|
||||
},
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty('fuel') then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
get_staticdata = function(self)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:oil_lamp_on', {
|
||||
description = 'oil lamp',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_lamp_wall.obj',
|
||||
tiles = {'more_fire_lamp.png'},
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory=1},
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'facedir',
|
||||
walkable = false,
|
||||
light_source = LIGHT_MAX,
|
||||
drop = 'more_fire:oil_lamp_off',
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = {-.2, -.4, -0.1, 0.2, .35, .5},
|
||||
},
|
||||
on_timer = function(pos, itemstack)
|
||||
local node = minetest.get_node(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
if inv:contains_item('fuel', 'more_fire:oil') then
|
||||
local fuelstack = inv:get_stack('fuel', 1)
|
||||
timer:start(12*60)
|
||||
fuelstack:take_item()
|
||||
inv:set_stack('fuel', 1, fuelstack)
|
||||
if inv:is_empty('fuel') then
|
||||
minetest.set_node(pos, {name = 'more_fire:oil_lamp_off', param2=node.param2})
|
||||
end
|
||||
timer:stop()
|
||||
elseif inv:is_empty('fuel') then
|
||||
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', {
|
||||
description = 'oil lamp',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_lamp_wall.obj',
|
||||
tiles = {'more_fire_lamp.png'},
|
||||
groups = {choppy=2, dig_immediate=2,},
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'facedir',
|
||||
walkable = false,
|
||||
inventory_image = 'more_fire_lamp_inv.png',
|
||||
wield_image = 'more_fire_lamp_inv.png',
|
||||
light_source = 1,
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = {-.2, -.4, -0.1, 0.2, .35, .5},
|
||||
},
|
||||
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('fuel', 1)
|
||||
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)
|
||||
local inv = meta:get_inventory()
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
if inv:contains_item('fuel', 'more_fire:oil') then
|
||||
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,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,
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty('fuel') then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node('more_fire:oil_lamp_table_on', {
|
||||
description = 'oil lamp',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_lamp_table.obj',
|
||||
tiles = {'more_fire_lamp.png'},
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory=1},
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'facedir',
|
||||
walkable = false,
|
||||
light_source = LIGHT_MAX,
|
||||
drop = 'more_fire:oil_lamp_off',
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = {-.2, -.5, -0.2, 0.2, .25, .2}, -- Right, Bottom, Back, Left, Top, Front
|
||||
},
|
||||
on_timer = function(pos, itemstack)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
if inv:contains_item('fuel', 'more_fire:oil') then
|
||||
local fuelstack = inv:get_stack('fuel', 1)
|
||||
timer:start(12*60)
|
||||
fuelstack:take_item()
|
||||
inv:set_stack('fuel', 1, fuelstack)
|
||||
if inv:is_empty('fuel') then
|
||||
minetest.set_node(pos, {name = 'more_fire:oil_lamp_table_off'})
|
||||
end
|
||||
timer:stop()
|
||||
elseif inv:is_empty('fuel') then
|
||||
minetest.set_node(pos, {name = 'more_fire:oil_lamp_table_off'})
|
||||
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_table_off', {
|
||||
description = 'oil lamp',
|
||||
drawtype = 'mesh',
|
||||
mesh = 'more_fire_lamp_table.obj',
|
||||
tiles = {'more_fire_lamp.png'},
|
||||
groups = {choppy=2, dig_immediate=2,},
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'facedir',
|
||||
walkable = false,
|
||||
inventory_image = 'more_fire_lamp_table_inv.png',
|
||||
wield_image = 'more_fire_lamp_table_inv.png',
|
||||
light_source = 1,
|
||||
selection_box = {
|
||||
type = 'fixed',
|
||||
fixed = {-.2, -.4, -0.1, 0.2, .35, .5},
|
||||
},
|
||||
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('fuel', 1)
|
||||
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)
|
||||
local inv = meta:get_inventory()
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
if inv:contains_item('fuel', 'more_fire:oil') then
|
||||
minetest.swap_node(pos, {name = 'more_fire:oil_lamp_table_on'})
|
||||
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,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,
|
||||
can_dig = function(pos, player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty('fuel') then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
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...
|
Before Width: | Height: | Size: 786 B |
Before Width: | Height: | Size: 354 KiB After Width: | Height: | Size: 354 KiB |
Before Width: | Height: | Size: 357 KiB After Width: | Height: | Size: 357 KiB |
Before Width: | Height: | Size: 810 B After Width: | Height: | Size: 437 B |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 327 B |
After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 601 B |
After Width: | Height: | Size: 444 B |
Before Width: | Height: | Size: 535 B |
Before Width: | Height: | Size: 782 B After Width: | Height: | Size: 782 B |
After Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 769 B After Width: | Height: | Size: 769 B |
After Width: | Height: | Size: 784 B |
After Width: | Height: | Size: 684 B |
After Width: | Height: | Size: 245 B |
After Width: | Height: | Size: 778 B |
Before Width: | Height: | Size: 718 B After Width: | Height: | Size: 718 B |
|
@ -0,0 +1,22 @@
|
|||
minetest.register_tool('more_fire:lighter', {
|
||||
description = 'Lighter',
|
||||
inventory_image = 'more_fire_lighter.png',
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 0,
|
||||
groupcaps = {
|
||||
flammable = {uses = 200, maxlevel = 1},
|
||||
}
|
||||
},
|
||||
on_use = function(itemstack, user, pointed_thing, pos)
|
||||
minetest.sound_play("spark", {gain = 1.0, max_hear_distance = 32, loop = false })
|
||||
if pointed_thing.type == 'node'
|
||||
and string.find(minetest.get_node(pointed_thing.under).name, 'more_fire:kindling')
|
||||
then
|
||||
burn(pointed_thing)
|
||||
itemstack:add_wear(65535/200)
|
||||
return itemstack
|
||||
end
|
||||
end,
|
||||
})
|