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