diff --git a/README.md b/README.md index 802ba84..9e55157 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Fun Caves started as an attempt to convert the mapgen V6 caves into a lua mod, so they could be used with any mapgen. However, I've since turned it into an all cave environment, with no surface at all. -Players spawn into a massive cave, hopefully in an area with mushrooms, and start digging. Dig up, dig down, dig sideways, you'll never find a surface world -- no trees, no flowers, not cows and horses. What you will find are fungi, algae, monsters, and lots and lots of goblins. Every ore is available, everywhere, which means there's a lot of it. +Players spawn into a massive cave, hopefully in an area with mushrooms, and start digging. Dig up, dig down, dig sideways, you'll never find a surface world -- no trees, no flowers, no cows and horses. What you will find are fungi, algae, monsters, and lots and lots of goblins. Every ore is available, everywhere, which means there's a lot of it. Hint: Find some giant mushrooms, first thing. They're handy. diff --git a/nodes.lua b/nodes.lua index 8c62153..4a57d4e 100644 --- a/nodes.lua +++ b/nodes.lua @@ -419,6 +419,24 @@ minetest.register_node("fun_caves:hot_cobble", { }), }) +minetest.register_abm({ + nodenames = {"group:hot"}, + interval = 2, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 0.95)) do + if not minetest.registered_nodes[node.name] then + return + end + local dps = minetest.registered_nodes[node.name]["damage_per_second"] + if object.set_hp and object.get_hp and dps then + --print("damage. "..object:get_hp().." hit points left") + object:set_hp(object:get_hp() - dps) + end + end + end}) + + -- mushroom growth minetest.register_abm({ nodenames = {"flowers:mushroom_brown", "flowers:mushroom_red"},