Fri Feb 8 23:05:19 EET 2019 Maintenance commit

This commit is contained in:
Evert Prants 2019-02-08 23:05:19 +02:00
parent 4052114460
commit 613c80d7e2
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
9 changed files with 43 additions and 34 deletions

View File

@ -9,7 +9,7 @@ An in-development mod for [Minetest](http://minetest.net) 0.5.0+ that adds molte
Just do `git clone https://gitlab.icynet.eu/evert/melterns.git` in your `minetest/mods` directory. You can also [download the repository](https://gitlab.icynet.eu/evert/melterns/archive/master.zip) but in that case you **must** change the folder name from `melterns-master` to `melterns`!
## Documentation
Documentation on how to use this mod can be found on [this wiki page](https://gitlab.icynet.eu/evert/melterns/wiki). I recommend using a mod that shows you crafting recipes in order to know how to craft the nodes.
Documentation on how to use this mod can be found on [this wiki page](https://gitlab.icynet.eu/evert/melterns/wikis/home). I recommend using a mod that shows you crafting recipes in order to know how to craft the nodes.
## License
The MIT License

View File

@ -1,4 +1,3 @@
name = fluidity
description = Adds Molten versions of commonly occuring metals. Supports default, technic, elepower and moreores.
depends = default,fluid_lib,bucket
optional_depends = technic,moreores

View File

@ -219,7 +219,7 @@ local function caster_node_timer(pos, elapsed)
local metal_type = ""
local dumping = meta:get_int("dump")
if dumping and dumping == 1 then
if dumping == 1 then
metal.amount = 0
metal.fluid = ""
refresh = true

View File

@ -34,10 +34,6 @@ function metal_melter.auto_detect_metal_forms(metal, mod)
end
end
for metal,_ in pairs(fluidity.molten_metals) do
metal_melter.auto_detect_metal_forms(metal)
end
-- Manually register default blocks, for now
metal_melter.register_melt("default:mese", "mese", "block")
metal_melter.register_melt("default:obsidian", "obsidian", "block")
@ -48,3 +44,10 @@ metal_melter.register_melt("default:tinblock", "tin", "block")
-- Special snowflake
metal_melter.register_melt("default:iron_lump", "steel", "lump")
-- Register melts after all mods have loaded
minetest.register_on_mods_loaded(function ()
for metal,_ in pairs(fluidity.molten_metals) do
metal_melter.auto_detect_metal_forms(metal)
end
end)

View File

@ -16,7 +16,7 @@ metal_melter.spec = {
block = 1296,
lump = 288,
cast = 288,
ore = 288
ore = 288,
}
local function in_table(t, n)
@ -163,7 +163,7 @@ local function melter_node_timer(pos, elapsed)
local metal = fluid_lib.get_buffer_data(pos, "metal")
local dumping = meta:get_int("dump")
if dumping and dumping == 1 then
if dumping == 1 then
metal.amount = 0
metal.fluid = ""
refresh = true
@ -499,6 +499,6 @@ fluid_lib.register_node("metal_melter:metal_melter")
fluid_lib.register_node("metal_melter:metal_melter_filled")
-- Set a spec
function metal_melter.set_spec(specname, value)
function metal_melter.register_melt_value(specname, value)
metal_melter.spec[specname] = value
end

View File

@ -1,4 +1,4 @@
name = metal_melter
description = Melt and cast metals.
depends = default,fluidity,bucket,fluid_tanks
optional_depends = pipeworks,elepower_dynamics
optional_depends = pipeworks

View File

@ -283,7 +283,9 @@ tinkering.modifiers = {
diamond = {name = "Diamond", default = "default:diamond", modifier = modifiers.diamond}
}
if minetest.get_modpath("technic") then
-- Add mod-based materials
minetest.register_on_mods_loaded(function ()
if minetest.get_modpath("technic") then
-- From technic
tinkering.materials["lead"] = {name = "Lead", default = "technic:lead_ingot",
color = "#C6C6C6", base = "ingot", cast = true, modifier = modifiers.lead}
@ -293,13 +295,14 @@ if minetest.get_modpath("technic") then
tinkering.materials["zinc"] = {name = "Zinc", default = "technic:zinc_ingot",
color = "#CEE8EF", base = "ingot", cast = true, modifier = modifiers.zinc}
end
end
if minetest.get_modpath("elepower_dynamics") then
if minetest.get_modpath("elepower_dynamics") then
-- From elepower
tinkering.materials["lead"] = {name = "Lead", default = "elepower_dynamics:lead_ingot",
color = "#C6C6C6", base = "ingot", cast = true, modifier = modifiers.lead}
tinkering.materials["zinc"] = {name = "Zinc", default = "elepower_dynamics:zinc_ingot",
color = "#CEE8EF", base = "ingot", cast = true, modifier = modifiers.zinc}
end
end
end)

View File

@ -1,4 +1,4 @@
name = tinkering
description = Combine materials to create tools
depends = metal_melter
optional_depends = unified_inventory,technic,moreores
optional_depends = unified_inventory

View File

@ -74,7 +74,7 @@ tinkering.components = {
function tinkering.create_material_component(data)
local desc = data.description
local name = data.name
local mod = data.mod_name
local mod = data.mod_name or minetest.get_current_modname()
local groups = {tinker_component = 1}
groups["tc_"..data.component] = 1
@ -107,6 +107,10 @@ end
--}
--
function tinkering.register_tool_type(name, data)
if not data.mod then
data.mod = minetest.get_current_modname()
end
tinkering.tools[name] = data
end
@ -388,7 +392,7 @@ function tinkering.register_component(name, data)
local comp_desc = data.description:sub(4)
-- Register cast
metal_melter.set_spec(name, metal_caster.spec.cast)
metal_melter.register_melt_value(name, metal_caster.spec.cast)
metal_caster.register_cast(name, {
description = comp_desc,
mod_name = mod,