Compare commits

...

7 Commits

Author SHA1 Message Date
Nathan Salapat f7aa7fcfc6 fix #2 2021-11-29 19:02:29 -06:00
Nathan Salapat 427a32245a Added license information 2021-08-16 21:17:51 -05:00
Nathan Salapat 4ab82862d8
Merge pull request #1 from guodman/merge-resolve
Resolved a merge conflict
2021-05-08 15:42:16 -05:00
Doug Reeves 719b7c1777 Resolved a merge conflict 2021-05-08 14:27:52 -05:00
Nathan Salapat 5b09b85c3e Added license information 2020-12-23 08:46:00 -06:00
Nathan Salapat f6636f9c13 Added spreading. 2020-09-12 16:01:18 -05:00
Nathan Salapat 35ca6e642c Update and code tidy. 2020-09-12 15:26:03 -05:00
2 changed files with 22 additions and 4 deletions

View File

@ -25,7 +25,7 @@ for i in ipairs(coral_color) do
description = Col..' Coral',
tiles = {'more_coral_coral_base.png^[multiply:'..hex..':100'},
groups = {cracky = 3, coral = 1},
drops = 'default:coral_skeleton',
drop = 'default:coral_skeleton',
sounds = default.node_sound_stone_defaults(),
})
@ -36,7 +36,7 @@ for i in ipairs(coral_color) do
})
end
minetest.register_abm({
minetest.register_abm({ --Coral dyes when exposed to air.
nodenames = {'group:coral'},
neighbors = {'air'},
interval = 17,
@ -47,6 +47,24 @@ minetest.register_abm({
end,
})
minetest.register_abm({ --Coral can spread, but very slowly.
nodenames = {'group:coral'},
neighbors = {'group:water'},
interval = 500,
chance = 25,
catch_up = false,
action = function(pos, node)
local posx = math.random(-1, 1)
local posy = math.random(-1, 1)
local posz = math.random(-1, 1)
local new_pos = {x=pos.x+posx, y=pos.y+posy, z=pos.z+posz}
local new_node = minetest.get_node(new_pos).name
if minetest.get_item_group(new_node, 'water') > 0 then
minetest.set_node(new_pos, {name = node.name})
end
end,
})
minetest.register_decoration({
name = "default:corals",
deco_type = "simple",

View File

@ -1,4 +1,4 @@
name = more_coral
depends = default, dye
license =
author = NathanSalapat
license = Code is licensed MIT, Media CC by SA 4.0
author = Nathan Salapat