multiwand: don't call commpate_worldedit_get

....that is now handled transparently
since this is the only call to that function we've hidden it so it isn't exported from weac.pos

Finally, mark these functions as internal as they shouldn't be called except internally in pos.lua
This commit is contained in:
Starbeamrainbowlabs 2024-10-11 00:56:05 +01:00
parent bb0d92ec36
commit b57b3e85ee
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -34,7 +34,6 @@ wea_t.register_tool("multiwand", {
-- Right click when pointing at something
-- Pointed thing: https://rubenwardy.com/minetest_modding_book/lua_api.html#pointed_thing
local player_name = player:get_player_name()
wea_c.pos.compat_worldedit_get(player_name)
-- print("[farwand] on_place", player_name)
pop_pos(player_name)
end,
@ -42,7 +41,6 @@ wea_t.register_tool("multiwand", {
on_use = function(itemstack, player, pointed_thing)
-- Left click when pointing at something or nothing
local player_name = player:get_player_name()
wea_c.pos.compat_worldedit_get(player_name)
-- print("[farwand] on_use", player_name)
local looking_pos, node_id = wea_t.do_raycast(player)
push_pos(player_name, looking_pos)
@ -52,8 +50,6 @@ wea_t.register_tool("multiwand", {
-- Right click when pointing at nothing
local player_name = player:get_player_name()
-- print("[farwand] on_secondary_use", player_name)
wea_c.pos.compat_worldedit_get(player_name)
-- local looking_pos, node_id = do_raycast(player)
pop_pos(player_name)
end
})