add falling leaf particles and setting
This commit is contained in:
parent
ab7a182302
commit
1e7e40fd0f
@ -56,6 +56,7 @@ Also those more as optional:
|
|||||||
| ethereal.lilywalk | Lilypads are walkable | bool | true |
|
| ethereal.lilywalk | Lilypads are walkable | bool | true |
|
||||||
| ethereal.xcraft | Enable X-Craft cheats | bool | true |
|
| ethereal.xcraft | Enable X-Craft cheats | bool | true |
|
||||||
| ethereal.flight | Enable Flight Potion | bool | true |
|
| ethereal.flight | Enable Flight Potion | bool | true |
|
||||||
|
| ethereal.leaf_particles | Enable falling lead particles | bool | true |
|
||||||
| ethereal.glacier | Glacier biome, 1=on / 0=off | int | 1 |
|
| ethereal.glacier | Glacier biome, 1=on / 0=off | int | 1 |
|
||||||
| ethereal.bambo | Bamboo biome, 1=on / 0=off | int | 1 |
|
| ethereal.bambo | Bamboo biome, 1=on / 0=off | int | 1 |
|
||||||
| ethereal.mesa | Mesa biome, 1=on / 0=off | int | 1 |
|
| ethereal.mesa | Mesa biome, 1=on / 0=off | int | 1 |
|
||||||
@ -104,6 +105,7 @@ who helped make this mod bigger and better throughout it's release :)
|
|||||||
- Tidy and tweak code to run on Minetest 5.1 and above
|
- Tidy and tweak code to run on Minetest 5.1 and above
|
||||||
- Replace 32px textures with 16px variants so items do not look mismatched
|
- Replace 32px textures with 16px variants so items do not look mismatched
|
||||||
- Add new biome layout so that specific biomes aren't too large or small
|
- Add new biome layout so that specific biomes aren't too large or small
|
||||||
|
- Add falling leaf particles with setting to disable
|
||||||
|
|
||||||
### 1.31
|
### 1.31
|
||||||
- Fix fishing biome checks
|
- Fix fishing biome checks
|
||||||
|
73
leaves.lua
73
leaves.lua
@ -602,3 +602,76 @@ decay({"ethereal:olive_trunk"}, {"ethereal:olive_leaves", "ethereal:olive"}, 3)
|
|||||||
|
|
||||||
decay({"ethereal:mushroom_trunk"}, {"ethereal:mushroom", "ethereal:mushroom_brown",
|
decay({"ethereal:mushroom_trunk"}, {"ethereal:mushroom", "ethereal:mushroom_brown",
|
||||||
"ethereal:mushroom_pore", "ethereal:lightstring"}, 4)
|
"ethereal:mushroom_pore", "ethereal:lightstring"}, 4)
|
||||||
|
|
||||||
|
if minetest.settings:get_bool("ethereal.leaf_particles") ~= false then
|
||||||
|
|
||||||
|
-- falling leaf effect
|
||||||
|
|
||||||
|
local leaf_list = {
|
||||||
|
{"ethereal:frost_leaves", "331b37", 9},
|
||||||
|
{"ethereal:bananaleaves", "28581e"},
|
||||||
|
{"ethereal:lemon_leaves", "507c1e"},
|
||||||
|
{"ethereal:olive_leaves", "416531"},
|
||||||
|
{"ethereal:orange_leaves", "1a3b1b"},
|
||||||
|
{"ethereal:redwood_leaves", "15342a"},
|
||||||
|
{"ethereal:sakura_leaves", "c281a9"},
|
||||||
|
{"ethereal:sakura_leaves2", "d4cbac"},
|
||||||
|
{"ethereal:willow_twig", "0b9445"},
|
||||||
|
{"ethereal:yellowleaves", "8b5f00", 9},
|
||||||
|
{"ethereal:birch_leaves", "274527"},
|
||||||
|
{"ethereal:palmleaves", "2b6000"},
|
||||||
|
{"ethereal:bamboo_leaves", "445811"},
|
||||||
|
{"default:acacia_leaves", "296600"},
|
||||||
|
{"default:aspen_leaves", "395d16"},
|
||||||
|
{"default:jungleleaves", "141e10"},
|
||||||
|
{"default:pine_needles", "00280e"},
|
||||||
|
{"default:leaves", "223a20"}
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
label = "Ethereal falling leaves",
|
||||||
|
nodenames = {"group:leaves"},
|
||||||
|
neighbors = {"air"},
|
||||||
|
interval = 7,
|
||||||
|
chance = 50,
|
||||||
|
catch_up = false,
|
||||||
|
|
||||||
|
action = function(pos, node)
|
||||||
|
|
||||||
|
local tex = "ethereal_falling_leaf.png"
|
||||||
|
local glow = nil
|
||||||
|
local can_fall = false
|
||||||
|
|
||||||
|
for n = 1, #leaf_list do
|
||||||
|
|
||||||
|
if node.name == leaf_list[n][1] then
|
||||||
|
tex = tex .. "^[multiply:#" .. leaf_list[n][2] .. "70"
|
||||||
|
glow = leaf_list[n][3]
|
||||||
|
can_fall = true ; break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if can_fall then
|
||||||
|
|
||||||
|
minetest.add_particlespawner({
|
||||||
|
amount = 2,
|
||||||
|
time = 2,
|
||||||
|
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
|
||||||
|
maxpos = {x = pos.x + 1, y = pos.y, z = pos.z + 1},
|
||||||
|
minvel = {x = -0.8, y = -1, z = -0.8},
|
||||||
|
maxvel = {x = 0.8, y = -3, z = 0.8},
|
||||||
|
minacc = {x = -0.1, y = -1, z = -0.1},
|
||||||
|
mixacc = {x = 0.2, y = -3, z = 0.2},
|
||||||
|
minexptime = 2,
|
||||||
|
maxexptime = 10,
|
||||||
|
minsize = 0.5,
|
||||||
|
maxsize = 1.5,
|
||||||
|
collisiondetection = false,
|
||||||
|
texture = tex,
|
||||||
|
vertical = true,
|
||||||
|
glow = glow
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
@ -37,6 +37,7 @@ ethereal.tundra (Tundra biome, 1 = Enable / 0 = Disable) int 1
|
|||||||
ethereal.mediterranean (Mediterranean biome, 1 = Enable / 0 = Disable) int 1
|
ethereal.mediterranean (Mediterranean biome, 1 = Enable / 0 = Disable) int 1
|
||||||
ethereal.logs (Tree log decor, 1 = Enable / 0 = Disable) int 1
|
ethereal.logs (Tree log decor, 1 = Enable / 0 = Disable) int 1
|
||||||
ethereal.wood_rotate (Enable directional placement of wood) bool true
|
ethereal.wood_rotate (Enable directional placement of wood) bool true
|
||||||
|
ethereal.leaf_particles (Enable falling leaf particles) bool true
|
||||||
|
|
||||||
ethereal.flightpotion_duration (Flight Potion Duration) int 300
|
ethereal.flightpotion_duration (Flight Potion Duration) int 300
|
||||||
|
|
||||||
|
BIN
textures/ethereal_falling_leaf.png
Normal file
BIN
textures/ethereal_falling_leaf.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 131 B |
Binary file not shown.
Before Width: | Height: | Size: 340 B |
Loading…
x
Reference in New Issue
Block a user