diff --git a/init.lua b/init.lua index 128409d..c2a766e 100644 --- a/init.lua +++ b/init.lua @@ -57,6 +57,7 @@ techage.modified_recipes_enabled = minetest.settings:get_bool("techage_modified_ techage.collider_min_depth = tonumber(minetest.settings:get("techage_collider_min_depth")) or -28 techage.recipe_checker_enabled = minetest.settings:get_bool("techage_recipe_checker_enabled") ~= false techage.stair_aliases_enabled = minetest.settings:get_bool("techage_stair_aliases_enabled") ~= false +techage.disable_lava_above_sea_level = minetest.settings:get_bool("techage_disable_lava_above_sea_level") ~= false -- allow to load marshal and sqlite3 techage.IE = minetest.request_insecure_environment() diff --git a/iron_age/recipes.lua b/iron_age/recipes.lua index 4169811..deac7ee 100644 --- a/iron_age/recipes.lua +++ b/iron_age/recipes.lua @@ -3,7 +3,7 @@ TechAge ======= - Copyright (C) 2019 Joachim Stolberg + Copyright (C) 2019-2025 Joachim Stolberg AGPL v3 See LICENSE.txt for more information @@ -118,13 +118,16 @@ local function register_liquid(source, flowing, itemname, inventory_image, name, end -------------------------------- Start Modification --- minetest.set_node(lpos, {name = source}) - if source == "default:lava_source" and lpos.y > 0 and not minetest.is_singleplayer() then - minetest.chat_send_player(user:get_player_name(), S("[Bucket] Lava can only be placed below sea level!")) - return + if techage.disable_lava_above_sea_level then + if source == "default:lava_source" and lpos.y > 0 and not minetest.is_singleplayer() then + minetest.chat_send_player(user:get_player_name(), S("[Bucket] Lava can only be placed below sea level!")) + return + else + -- see "basis/lib.lua" techage.is_ocean(pos) + minetest.set_node(lpos, {name = source, param2 = 1}) + end else - -- see "basis/lib.lua" techage.is_ocean(pos) - minetest.set_node(lpos, {name = source, param2 = 1}) + minetest.set_node(lpos, {name = source, param2 = 1}) end -------------------------------- End Modification return ItemStack("bucket:bucket_empty") diff --git a/settingtypes.txt b/settingtypes.txt index a118e13..1ee3153 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -40,4 +40,7 @@ techage_expoint_rate_in_min (average waiting time for one expoint) int 40 techage_recipe_checker_enabled (test techage recipes) bool false # Enables stair aliases (to prevent unknown nodes) -techage_stair_aliases_enabled (Enable stair aliases) bool false \ No newline at end of file +techage_stair_aliases_enabled (Enable stair aliases) bool false + +# Disable lava above sea level (to prevent griefing) +techage_disable_lava_above_sea_level (Disable lava above sea level) bool true