From 06132d01a8e4b29acffabc0aee2c1ed92eb978b2 Mon Sep 17 00:00:00 2001 From: bakawun Date: Mon, 11 Dec 2023 11:45:04 +0100 Subject: [PATCH] controls:android:fix bow/rocket/spyglass/burger_follow this requires the following minetest pr https://github.com/minetest/minetest/pull/14087 --- mods/MISC/android_compat/init.lua | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 mods/MISC/android_compat/init.lua diff --git a/mods/MISC/android_compat/init.lua b/mods/MISC/android_compat/init.lua new file mode 100755 index 000000000..ab8612355 --- /dev/null +++ b/mods/MISC/android_compat/init.lua @@ -0,0 +1,46 @@ +minetest.register_on_mods_loaded(function() + for name in pairs(minetest.registered_items) do + if name:find("bow") then + minetest.override_item(name, { + touch_controls = { + pointed_nothing = "short_dig_long_place", + pointed_node = "short_dig_long_place", + pointed_object = "short_dig_long_place", + }, + }) + end + end + for name in pairs(minetest.registered_items) do + if name:find("spyglass") then + minetest.override_item(name, { + touch_controls = { + pointed_nothing = "short_dig_long_place", + pointed_node = "short_dig_long_place", + pointed_object = "short_dig_long_place", + }, + }) + end + end +for name in pairs(minetest.registered_items) do + if name:find("rocket") then + minetest.override_item(name, { + touch_controls = { + pointed_nothing = "short_dig_long_place", + pointed_node = "short_dig_long_place", + pointed_object = "short_dig_long_place", + }, + }) + end + end +for name in pairs(minetest.registered_items) do + if name:find("hamburger") then + minetest.override_item(name, { + touch_controls = { + pointed_nothing = "short_dig_long_place", + pointed_node = "short_dig_long_place", + pointed_object = "short_dig_long_place", + }, + }) + end + end +end) \ No newline at end of file