Compare commits
7 Commits
d5bd56f7b3
...
f7aa7fcfc6
Author | SHA1 | Date |
---|---|---|
Nathan Salapat | f7aa7fcfc6 | |
Nathan Salapat | 427a32245a | |
Nathan Salapat | 4ab82862d8 | |
Doug Reeves | 719b7c1777 | |
Nathan Salapat | 5b09b85c3e | |
Nathan Salapat | f6636f9c13 | |
Nathan Salapat | 35ca6e642c |
22
init.lua
22
init.lua
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue