diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-12-01 04:22:40 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-12-01 04:22:40 -0500 |
commit | 2922421f4a88e56a0a1c819f62bf2bc287835388 (patch) | |
tree | b6dafb3d00ef05778e456716c03544279c2978fa /moreblocks/stairsplus/init.lua | |
parent | 67d414d2f9aa5999e3f1755543a68455b4bb6d99 (diff) | |
download | dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.gz dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.bz2 dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.xz dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.zip |
Update several mods:
biome_lib, boost_cart, building_blocks, castle, homedecor, glooptest,
currency, roads, invsaw, maptools, mesecons, moreblocks, nixie_tubes,
pipeworks, signs_lib, technic, unified_inventory, unifiedbricks, worldedit,
xban2
Diffstat (limited to 'moreblocks/stairsplus/init.lua')
-rw-r--r-- | moreblocks/stairsplus/init.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/moreblocks/stairsplus/init.lua b/moreblocks/stairsplus/init.lua index 44f5972..1f2cefe 100644 --- a/moreblocks/stairsplus/init.lua +++ b/moreblocks/stairsplus/init.lua @@ -17,6 +17,21 @@ and minetest.setting_getbool("creative_mode") then stairsplus.expect_infinite_stacks = true end +function stairsplus.copytable(orig) + local orig_type = type(orig) + local copy + if orig_type == 'table' then + copy = {} + for orig_key, orig_value in next, orig, nil do + copy[stairsplus.copytable(orig_key)] = stairsplus.copytable(orig_value) + end + setmetatable(copy, stairsplus.copytable(getmetatable(orig))) + else + copy = orig + end + return copy +end + function stairsplus:prepare_groups(groups) local result = {} if groups then @@ -41,6 +56,21 @@ function stairsplus:register_all(modname, subname, recipeitem, fields) -- self:register_6dfacedir_conversion(modname, subname) -- Not needed as of Q3 2013, uncomment to fix old maps. end +function stairsplus:register_alias_all(modname_old, subname_old, modname_new, subname_new) + self:register_stair_alias(modname_old, subname_old, modname_new, subname_new) + self:register_slab_alias(modname_old, subname_old, modname_new, subname_new) + self:register_slope_alias(modname_old, subname_old, modname_new, subname_new) + self:register_panel_alias(modname_old, subname_old, modname_new, subname_new) + self:register_micro_alias(modname_old, subname_old, modname_new, subname_new) +end +function stairsplus:register_alias_force_all(modname_old, subname_old, modname_new, subname_new) + self:register_stair_alias_force(modname_old, subname_old, modname_new, subname_new) + self:register_slab_alias_force(modname_old, subname_old, modname_new, subname_new) + self:register_slope_alias_force(modname_old, subname_old, modname_new, subname_new) + self:register_panel_alias_force(modname_old, subname_old, modname_new, subname_new) + self:register_micro_alias_force(modname_old, subname_old, modname_new, subname_new) +end + function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light) stairsplus:register_all(modname, subname, recipeitem, { groups = groups, |