mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-01 05:43:01 +00:00
use locals
This commit is contained in:
parent
d638a349a9
commit
8ab8bf2ed9
2 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ wea_t.register_tool("cloudwand", {
|
||||||
on_use = function(itemstack, player, pointed_thing)
|
on_use = function(itemstack, player, pointed_thing)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
-- print("[farwand] on_use", 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)
|
wea.selection.add_point(name, looking_pos)
|
||||||
-- Left click when pointing at something or nothing
|
-- Left click when pointing at something or nothing
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -32,14 +32,14 @@ wea_t.register_tool("farwand", {
|
||||||
-- print("[farwand] on_place", name)
|
-- print("[farwand] on_place", name)
|
||||||
-- Right click when pointing at something
|
-- Right click when pointing at something
|
||||||
-- Pointed thing: https://rubenwardy.com/minetest_modding_book/lua_api.html#pointed_thing
|
-- 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)
|
set_pos2(name, looking_pos)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_use = function(itemstack, player, pointed_thing)
|
on_use = function(itemstack, player, pointed_thing)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
-- print("[farwand] on_use", 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)
|
set_pos1(name, looking_pos)
|
||||||
-- Left click when pointing at something or nothing
|
-- Left click when pointing at something or nothing
|
||||||
end,
|
end,
|
||||||
|
@ -49,7 +49,7 @@ wea_t.register_tool("farwand", {
|
||||||
-- Right click when pointing at nothing
|
-- Right click when pointing at nothing
|
||||||
-- print("[farwand] on_secondary_use", name)
|
-- 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)
|
set_pos2(name, looking_pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue