1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00

Add unittests for item movement code (#11885)

This commit is contained in:
savilli 2022-09-27 22:22:11 +02:00 committed by GitHub
parent 3f801bc096
commit 907dcdcf7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 382 additions and 81 deletions

View file

@ -0,0 +1,11 @@
minetest.register_allow_player_inventory_action(function(player, action, inventory, info)
if info.stack:get_name() == "default:water" then
return 0
end
if info.stack:get_name() == "default:lava" then
return 5
end
return info.stack:get_count()
end)