Add audio feedback for opening the map and editing markers
This commit is contained in:
parent
8642fbfa1b
commit
fa95a8705e
|
@ -15,6 +15,7 @@ minetest.register_chatcommand("map", {
|
|||
detail = MAXINT;
|
||||
end
|
||||
|
||||
minetest.sound_play("cartographer_open_map", { to_player=name }, true);
|
||||
minetest.show_formspec(name, "map", cartographer.get_map_formspec(data, player_x, player_z, 40, 40, detail));
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -85,6 +85,7 @@ minetest.register_on_player_receive_fields(function(player, name, fields)
|
|||
local player_x, player_z = cartographer.to_map_coordinates(map, pos.x, pos.z);
|
||||
cartographer.set_marker(map, player_x, player_z, marker);
|
||||
|
||||
minetest.sound_play("cartographer_write", { to_player=player:get_player_name() }, true);
|
||||
show_map_id_formspec(map.id, pos.x, pos.z, player:get_player_name(), data.page);
|
||||
elseif k == "prev_button" then
|
||||
show_map_id_formspec(map.id, pos.x, pos.z, player:get_player_name(), data.page - 1);
|
||||
|
@ -135,6 +136,7 @@ minetest.register_node("cartographer:map", {
|
|||
-- pos: The position of the node
|
||||
-- player: The player that right-clicked the node
|
||||
on_rightclick = function(pos, _, player)
|
||||
minetest.sound_play("cartographer_open_map", { to_player=name }, true);
|
||||
show_map_meta(minetest.get_meta(pos), player);
|
||||
end,
|
||||
|
||||
|
@ -143,6 +145,7 @@ minetest.register_node("cartographer:map", {
|
|||
-- stack: The itemstack
|
||||
-- player: The player that used the item
|
||||
on_use = function(stack, player)
|
||||
minetest.sound_play("cartographer_open_map", { to_player=name }, true);
|
||||
show_map_meta(stack:get_meta(), player);
|
||||
end,
|
||||
});
|
||||
|
|
BIN
sounds/cartographer_open_map.ogg
Normal file
BIN
sounds/cartographer_open_map.ogg
Normal file
Binary file not shown.
BIN
sounds/cartographer_write.0.ogg
Normal file
BIN
sounds/cartographer_write.0.ogg
Normal file
Binary file not shown.
BIN
sounds/cartographer_write.1.ogg
Normal file
BIN
sounds/cartographer_write.1.ogg
Normal file
Binary file not shown.
BIN
sounds/cartographer_write.2.ogg
Normal file
BIN
sounds/cartographer_write.2.ogg
Normal file
Binary file not shown.
BIN
sounds/cartographer_write.3.ogg
Normal file
BIN
sounds/cartographer_write.3.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user