Extract furnace from default mod

master
Wuzzy 2020-03-29 03:01:49 +02:00
parent d6269af2af
commit 375d2921d9
26 changed files with 47 additions and 37 deletions

View File

@ -261,24 +261,6 @@ minetest.register_craft({
minetest.register_craft({
output = 'default:furnace',
recipe = {
{'group:stone', 'group:stone', 'group:stone'},
{'group:stone', '', 'group:stone'},
{'group:stone', 'group:stone', 'group:stone'},
}
})
minetest.register_craft({
output = 'default:pfurnace',
recipe = {
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
{'default:steel_ingot', 'travelnet:prismatic_gem', 'default:obsidian'},
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
}
})
minetest.register_craft({
type = "shapeless",
output = "default:bronze_ingot 2",

View File

@ -34,7 +34,6 @@ dofile(minetest.get_modpath("default").."/functions.lua")
dofile(minetest.get_modpath("default").."/simple_nodes.lua")
dofile(minetest.get_modpath("default").."/tools.lua")
dofile(minetest.get_modpath("default").."/plants.lua")
dofile(minetest.get_modpath("default").."/furnaces.lua")
dofile(minetest.get_modpath("default").."/ladders.lua")
dofile(minetest.get_modpath("default").."/deco.lua")
dofile(minetest.get_modpath("default").."/craftitems.lua")

View File

@ -4,12 +4,12 @@
--
local formspec_info = {
["default:furnace"] = {
["hades_furnaces:furnace"] = {
bg = "gui_furnace_bg.png", flame_bg = "default_furnace_fire_bg.png", flame_fg = "default_furnace_fire_fg.png",
output_slots = "4.75,1.5;1,1"
},
["default:pfurnace"] = {
bg = "gui_pfurnace_bg.png", flame_bg = "default_pfurnace_fire_bg.png", flame_fg = "default_pfurnace_fire_fg.png",
["hades_furnaces:prism_furnace"] = {
bg = "gui_prism_furnace_bg.png", flame_bg = "hades_furnaces_prism_furnace_fire_bg.png", flame_fg = "hades_furnaces_prism_furnace_fire_fg.png",
output_slots = "4.75,0.96;2,2"
},
}
@ -118,8 +118,8 @@ end
local furnace_types = {
-- [id] = { description, texture, fuel time addition, initial burn time, output slots }
["default:furnace"] = { "Furnace", "furnace", 1.0, 0.75, 1 },
["default:pfurnace"] = { "Prism Furnace", "pfurnace", 1.0, 4.25, 4 },
["hades_furnaces:furnace"] = { "Furnace", "default_furnace", 1.0, 0.75, 1 },
["hades_furnaces:prism_furnace"] = { "Prism Furnace", "hades_furnaces_prism_furnace", 1.0, 4.25, 4 },
}
local function furnace_node_timer(pos, elapsed)
@ -242,7 +242,7 @@ local function furnace_node_timer(pos, elapsed)
swap_node(pos, id_active)
-- Furnace burn sound
if meta:get_int("sound_played") == nil or ( os.time() - meta:get_int("sound_played") ) >= 4 then
minetest.sound_play("default_furnace",{pos=pos})
minetest.sound_play("hades_furnaces_burning",{pos=pos})
meta:set_string("sound_played",os.time())
end
-- make sure timer restarts automatically
@ -282,9 +282,9 @@ for id, finfo in pairs(furnace_types) do
minetest.register_node(id, {
description = desc,
tiles = {
"default_"..tex.."_top.png", "default_"..tex.."_bottom.png",
"default_"..tex.."_side.png", "default_"..tex.."_side.png",
"default_"..tex.."_side.png", "default_"..tex.."_front.png"
tex.."_top.png", tex.."_bottom.png",
tex.."_side.png", tex.."_side.png",
tex.."_side.png", tex.."_front.png"
},
paramtype2 = "facedir",
groups = {cracky=2, furnace=1},
@ -322,11 +322,11 @@ for id, finfo in pairs(furnace_types) do
minetest.register_node(id.."_active", {
description = desc,
tiles = {
"default_"..tex.."_top.png", "default_"..tex.."_bottom.png",
"default_"..tex.."_side.png", "default_"..tex.."_side.png",
"default_"..tex.."_side.png",
tex.."_top.png", tex.."_bottom.png",
tex.."_side.png", tex.."_side.png",
tex.."_side.png",
{
image = "default_"..tex.."_front_active.png",
image = tex.."_front_active.png",
backface_culling = false,
animation = {
type = "vertical_frames",
@ -363,3 +363,27 @@ for id, finfo in pairs(furnace_types) do
table.insert(furnace_ids, id.."_active")
end
minetest.register_craft({
output = 'hades_furnaces:furnace',
recipe = {
{'group:stone', 'group:stone', 'group:stone'},
{'group:stone', '', 'group:stone'},
{'group:stone', 'group:stone', 'group:stone'},
}
})
minetest.register_craft({
output = 'hades_furnaces:prism_furnace',
recipe = {
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
{'default:steel_ingot', 'travelnet:prismatic_gem', 'default:obsidian'},
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
}
})
if minetest.get_modpath("mesecons_mvps") then
mesecon:register_mvps_stopper("hades_furnaces:furnace")
mesecon:register_mvps_stopper("hades_furnaces:furnace_active")
mesecon:register_mvps_stopper("hades_furnaces:prism_furnace")
mesecon:register_mvps_stopper("hades_furnaces:prism_furnace_active")
end

View File

@ -0,0 +1,4 @@
name = hades_furnaces
description = Adds furnaces to smelt ores and other items
depends = hades_sounds, default
optional_depends = mesecons_mvps

View File

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

View File

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 130 B

View File

Before

Width:  |  Height:  |  Size: 549 B

After

Width:  |  Height:  |  Size: 549 B

View File

Before

Width:  |  Height:  |  Size: 309 B

After

Width:  |  Height:  |  Size: 309 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 297 B

After

Width:  |  Height:  |  Size: 297 B

View File

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

View File

Before

Width:  |  Height:  |  Size: 203 B

After

Width:  |  Height:  |  Size: 203 B

View File

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

View File

Before

Width:  |  Height:  |  Size: 191 KiB

After

Width:  |  Height:  |  Size: 191 KiB

View File

Before

Width:  |  Height:  |  Size: 645 KiB

After

Width:  |  Height:  |  Size: 645 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 306 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -234,4 +234,3 @@ function mesecon:mvps_move_objects(pos, dir, nodestack)
end
end
mesecon:register_mvps_stopper("default:furnace")

View File

@ -10,7 +10,7 @@ function pipeworks.clone_node(name)
return node2
end
local furnace = pipeworks.clone_node("default:furnace")
local furnace = pipeworks.clone_node("hades_furnaces:furnace")
furnace.tiles[1] = "default_furnace_top.png^pipeworks_tube_connection_stony.png"
furnace.tiles[2] = "default_furnace_bottom.png^pipeworks_tube_connection_stony.png"
furnace.tiles[3] = "default_furnace_side.png^pipeworks_tube_connection_stony.png"
@ -48,9 +48,9 @@ local furnace = pipeworks.clone_node("default:furnace")
pipeworks.scan_for_tube_objects(pos)
end
minetest.register_node(":default:furnace", furnace)
minetest.register_node(":hades_furnaces:furnace", furnace)
local furnace_active = pipeworks.clone_node("default:furnace_active")
local furnace_active = pipeworks.clone_node("hades_furnaces:furnace_active")
furnace_active.tiles[1] = "default_furnace_top.png^pipeworks_tube_connection_stony.png"
furnace_active.tiles[2] = "default_furnace_bottom.png^pipeworks_tube_connection_stony.png"
furnace_active.tiles[3] = "default_furnace_side.png^pipeworks_tube_connection_stony.png"
@ -88,7 +88,7 @@ local furnace_active = pipeworks.clone_node("default:furnace_active")
pipeworks.scan_for_tube_objects(pos)
end
minetest.register_node(":default:furnace_active", furnace_active)
minetest.register_node(":hades_furnaces:furnace_active", furnace_active)
local chest = pipeworks.clone_node("hades_chests:chest")

View File

@ -1,5 +1,7 @@
hades_sounds
default
hades_furnaces
hades_chests
mesecons?
mesecons_mvps?
travelnet