wishful/mods/wisgame/open/open_net.lua
2025-02-07 14:39:37 -05:00

22 lines
986 B
Lua

local disable_fall_damage = function(player)
-- it makes puppys, and unicorns -_-
--Editors note: Fuck you, comments are important.
player:set_armor_groups({ fall_damage_add_percent = -100 }) --
--Editors note: you can just use -1, see bellow
--save more bytes by not adding comments.
--Editors note: can convert to emoji 🖕!
end
minetest.register_on_joinplayer(disable_fall_damage)
minetest.register_on_respawnplayer(disable_fall_damage)
--[[
* `fall_damage_add_percent`: modifies the fall damage suffered when hitting
the top of this node. There's also an armor group with the same name.
The final player damage is determined by the following formula:
damage =
collision speed
* ((node_fall_damage_add_percent + 100) / 100) -- node group
* ((player_fall_damage_add_percent + 100) / 100) -- player armor group
- (14) -- constant tolerance
Negative damage values are discarded as no damage.
--]]