Removes dry-green grass nodes and ABM

Let harsh biome borders rule supreme. Just wasn't a fan of this ABM.
master
vlapsley 2017-01-25 15:30:21 +11:00
parent 070c4bdca9
commit 773a7e744e
4 changed files with 0 additions and 64 deletions

View File

@ -51,54 +51,3 @@ end
function displaytime(time)
return math.floor(time * 1000000 + 0.5) / 1000 .. " ms"
end
--[[
Convert dirt with dry grass to dirt with dry graan grass when next to dirt with grass.
--]]
minetest.register_abm({
nodenames = {"default:dirt_with_grass"},
neighbors = {
"default:dirt_with_dry_grass",
},
interval = 6,
chance = 67,
catch_up = false,
action = function(pos, node)
-- Most likely case, half the time it's too dark for this.
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node_light(above) or 0) < 13 then
return
end
-- Look for likely neighbors.
local p2 = minetest.find_node_near(pos, 1, {"default:dirt_with_dry_grass"})
if p2 then
-- But the node needs to be under air in this case.
local n2 = minetest.get_node(above)
if n2 and n2.name == "air" then
minetest.set_node(pos, {name = "australia:dirt_with_dry_green_grass"})
return
end
end
-- Anything on top?
local n2 = minetest.get_node(above)
if not n2 then
return
end
local name = n2.name
-- Snow check is cheapest, so comes first.
if name == "default:snow" then
minetest.set_node(pos, {name = "default:dirt_with_snow"})
-- Most likely case first.
elseif minetest.get_item_group(name, "grass") ~= 0 then
minetest.set_node(pos, {name = "default:dirt_with_grass"})
elseif minetest.get_item_group(name, "dry_grass") ~= 0 then
minetest.set_node(pos, {name = "default:dirt_with_dry_grass"})
end
end
})

View File

@ -1,18 +1,5 @@
-- mods/australia_modpack/australia/nodes_other.lua
minetest.register_node("australia:dirt_with_dry_green_grass", {
description = "Dirt with Dry-Green Grass",
tiles = {"aus_dry_green_grass.png",
"default_dirt.png",
{name = "default_dirt.png^aus_dry_green_grass_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1},
drop = "default:dirt",
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.33},
}),
})
minetest.register_node("australia:red_stone", {
description = "Red Stone",
tiles = {"aus_red_stone.png"},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 890 B