aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_base.cpp
AgeCommit message (Collapse)Author
2022-12-15Use a Lua error handler that calls tostring (#11913)Jude Melton-Houghton
2022-10-18Implement vector and node conversion in Lua (#12609)Jude Melton-Houghton
Co-authored-by: sfan5 <sfan5@live.de>
2022-09-26Modify PUC Lua to wrap C++ exceptions (#12445)Jude Melton-Houghton
2022-09-06Code optimizations / refactor (#12704)Herman Semenov
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com> Co-authored-by: sfan5 <sfan5@live.de>
2022-03-29Store vector metatable in registryJude Melton-Houghton
2021-11-26Add Lua bitop library (#9847)Lejo
2021-08-28Async-related script cleanupssfan5
2020-06-07Fix Lua panic when error() message is not a stringPaul Ouellette
2020-04-11Drop content_sao.{cpp,h}Loic Blot
Move LuaEntitySAO to a new dedicated file Drop TestSAO (useless object) Drop the old static startup initialized SAO factory, which was pretty useless. This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
2020-04-11Move PlayerSAO to dedicated filesLoic Blot
2020-04-11Move serveractiveobject & unitsaoLoic Blot
Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h} Move UnitSAO class to dedicated files
2020-04-08Work around LuaJIT issues on aarch64 (#9614)sfan5
- Move the text segment below the 47-bit limit, needed for script_exception_wrapper which must be lightuserdata - Replace CUSTOM_RIDX_SCRIPTAPI with full userdata
2020-02-23Script API: Document ObjectRef handling in a commentsfan5
2019-11-09Load client mods into memory before execution.sfan5
Preperation for server-sent CSM which will eventually need this.
2019-09-14Load CSM environment after the restrictions are knownSmallJoker
Safety-guards for CSM callbacks to abort on a bad implementation Only run callbacks when the mods are loaded (and with it: builtin) Duplication checks inside constructors
2019-04-11Add node field to PlayerHPChangeReason table (#8368)Paul Ouellette
2019-03-12HPChange Reason: Fix push after free, and type being overwritten (#8359)rubenwardy
* HPChange Reason: Fix push after free, and type being overwritten Fixes #8227 and #8344
2018-11-28Move client-specific files to 'src/client' (#7902)Quentin Bazin
Update Android.mk Remove 'src/client' from include_directories
2018-07-22Add a MSVC / Windows compatible snprintf function (#7353)nOOb3167
Use sizeof where applicable for mt_snprintf
2018-06-30Modernize lua read (part 2 & 3): C++ templating assurance (#7410)Loïc Blot
* Modernize lua read (part 2 & 3): C++ templating assurance Implement the boolean reader Implement the string reader Also remove unused & unimplemented script_error_handler Add a reader with default value
2018-04-19Add online content repositoryrubenwardy
Replaces mods and texture pack tabs with a single content tab
2018-03-28Add reasons to on_dieplayer and on_hpchangeAndrew Ward
2018-02-08Move `setlocale` from Lua to C++.red-001
2018-01-22[CSM] Don't Load the package library (#6944)red-001
Already removed by a latter step in CSM init so this just saves on pointless work.
2018-01-04[CSM] Don't load the IO library. (#6087)red-001
* [CSM] Don't load the IO library. * Rename the function to match the Lua API function name and add a missing `const` * Add a comment to explain some strange code and fix the other issues pointed out by shadowninja.
2017-09-15ServerEnv: Clean up object lifecycle handling (#6414)sfan5
* ServerEnv: Clean up object lifecycle handling
2017-08-20Modernize source code: last part (#6285)Loïc Blot
* Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
2017-06-30Create a filesystem abstraction layer for CSM and only allow accessing files ↵red-001
that are scanned into it. (#5965) * Load client-side mods into memory before executing them. This removes the remaining filesystem access that client-sided mods had and it will hopefully make then more secure. * Lua Virtual filesystem: don't load the files into memory just scan the filenames into memory. * Fix the issues with backtrace * fix most of the issues * fix code style. * add a comment
2017-06-19C++11 cleanup on constructors (#6000)Vincent Glize
* C++11 cleanup on constructors dir script
2017-05-18Fix a warning pointed by GCC 7.1Loic Blot
lua_tonumber overflow in snprintf (12 bytes and only 10 can be written)
2017-04-29[CSM] Add event on_place_node API lua (#5548)Vincent Glize
* [CSM] Add event on_place_node API lua
2017-03-13[CSM] Client side moddingLoic Blot
* rename GameScripting to ServerScripting * Make getBuiltinLuaPath static serverside * Add on_shutdown callback * Add on_receiving_chat_message & on_sending_chat_message callbacks * ScriptApiBase: use IGameDef instead of Server This permits to share common attribute between client & server * Enable mod security in client side modding without conditions
2016-12-24Make minetest abort on lua panicRogier
Currently, lua does a regular exit() after a lua panic, which can make a problem hard to debug. Invoking FATAL_ERROR() instead will print some useful information, and abort() minetest, so that a debugger can be used to analyze the situation.
2016-01-23Fix C++11 compilabilityest31
Previous commits broke it... :(
2015-11-01Fix Lua scripting synchronizationkwolekr
For several years now, the lua script lock has been completely broken. This commit fixes the main issue (creation of a temporary rather than scoped object), and fixes a subsequent deadlock issue caused by nested script API calls by adding support for recursive mutexes.
2015-10-31Fix server crashing on Lua errorsShadowNinja
Previously, the server called FATAL_ERROR when a Lua error occured. This caused a (mostly useless) core dump. The server now simply throws an exception, which is caught and printed before exiting with a non-zero return value. This also fixes a number of instances where errors were logged multiple times.
2015-08-27Push error handler afresh each time lua_pcall is usedKahrl
Fixes "double fault" / "error in error handling" messages (issue #1423) and instead shows a complete backtrace.
2015-08-27Use numeric indices and raw table access with LUA_REGISTRYINDEXKahrl
2015-08-12SAPI: Track last executed mod and include in error messageskwolekr
2015-08-05Improve Script CPP API diagnosticskwolekr
2015-07-02Fix code style from recent commits and add misc. optimizationskwolekr
2015-06-29Add Lua errors to error dialogrubenwardy
2015-06-02Fix uninitialized variable errorest31
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.
2015-05-16Add mod securityShadowNinja
Due to compatibility concerns, this is temporarily disabled.
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2014-11-20Simplify loading of Android version of menuShadowNinja
2014-10-07Fix object reference pushing functions when called from coroutinesShadowNinja
2014-05-08Use "core" namespace internallyShadowNinja
2014-05-07Organize builtin into subdirectoriesShadowNinja
2014-04-27Only push the Lua error handler onceShadowNinja