mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Minimal: Fix HP change crash (#7344)
This commit is contained in:
@@ -27,6 +27,10 @@ local function run_hpchangereason_tests(player)
|
||||
assert(expect == nil)
|
||||
end
|
||||
minetest.register_on_player_hpchange(function(player, hp, reason)
|
||||
if not expect then
|
||||
return
|
||||
end
|
||||
|
||||
for key, value in pairs(reason) do
|
||||
assert(expect[key] == value)
|
||||
end
|
||||
|
Reference in New Issue
Block a user