From 92ae6296d56c9da20edd6f887b020859c70e5ece Mon Sep 17 00:00:00 2001 From: Kimapr Date: Wed, 8 Jan 2020 22:23:36 +0500 Subject: [PATCH] fix inability to make water, add a way to make metal crystals, lux and hard stone --- nc_sky_inject/init.lua | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/nc_sky_inject/init.lua b/nc_sky_inject/init.lua index 3fce85f..b2eee31 100644 --- a/nc_sky_inject/init.lua +++ b/nc_sky_inject/init.lua @@ -23,4 +23,23 @@ nodecore.register_craft({ } }) -nodecore.register_cook_abm({nodenames = {"nc_terrain:cobble"}, neighbors = {"group:flame"}}) \ No newline at end of file +nodecore.register_cook_abm({nodenames = {"nc_terrain:cobble"}, neighbors = {"group:flame"}}) + +nodecore.register_limited_abm({ + label = "aggregate insta-cooking", + interval = 1, + chance = 1, + nodenames = {"nc_concrete:wet_source"}, + neighbors = {"group:lava"}, + action = function(pos,node) + local nnode + if math.random() > (1/10) then + nnode = {name = "nc_terrain:hard_stone_1"} + else + local t = {"nc_crystal:ore","nc_lux:stone"} + nnode = {name=t[math.random(1,#t)]} + end + minetest.set_node(pos,nnode) + nodecore.node_sound(pos,"place") + end +})