Add settings for water flow probabilities too

master
FaceDeer 2017-01-27 20:47:22 -07:00
parent 572329cfc6
commit 230b4dda5d
2 changed files with 40 additions and 11 deletions

View File

@ -80,11 +80,22 @@ river_water = river_water or river_water == nil -- default true
local lava = minetest.setting_getbool("dynamic_liquid_lava")
lava = lava or lava == nil -- default true
local water_probability = tonumber(minetest.setting_get("dynamic_liquid_water_flow_propability"))
if water_probability == nil then
water_probability = 1
end
local river_water_probability = tonumber(minetest.setting_get("dynamic_liquid_river_water_flow_propability"))
if river_water_probability == nil then
river_water_probability = 1
end
local lava_probability = tonumber(minetest.setting_get("dynamic_liquid_lava_flow_propability"))
if lava_probability == nil then
lava_probability = 5
end
local springs = minetest.setting_getbool("dynamic_liquid_springs")
springs = springs or springs == nil -- default true
@ -114,10 +125,10 @@ if lava then
dynamic_liquid.liquid_abm("default:lava_source", "default:lava_flowing", lava_probability)
end
if water then
dynamic_liquid.liquid_abm("default:water_source", "default:water_flowing", 1)
dynamic_liquid.liquid_abm("default:water_source", "default:water_flowing", water_probability)
end
if river_water then
dynamic_liquid.liquid_abm("default:river_water_source", "default:river_water_flowing", 1)
dynamic_liquid.liquid_abm("default:river_water_source", "default:river_water_flowing", river_water_probability)
end
-- register damp clay whether we're going to set the ABM or not, if the user disables this feature we don't want existing

View File

@ -1,18 +1,36 @@
#Makes water limited (it doesn't spawn new blocks any more) and causes it to flow dynamically
#Makes water limited (it doesn't spawn new source blocks any more) and causes
#water blocks to move dynamically
dynamic_liquid_water (Dynamic water) bool true
#Causes river water to flow dynamically
#Causes river water blocks to move dynamically
dynamic_liquid_river_water (Dynamic river water) bool true
#Causes lava to flow dynamically
#Causes lava blocks to move dynamically
dynamic_liquid_lava (Dynamic lava) bool true
#Sets the probability of the lava flow calculation per block per second.
#Causes natural clay deposits to act as water sources, seeping new water blocks
#into the space above them.
#Also adds a "spring" block to the creative inventory to serve as an infinite water
#source in creative mode.
dynamic_liquid_springs (Springs) bool true
[Flow Rates]
#Sets the probability of water flow per block per second.
#That is, if this is set to 5 then there's a 1/5 chance per second that a water block
#will check if it should move. Increase this value to make water flow slower.
#This value only has an effect if dynamic water is set to true
dynamic_liquid_water_flow_propability (Water flow probability) int 1 1 100
#Sets the probability of river water flow per block per second.
#That is, if this is set to 5 then there's a 1/5 chance per second that a river water
#block will check if it should move. Increase this value to make river water flow
#slower.
#This value only has an effect if dynamic river water is set to true
dynamic_liquid_river_water_flow_propability (River water flow probability) int 1 1 100
#Sets the probability of lava flow per block per second.
#That is, if this is set to 5 then there's a 1/5 chance per second that a lava block
#will check if it should move. Increase this value to make lava flow slower. Set it to
#1 to make lava flow as fast as water does.
#will check if it should move. Increase this value to make lava flow slower.
#This value only has an effect if dynamic lava is set to true
dynamic_liquid_lava_flow_propability (Lava flow probability) int 5 1 100
#Causes natural clay deposits to act as water sources, seeping water into the block above them
dynamic_liquid_springs (Clay springs) bool true