aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Push error handler afresh each time lua_pcall is usedKahrl2015-08-2712-77/+171
| | | | | Fixes "double fault" / "error in error handling" messages (issue #1423) and instead shows a complete backtrace.
* Use numeric indices and raw table access with LUA_REGISTRYINDEXKahrl2015-08-273-10/+9
|
* Clean up threadingShadowNinja2015-08-234-65/+42
| | | | | | | | | | | | | | | | | | | | * Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
* SAPI: Track last executed mod and include in error messageskwolekr2015-08-128-23/+109
|
* Display Lua memory usage at the time of Out-of-Memory errorkwolekr2015-08-101-1/+1
| | | | Also misc. minor cleanups
* Improve Script CPP API diagnosticskwolekr2015-08-0511-86/+55
|
* Optional reconnect functionalityest312015-07-232-8/+13
| | | | | | Enable the server to request the client to reconnect. This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
* Fix code style from recent commits and add misc. optimizationskwolekr2015-07-022-19/+15
|
* Add Lua errors to error dialogrubenwardy2015-06-292-13/+13
|
* Add minetest.register_on_player_hpchangeTeTpaAka2015-06-132-0/+20
|
* dofile error reporting for syntax errorsest312015-06-121-1/+2
| | | | | According to doc, dofile() raises an error when parsing failed due to syntax errors. Fixes #2775
* Fix uninitialized variable errorest312015-06-021-0/+5
| | | | | If you run minetest with valgrind, you'll quickly notice uninitialized jump depend error messages that point to s_base.cpp:131. This commit fixes those.
* Fix Windows build, clean up included headersSmallJoker2015-05-221-1/+1
| | | | Also fix a startup error caused by s_security.cpp
* Replace instances of std::map<std::string, std::string> with StringMapkwolekr2015-05-196-25/+27
| | | | | | Also, clean up surrounding code style Replace by-value parameter passing with const refs when possible Fix post-increment of iterators
* Add mod securityShadowNinja2015-05-165-27/+708
| | | | Due to compatibility concerns, this is temporarily disabled.
* Add minetest.register_on_punchplayerBrandon2015-05-153-0/+30
|
* Clean up and tweak build systemShadowNinja2015-03-271-3/+2
| | | | | | | | | | | | | | | | * Combine client and server man pages. * Update unit test options and available databases in man page. * Add `--worldname` to man page. * Fix a bunch of places where `"Minetest"` was used directly instead of `PROJECT_NAME`. * Disable server build by default on all operating systems. * Make `ENABLE_FREETYPE` not fail if FreeType isn't found. * Enable LevelDB, Redis, and FreeType detection by default. * Remove the `VERSION_PATCH_ORIG` hack. * Add option to search for and use system JSONCPP. * Remove broken LuaJIT version detection. * Rename `DISABLE_LUAJIT` to `ENABLE_LUAJIT`. * Rename `minetest_*` variables in `version.{h,cpp}` to `g_*`. * Clean up style of CMake files.
* For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins2015-03-072-3/+3
| | | | NDEBUG is defined), replace those usages with persistent alternatives
* Performance fixes.onkrot2015-01-131-1/+1
|
* Expose mapgen parameters on scripting initkwolekr2014-12-292-33/+0
| | | | | Add minetest.get_mapgen_params() Deprecate minetest.register_on_mapgen_init()
* Expose mapgen chunksize in on_mapgen_init callbackskwolekr2014-12-141-7/+10
|
* Simplify loading of Android version of menuShadowNinja2014-11-201-0/+4
|
* Add meshnode drawtype.RealBadAngel2014-10-181-0/+1
|
* Fix object reference pushing functions when called from coroutinesShadowNinja2014-10-079-42/+39
|
* Add optional framed glasslike drawtypeBlockMen2014-10-021-0/+1
|
* Add firelike drawtypeTriBlade92014-09-211-0/+1
|
* Don't call a player event without having player to do a event forsapier2014-08-211-0/+3
|
* Fix over-poping and only push the core onceShadowNinja2014-05-301-8/+11
|
* Use "core" namespace internallyShadowNinja2014-05-089-78/+81
|
* Organize builtin into subdirectoriesShadowNinja2014-05-072-22/+12
|
* Fix heart + bubble bar size on different texture packssapier2014-05-072-0/+21
| | | | | | | Add DPI support for statbar Move heart+bubble bar to Lua HUD Add statbar size (based upon an idea by blue42u) Add support for customizing breath and statbar
* Fix code style of async APIShadowNinja2014-04-272-91/+109
|
* Remove dependency on marshal and many other async changesShadowNinja2014-04-273-0/+473
| | | | | | | | | | | | This makes a number of changes: * Remove the dependency on marshal by using string.dump and loadstring. * Use lua_tolstring rather than having Lua functions pass string lengths to C++. * Move lua_api/l_async_events.* to cpp_api/s_async.*, where it belongs. * Make AsyncWorkerThread a child of ScriptApiBase, this removes some duplicate functionality. * Don't wait for async threads to shut down. (Is this safe? Might result in corruption if the thread is writing to a file.) * Pop more unused items from the stack * Code style fixes * Other misc changes
* Only push the Lua error handler onceShadowNinja2014-04-279-279/+154
|
* Fix all warnings reported by clangSfan52014-04-151-1/+1
|
* Add more informative error messages for inventory and item method errorsShadowNinja2014-03-152-13/+38
|
* Remove lua_State parameter from LuaError::LuaErrorShadowNinja2014-03-154-14/+15
|
* Revert "Make sure we get a stacktrace for as many lua errors as possible"ShadowNinja2014-03-153-12/+12
| | | | | | | | This reverts commit 362ef5f6ced862daa4733034810d0b07e2ad5d89. Stack tracebacks couldn't be generated in LuaError::LuaError anyway and this caused a second, empty traceback in most cases. In cases where there wasn't annother traceback the stack had already unwound and the traceback was empty.
* Make sure we get a stacktrace for as many lua errors as possibleSfan52014-03-153-12/+12
|
* Pass arguments by referenceSelat2014-03-121-1/+1
|
* Correct misleading detached inventory error messageCiaran Gultnieks2014-03-091-1/+1
| | | | Looks like a bit of hasty copying and pasting from s_item.cpp.
* Make flag strings clear specified flag with 'no' prefixkwolekr2014-02-081-1/+2
| | | | | Remove flagmask field from set_mapgen_params table Add small bits of needed documentation
* Fix crash when a error occurs in a globalstep callbackShadowNinja2014-02-031-1/+6
|
* Pass pointed_thing to on_punch and minetest.register_on_punchnode callbacksShadowNinja2014-01-233-4/+5
|
* Log guilty node name when allow_metadata_inventory_move/put/take failsKahrl2013-12-181-15/+18
|
* Handle LuaErrors in Lua -> C++ calls on LuaJITShadowNinja2013-12-184-12/+23
|
* Add 'on_prejoinplayer' callbackkaeza2013-12-122-0/+19
|
* Cleanup jthread and fix win32 buildsapier2013-12-011-2/+0
|
* Pass a errfunc to lua_pcall to get a tracebackShadowNinja2013-11-159-281/+345
|
* Add a callback: minetest.register_on_craft(itemstack, player,Novatux2013-11-012-0/+57
| | | | | | old_craft_grid, craft_inv) and minetest.register_craft_predict(itemstack, player, old_craft_grid, craft_inv)