Bugfix: editor tools requiring right-clicking now work also when pointing a node (fixes #146)
This commit is contained in:
parent
ab008a3c3a
commit
2ec4de91da
@ -73,7 +73,6 @@ minetest.register_tool("arena_lib:players_change", {
|
||||
description = S("Change the current number"),
|
||||
inventory_image = "arenalib_tool_players_change.png",
|
||||
groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = "2"},
|
||||
on_place = function() end,
|
||||
on_drop = function() end,
|
||||
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
@ -82,6 +81,10 @@ minetest.register_tool("arena_lib:players_change", {
|
||||
|
||||
on_secondary_use = function(itemstack, placer, pointed_thing)
|
||||
change_players_number(placer, false)
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
change_players_number(user, false)
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -51,7 +51,6 @@ minetest.register_tool("arena_lib:spawner_remove", {
|
||||
description = S("Remove spawner"),
|
||||
inventory_image = "arenalib_tool_spawner_remove.png",
|
||||
groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = "2"},
|
||||
on_place = function() end,
|
||||
on_drop = function() end,
|
||||
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
@ -63,11 +62,13 @@ minetest.register_tool("arena_lib:spawner_remove", {
|
||||
arena_lib.set_spawner(user:get_player_name(), mod, arena_name, nil, "delete", spawner_ID, true)
|
||||
end,
|
||||
|
||||
|
||||
on_secondary_use = function(itemstack, placer, pointed_thing)
|
||||
change_spawner_ID(placer)
|
||||
end
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
change_spawner_ID(user)
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user