made all cobble, alternate cobble, and stone brick objects turn mossy

(e.g. stairs, slabs, etc etc as provided through moreblocks circular saw)
Slowed the related abms down to about a tenth of their original rate.
This commit is contained in:
Vanessa Ezekowitz 2013-06-07 17:51:43 -04:00
parent 165d7da10f
commit 277f6cbf1b

View File

@ -322,36 +322,64 @@ minetest.register_craftitem("gloopblocks:evil_stick", {
-- ABMs for mossy objects -- ABMs for mossy objects
minetest.register_abm({ local mossyobjects={
nodenames = {"default:cobble"}, { "default:cobble", "default:mossycobble" },
neighbors = {"default:water_source", "default:water_flowing"}, { "default:stair_cobble", "default:stair_mossycobble" },
interval = 30, { "default:slab_cobble", "default:slab_mossycobble" },
chance = 20, { "default:slab_cobbleupside_down", "default:slab_mossycobbleupside_down" },
action = function(pos) { "moreblocks:stair_cobble", "moreblocks:stair_mossycobble" },
minetest.env:add_node (pos, {name = "default:mossycobble"}) { "moreblocks:stair_cobble_inner", "moreblocks:stair_mossycobble_inner" },
end, { "moreblocks:stair_cobble_outer", "moreblocks:stair_mossycobble_outer" },
}) { "moreblocks:stair_cobble_half", "moreblocks:stair_mossycobble_half" },
{ "moreblocks:slab_cobble_quarter", "moreblocks:slab_mossycobble_quarter" },
{ "moreblocks:slab_cobble", "moreblocks:slab_mossycobble" },
{ "moreblocks:slab_cobble_three_quarter", "moreblocks:slab_mossycobble_three_quarter" },
{ "moreblocks:panel_cobble", "moreblocks:panel_mossycobble" },
{ "moreblocks:micro_cobble", "moreblocks:micro_mossycobble" },
{ "moreblocks:stair_cobble_alt", "moreblocks:stair_mossycobble_alt" },
minetest.register_abm({ { "gloopblocks:cobble_road", "gloopblocks:cobble_road_mossy" },
nodenames = {"gloopblocks:cobble_road"}, { "gloopblocks:stair_cobble_road", "gloopblocks:stair_cobble_road_mossy" },
neighbors = {"default:water_source", "default:water_flowing"}, { "gloopblocks:slab_cobble_road", "gloopblocks:slab_cobble_road_mossy" },
interval = 30, { "gloopblocks:stair_cobble_road", "gloopblocks:stair_cobble_road_mossy" },
chance = 20, { "gloopblocks:stair_cobble_road_inner", "gloopblocks:stair_cobble_road_mossy_inner" },
action = function(pos) { "gloopblocks:stair_cobble_road_outer", "gloopblocks:stair_cobble_road_mossy_outer" },
minetest.env:add_node (pos, {name = "gloopblocks:cobble_road_mossy"}) { "gloopblocks:stair_cobble_road_half", "gloopblocks:stair_cobble_road_mossy_half" },
{ "gloopblocks:slab_cobble_road_quarter", "gloopblocks:slab_cobble_road_mossy_quarter" },
{ "gloopblocks:slab_cobble_road", "gloopblocks:slab_cobble_road_mossy" },
{ "gloopblocks:slab_cobble_road_three_quarter", "gloopblocks:slab_cobble_road_mossy_three_quarter" },
{ "gloopblocks:panel_cobble_road", "gloopblocks:panel_cobble_road_mossy" },
{ "gloopblocks:micro_cobble_road", "gloopblocks:micro_cobble_road_mossy" },
{ "gloopblocks:stair_cobble_road_alt", "gloopblocks:stair_cobble_road_mossy_alt" },
end, { "default:stonebrick", "gloopblocks:stone_brick_mossy" },
}) { "default:stair_stonebrick", "gloopblocks:stair_stone_brick_mossy" },
{ "default:slab_stonebrick", "gloopblocks:slab_stone_brick_mossy" },
{ "default:slab_stonebrickupside_down", "gloopblocks:slab_stone_brick_mossyupside_down" },
{ "moreblocks:stair_stonebrick", "gloopblocks:stair_stone_brick_mossy" },
{ "moreblocks:stair_stonebrick_inner", "gloopblocks:stair_stone_brick_mossy_inner" },
{ "moreblocks:stair_stonebrick_outer", "gloopblocks:stair_stone_brick_mossy_outer" },
{ "moreblocks:stair_stonebrick_half", "gloopblocks:stair_stone_brick_mossy_half" },
{ "moreblocks:slab_stonebrick_quarter", "gloopblocks:slab_stone_brick_mossy_quarter" },
{ "moreblocks:slab_stonebrick", "gloopblocks:slab_stone_brick_mossy" },
{ "moreblocks:slab_stonebrick_three_quarter", "gloopblocks:slab_stone_brick_mossy_three_quarter" },
{ "moreblocks:panel_stonebrick", "gloopblocks:panel_stone_brick_mossy" },
{ "moreblocks:micro_stonebrick", "gloopblocks:micro_stone_brick_mossy" },
{ "moreblocks:stair_stonebrick_alt", "gloopblocks:stair_stone_brick_mossy_alt" },
}
minetest.register_abm({ for i in ipairs(mossyobjects) do
nodenames = {"default:stonebrick"}, minetest.register_abm({
neighbors = {"default:water_source", "default:water_flowing"}, nodenames = { mossyobjects[i][1] },
interval = 30, neighbors = {"default:water_source", "default:water_flowing"},
chance = 20, interval = 120,
action = function(pos) chance = 50,
minetest.env:add_node (pos, {name = "gloopblocks:stone_brick_mossy"}) action = function(pos)
end, fdir = minetest.env:get_node(pos).param2
}) minetest.env:add_node(pos, {name = mossyobjects[i][2], param2 = fdir})
end,
})
end
-- Hook into the default lavacooling function to generate basalt and pumice -- Hook into the default lavacooling function to generate basalt and pumice