diff options
Diffstat (limited to 'src/unittest/helpers/helper_moveaction.lua')
-rw-r--r-- | src/unittest/helpers/helper_moveaction.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/unittest/helpers/helper_moveaction.lua b/src/unittest/helpers/helper_moveaction.lua new file mode 100644 index 000000000..8cffe01b8 --- /dev/null +++ b/src/unittest/helpers/helper_moveaction.lua @@ -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) |