From 80ea7595b6c2f45f2036084ffb4095501abed685 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 20 Feb 2017 19:29:36 +0100 Subject: [PATCH] Make fire by lightning rare again --- mods/MISC/lightning/init.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/MISC/lightning/init.lua b/mods/MISC/lightning/init.lua index 99c8a7ee19..6f0901f4ac 100644 --- a/mods/MISC/lightning/init.lua +++ b/mods/MISC/lightning/init.lua @@ -150,8 +150,11 @@ lightning.strike = function(pos) pos2.y = pos2.y + 1/2 if minetest.get_item_group(minetest.get_node({x = pos2.x, y = pos2.y - 1, z = pos2.z}).name, "liquid") < 1 then if minetest.get_node(pos2).name == "air" then - -- cause a fire - minetest.set_node(pos2, {name = "mcl_fire:fire"}) + -- Rarely cause a fire + -- TODO: Always cause a fire, but the rain should put out fires then + if rng:next(1, 100) == 1 then + minetest.set_node(pos2, {name = "mcl_fire:fire"}) + end end end