mirror of
https://gitlab.icynet.eu/evert/melterns.git
synced 2024-11-23 23:43:46 +01:00
Minor tweaks
This commit is contained in:
parent
759ec65d8b
commit
1756ce7afd
@ -417,12 +417,7 @@ local function on_construct(pos)
|
|||||||
inv:set_size('bucket_in', 1)
|
inv:set_size('bucket_in', 1)
|
||||||
inv:set_size('bucket_out', 1)
|
inv:set_size('bucket_out', 1)
|
||||||
|
|
||||||
-- Fluid buffers
|
-- Water source block
|
||||||
meta:set_int('water_fluid_storage', 0)
|
|
||||||
meta:set_int('metal_fluid_storage', 0)
|
|
||||||
|
|
||||||
-- Metal source block
|
|
||||||
meta:set_string('metal_fluid', '')
|
|
||||||
meta:set_string('water_fluid', 'default:water_source')
|
meta:set_string('water_fluid', 'default:water_source')
|
||||||
|
|
||||||
-- Default infotext
|
-- Default infotext
|
||||||
|
@ -18,10 +18,14 @@ end
|
|||||||
local autofind = {"ingot", "lump", "crystal", "ore", "block"}
|
local autofind = {"ingot", "lump", "crystal", "ore", "block"}
|
||||||
local modfind = {"default", "technic", "moreores", "elepower_dynamics"}
|
local modfind = {"default", "technic", "moreores", "elepower_dynamics"}
|
||||||
|
|
||||||
for metal,_ in pairs(fluidity.molten_metals) do
|
function metal_melter.auto_detect_metal_forms(metal, mod)
|
||||||
for i,v in pairs(modfind) do
|
if mod then
|
||||||
for j,k in pairs(autofind) do
|
local modfind = { [0] = mod }
|
||||||
local name = v..":"..metal.."_"..k
|
end
|
||||||
|
|
||||||
|
for i, v in pairs(modfind) do
|
||||||
|
for j, k in pairs(autofind) do
|
||||||
|
local name = v .. ":" .. metal .. "_" .. k
|
||||||
|
|
||||||
if minetest.registered_items[name] then
|
if minetest.registered_items[name] then
|
||||||
metal_melter.register_melt(name, metal, k)
|
metal_melter.register_melt(name, metal, k)
|
||||||
@ -30,6 +34,10 @@ for metal,_ in pairs(fluidity.molten_metals) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for metal,_ in pairs(fluidity.molten_metals) do
|
||||||
|
metal_melter.auto_detect_metal_forms(metal)
|
||||||
|
end
|
||||||
|
|
||||||
-- Manually register default blocks, for now
|
-- Manually register default blocks, for now
|
||||||
metal_melter.register_melt("default:mese", "mese", "block")
|
metal_melter.register_melt("default:mese", "mese", "block")
|
||||||
metal_melter.register_melt("default:obsidian", "obsidian", "block")
|
metal_melter.register_melt("default:obsidian", "obsidian", "block")
|
||||||
|
@ -178,7 +178,8 @@ local function melter_node_timer(pos, elapsed)
|
|||||||
-- Handle input bucket, only allow a molten metal
|
-- Handle input bucket, only allow a molten metal
|
||||||
local bucket_in = inv:get_stack("bucket_in", 1)
|
local bucket_in = inv:get_stack("bucket_in", 1)
|
||||||
local bucket_name = bucket_in:get_name()
|
local bucket_name = bucket_in:get_name()
|
||||||
if (bucket_name:find("bucket") and bucket_name ~= "bucket:bucket_empty") or (not fluidity.florbs.get_is_empty_florb(bucket_in) and fluidity.florbs.get_is_florb(bucket_in)) then
|
if (bucket_name:find("bucket") and bucket_name ~= "bucket:bucket_empty") or (not fluidity.florbs.get_is_empty_florb(bucket_in) and
|
||||||
|
fluidity.florbs.get_is_florb(bucket_in)) then
|
||||||
local is_florb = fluidity.florbs.get_is_florb(bucket_in)
|
local is_florb = fluidity.florbs.get_is_florb(bucket_in)
|
||||||
if is_florb then
|
if is_florb then
|
||||||
local contents, fluid_name, capacity = fluidity.florbs.get_florb_contents(bucket_in)
|
local contents, fluid_name, capacity = fluidity.florbs.get_florb_contents(bucket_in)
|
||||||
@ -328,13 +329,8 @@ local function on_construct(pos)
|
|||||||
inv:set_size('bucket_in', 1)
|
inv:set_size('bucket_in', 1)
|
||||||
inv:set_size('bucket_out', 1)
|
inv:set_size('bucket_out', 1)
|
||||||
|
|
||||||
-- Fluid buffers
|
-- Lava source block
|
||||||
meta:set_int('lava_fluid_storage', 0)
|
meta:set_string('lava_fluid', 'default:lava_source')
|
||||||
meta:set_int('metal_fluid_storage', 0)
|
|
||||||
|
|
||||||
-- Metal source block
|
|
||||||
meta:set_string('metal_fluid', '')
|
|
||||||
meta:set_string('lava_fluid', 'default:lava_source')
|
|
||||||
|
|
||||||
-- Default infotext
|
-- Default infotext
|
||||||
meta:set_string("infotext", "Metal Melter Inactive")
|
meta:set_string("infotext", "Metal Melter Inactive")
|
||||||
|
Loading…
Reference in New Issue
Block a user