Ice or snow above sea level melts into river water
This commit is contained in:
parent
4a29cc936a
commit
4f3f8b2c3a
@ -14,6 +14,7 @@ Ethereal v7 Mapgen mod for Minetest
|
||||
- Tweaked biome plant and tree decorations
|
||||
- Fixed farming compatibility when using hoe on ethereal dirt
|
||||
- Dirt with dry grass turns into green grass when near water
|
||||
- Ice or snow above sea level melts into river water
|
||||
|
||||
### 1.18
|
||||
|
||||
|
2
init.lua
2
init.lua
@ -1,6 +1,6 @@
|
||||
--[[
|
||||
|
||||
Minetest Ethereal Mod 1.19 (22th November 2015)
|
||||
Minetest Ethereal Mod 1.19 (27th November 2015)
|
||||
|
||||
Created by ChinChow
|
||||
|
||||
|
15
water.lua
15
water.lua
@ -86,17 +86,24 @@ minetest.register_abm({
|
||||
interval = 5,
|
||||
chance = 4,
|
||||
catch_up = false,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
action = function(pos, node)
|
||||
|
||||
local water_node = "default:water"
|
||||
if pos.y > 2 then
|
||||
water_node = "default:river_water"
|
||||
end
|
||||
|
||||
if node.name == "default:ice"
|
||||
or node.name == "default:snowblock"
|
||||
or node.name == "ethereal:icebrick"
|
||||
or node.name == "ethereal:snowbrick" then
|
||||
minetest.set_node(pos, {name = "default:water_source"})
|
||||
minetest.set_node(pos, {name = water_node.."_source"})
|
||||
elseif node.name == "default:snow" then
|
||||
minetest.set_node(pos, {name = "default:water_flowing"})
|
||||
minetest.set_node(pos, {name = water_node.."_flowing"})
|
||||
elseif node.name == "default:dirt_with_snow" then
|
||||
minetest.set_node(pos, {name = "default:dirt_with_grass"})
|
||||
end
|
||||
|
||||
nodeupdate(pos)
|
||||
end,
|
||||
})
|
||||
@ -108,7 +115,7 @@ minetest.register_abm({
|
||||
interval = 15,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
action = function(pos, node)
|
||||
if node == "ethereal:dry_dirt" then
|
||||
minetest.set_node(pos, {name = "default:dirt"})
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user