From 6c46f8bf7e9f93b66d017d219a55ecacf42ecd8f Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Thu, 6 May 2021 18:00:40 -0700 Subject: [PATCH] Check that tnt is enabled --- tnt_function.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tnt_function.lua b/tnt_function.lua index 82de27e..c52009e 100644 --- a/tnt_function.lua +++ b/tnt_function.lua @@ -147,7 +147,11 @@ local function explode(pos, radius) local p = {} local c_air = minetest.get_content_id("air") - local c_tnt = minetest.get_content_id("tnt:tnt") + local c_tnt = nil + if minetest.settings:get_bool("enable_tnt", false) then + c_tnt = minetest.get_content_id("tnt:tnt") + end + local c_tnt_burning = minetest.get_content_id("tnt:tnt_burning") local c_gunpowder = minetest.get_content_id("tnt:gunpowder") local c_gunpowder_burning = minetest.get_content_id("tnt:gunpowder_burning")