summaryrefslogtreecommitdiff
path: root/technic_worldgen
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2014-06-07 21:16:15 +0100
committerRealBadAngel <maciej.kasatkin@o2.pl>2014-06-21 01:19:26 +0200
commit23603e7f4119245227f4ec0d15a8ecb6a444c5cd (patch)
treee0cc44d1d52f5fe631a5e5cef33ed1e783cdaa2a /technic_worldgen
parentc2bc4e9d56ec1b88bcdd939c0d67fcc1fd1dde89 (diff)
Full glooptest support
To support the glooptest mod (successor of gloopores), define the gloopores lump->dust grinding recipes if either of the mods is available. (Formerly only "gloopores" was supported.) Define kalite dust item, which was previously missing. Make gloop ingots grindable to dust as the non-gloop ingots already are; incidentally refactor this to automatically make ingots grindable whenever the ingot can be made by cooking dust. Add textures for all the gloop dusts. Do the "Steel"->"Iron" renaming for glooptest-defined tools and items.
Diffstat (limited to 'technic_worldgen')
-rw-r--r--technic_worldgen/crafts.lua17
1 files changed, 15 insertions, 2 deletions
diff --git a/technic_worldgen/crafts.lua b/technic_worldgen/crafts.lua
index e2d5236..759d8ed 100644
--- a/technic_worldgen/crafts.lua
+++ b/technic_worldgen/crafts.lua
@@ -114,7 +114,7 @@ minetest.register_craft({
output = "technic:wrought_iron_ingot",
})
-local function for_each_registered_craftitem(action)
+local function for_each_registered_item(action)
local already_reg = {}
for k, _ in pairs(minetest.registered_items) do
table.insert(already_reg, k)
@@ -124,6 +124,16 @@ local function for_each_registered_craftitem(action)
really_register_craftitem(name, def)
action(string.gsub(name, "^:", ""))
end
+ local really_register_tool = minetest.register_tool
+ minetest.register_tool = function(name, def)
+ really_register_tool(name, def)
+ action(string.gsub(name, "^:", ""))
+ end
+ local really_register_node = minetest.register_node
+ minetest.register_node = function(name, def)
+ really_register_node(name, def)
+ action(string.gsub(name, "^:", ""))
+ end
for _, name in ipairs(already_reg) do
action(name)
end
@@ -137,6 +147,9 @@ for _, i in ipairs({
"default:sword_steel",
"doors:door_steel",
"farming:hoe_steel",
+ "glooptest:hammer_steel",
+ "glooptest:handsaw_steel",
+ "glooptest:reinforced_crystal_glass",
"mesecons_doors:op_door_steel",
"mesecons_doors:sig_door_steel",
"vessels:steel_bottle",
@@ -144,7 +157,7 @@ for _, i in ipairs({
steel_to_iron[i] = true
end
-for_each_registered_craftitem(function(item_name)
+for_each_registered_item(function(item_name)
local item_def = minetest.registered_items[item_name]
if steel_to_iron[item_name] and string.find(item_def.description, "Steel") then
minetest.override_item(item_name, { description = string.gsub(item_def.description, "Steel", S("Iron")) })