From 8ab8bf2ed9db2f64cfc445896e788a739448a7b6 Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Thu, 10 Oct 2024 09:21:08 -0700 Subject: [PATCH] use locals --- worldeditadditions_tools/items/cloudwand.lua | 2 +- worldeditadditions_tools/items/farwand.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/worldeditadditions_tools/items/cloudwand.lua b/worldeditadditions_tools/items/cloudwand.lua index 4df41a9..9182de4 100644 --- a/worldeditadditions_tools/items/cloudwand.lua +++ b/worldeditadditions_tools/items/cloudwand.lua @@ -17,7 +17,7 @@ wea_t.register_tool("cloudwand", { on_use = function(itemstack, player, pointed_thing) local name = player:get_player_name() -- print("[farwand] on_use", name) - local looking_pos, node_id = worldeditadditions_tools.do_raycast(player) + local looking_pos, node_id = wea_t.do_raycast(player) wea.selection.add_point(name, looking_pos) -- Left click when pointing at something or nothing end, diff --git a/worldeditadditions_tools/items/farwand.lua b/worldeditadditions_tools/items/farwand.lua index 4411491..1b174eb 100644 --- a/worldeditadditions_tools/items/farwand.lua +++ b/worldeditadditions_tools/items/farwand.lua @@ -32,14 +32,14 @@ wea_t.register_tool("farwand", { -- print("[farwand] on_place", name) -- Right click when pointing at something -- Pointed thing: https://rubenwardy.com/minetest_modding_book/lua_api.html#pointed_thing - local looking_pos, node_id = worldeditadditions_tools.do_raycast(player) + local looking_pos, node_id = wea_t.do_raycast(player) set_pos2(name, looking_pos) end, on_use = function(itemstack, player, pointed_thing) local name = player:get_player_name() -- print("[farwand] on_use", name) - local looking_pos, node_id = worldeditadditions_tools.do_raycast(player) + local looking_pos, node_id = wea_t.do_raycast(player) set_pos1(name, looking_pos) -- Left click when pointing at something or nothing end, @@ -49,7 +49,7 @@ wea_t.register_tool("farwand", { -- Right click when pointing at nothing -- print("[farwand] on_secondary_use", name) - local looking_pos, node_id = worldeditadditions_tools.do_raycast(player) + local looking_pos, node_id = wea_t.do_raycast(player) set_pos2(name, looking_pos) end })