summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_mainmenu.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-01-22 11:17:41 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-03-13 23:56:05 +0100
commit2c19d51409ca903021e0b508e5bc15299c4e51dc (patch)
tree8df932580abc289160aadbc40487099fd033c7d8 /src/script/lua_api/l_mainmenu.cpp
parentd7bc346981e189851e490f2417ed015a38bca79b (diff)
downloadminetest-2c19d51409ca903021e0b508e5bc15299c4e51dc.tar.gz
minetest-2c19d51409ca903021e0b508e5bc15299c4e51dc.tar.bz2
minetest-2c19d51409ca903021e0b508e5bc15299c4e51dc.zip
[CSM] sound_play & sound_stop support + client_lua_api doc (#5096)
* squashed: CSM: Implement register_globalstep * Re-use fatal error mechanism from server to disconnect client on CSM error * Little client functions cleanups * squashed: CSM: add core.after function * core.after is shared code between client & server * ModApiUtil get_us_time feature enabled for client
Diffstat (limited to 'src/script/lua_api/l_mainmenu.cpp')
-rw-r--r--src/script/lua_api/l_mainmenu.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp
index de8890b11..3d204db98 100644
--- a/src/script/lua_api/l_mainmenu.cpp
+++ b/src/script/lua_api/l_mainmenu.cpp
@@ -32,9 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "convert_json.h"
#include "serverlist.h"
#include "mapgen.h"
-#include "sound.h"
#include "settings.h"
-#include "log.h"
#include "EDriverTypes.h"
#include <IFileArchive.h>
@@ -963,33 +961,6 @@ int ModApiMainMenu::l_show_file_open_dialog(lua_State *L)
}
/******************************************************************************/
-int ModApiMainMenu::l_sound_play(lua_State *L)
-{
- GUIEngine* engine = getGuiEngine(L);
-
- SimpleSoundSpec spec;
- read_soundspec(L, 1, spec);
- bool looped = lua_toboolean(L, 2);
-
- u32 handle = engine->playSound(spec, looped);
-
- lua_pushinteger(L, handle);
-
- return 1;
-}
-
-/******************************************************************************/
-int ModApiMainMenu::l_sound_stop(lua_State *L)
-{
- GUIEngine* engine = getGuiEngine(L);
-
- u32 handle = luaL_checkinteger(L, 1);
- engine->stopSound(handle);
-
- return 1;
-}
-
-/******************************************************************************/
int ModApiMainMenu::l_download_file(lua_State *L)
{
const char *url = luaL_checkstring(L, 1);
@@ -1160,8 +1131,6 @@ void ModApiMainMenu::Initialize(lua_State *L, int top)
API_FCT(download_file);
API_FCT(get_modstore_details);
API_FCT(get_modstore_list);
- API_FCT(sound_play);
- API_FCT(sound_stop);
API_FCT(gettext);
API_FCT(get_video_drivers);
API_FCT(get_video_modes);