mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 18:20:36 +01:00
[jumping] Change bounce values
- Use a table to store bounce values - Trampolines now absorb up to 95% of falling dammage
This commit is contained in:
parent
497fdfef65
commit
77fa21c256
@ -26,8 +26,10 @@ end
|
|||||||
|
|
||||||
local u = 6
|
local u = 6
|
||||||
|
|
||||||
|
local bounces = {90, 100, 110, 120, 130, 140}
|
||||||
|
|
||||||
for i = 1, u do
|
for i = 1, u do
|
||||||
local bnc_pct = math.ceil((150/u)*i)+25
|
local bnc_pct = bounces[i]
|
||||||
minetest.register_node("jumping:trampoline_" .. i, {
|
minetest.register_node("jumping:trampoline_" .. i, {
|
||||||
description = "Trampoline (bounce : " .. bnc_pct .. "%)",
|
description = "Trampoline (bounce : " .. bnc_pct .. "%)",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
@ -41,7 +43,7 @@ for i = 1, u do
|
|||||||
"jumping_trampoline_sides.png^jumping_trampoline_sides_overlay_" .. i .. ".png",
|
"jumping_trampoline_sides.png^jumping_trampoline_sides_overlay_" .. i .. ".png",
|
||||||
},
|
},
|
||||||
drop = "jumping:trampoline_1",
|
drop = "jumping:trampoline_1",
|
||||||
groups = {dig_immediate = 2, bouncy = bnc_pct, fall_damage_add_percent = -65, disable_jump = 1},
|
groups = {dig_immediate = 2, bouncy = bnc_pct, fall_damage_add_percent = -95},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user