From c44a881a7f3c9aeed717f69eb8682f05002bf372 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Fri, 7 Apr 2017 11:17:26 -0600 Subject: [PATCH] remove a deprecated API call --- README.txt | 2 +- init.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.txt b/README.txt index 6066e55..594b583 100644 --- a/README.txt +++ b/README.txt @@ -28,7 +28,7 @@ Other mods can mark blocks as flow-through by adding them to the "flow_through" Lava/Water Interaction ====================== -Due to the way default lava/water interaction works a single block of lava_source would be able to wander endlessly around on the surface of the ocean turning the uppermost layer of water into stone. Similarly, a single block of water_source could wander around on the surface of a lava pool turning the uppermost layer into obsidian. This is an undesireable outcome so the dynamic_liquid mod includes a more sophisticated replacement to the default lava-cooling ABM. +Due to the way default lava/water interaction works a single block of lava_source would be able to wander endlessly around on the surface of the ocean turning the uppermost layer of water into stone. Similarly, a single block of water_source could wander around on the surface of a lava pool turning the uppermost layer into obsidian. This is an undesirable outcome so the dynamic_liquid mod includes a more sophisticated replacement to the default lava-cooling ABM. lava_flowing nodes are now eliminated entirely by nodes marked cools_lava, they do not leave behind default:stone. This means that infinite stone generation is no longer possible using arrangements of lava and water. diff --git a/init.lua b/init.lua index 6b70320..fec68ec 100644 --- a/init.lua +++ b/init.lua @@ -3,6 +3,8 @@ dynamic_liquid = {} -- global table to expose liquid_abm for other mods' usage dynamic_liquid.registered_liquids = {} -- used by the flow-through node abm dynamic_liquid.registered_liquid_neighbors = {} +local water_level = tonumber(minetest.get_mapgen_setting("water_level")) + -- internationalization boilerplate local MP = minetest.get_modpath(minetest.get_current_modname()) local S, NS = dofile(MP.."/intllib.lua") @@ -257,7 +259,6 @@ local data = {} if springs then local c_clay = minetest.get_content_id("default:clay") local c_spring_clay = minetest.get_content_id("dynamic_liquid:clay") - local water_level = minetest.get_mapgen_params().water_level -- Turn mapgen clay into spring clay minetest.register_on_generated(function(minp, maxp, seed) @@ -339,7 +340,6 @@ mapgen_prefill = mapgen_prefill or mapgen_prefill == nil -- default true if mapgen_prefill then local c_water = minetest.get_content_id("default:water_source") local c_air = minetest.get_content_id("air") - local water_level = minetest.get_mapgen_params().water_level minetest.register_on_generated(function(minp, maxp, seed) if minp.y >= water_level then