aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_base.h
AgeCommit message (Collapse)Author
2021-12-18Restructure devtest's unittests and run them in CI (#11859)sfan5
2021-09-10Clean up/improve some scriptapi error handling codesfan5
2021-08-28Async-related script cleanupssfan5
2020-04-27script: Put getGuiEngine() inside a client-only #ifdefsfan5
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-03-29Fix a warning reported by clangLoic Blot
minetest/src/script/cpp_api/s_player.h:27:1: warning: struct 'PlayerHPChangeReason' was previously declared as a class [-Wmismatched-tags] struct PlayerHPChangeReason;
2018-03-28Add reasons to on_dieplayer and on_hpchangeAndrew Ward
2018-01-21Change include from "cmake_config.h" to "config.h"Wayward One
Fixes #6894
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-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-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-08-16Cleanup various headers to reduce compilation times (#6255)Loïc Blot
* Cleanup various headers to reduce compilation times
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-06-11Remove threads.h and replace its definitions with their C++11 equivalents ↵ShadowNinja
(#5957) This also changes threadProc's signature, since C++11 supports arbitrary thread function signatures.
2017-06-10C++11 patchset 6: forbid object copy using assigment/copy function deleters ↵Loïc Blot
(#5945) C++11 implement function deleting, it's generally used to prevent some object copy In script API use this function removal on ScriptApiBase instead of ScriptApiClient/Server/MainMenu, this affect all ScriptApis Move DISABLE_CLASS_COPY with constructor, the deleted function permit to replace function in its original place
2017-06-06Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot
* Fix event LINT & remove default constructor/destructors * remove compat code & modernize autolock header
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-03-07Add minetest.register_lbm() to run code on block load onlyest31
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-23Clean up threadingShadowNinja
* 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.
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-05-16Add mod securityShadowNinja
Due to compatibility concerns, this is temporarily disabled.
2014-10-07Fix object reference pushing functions when called from coroutinesShadowNinja
2014-04-27Only push the Lua error handler onceShadowNinja
2013-11-15Pass a errfunc to lua_pcall to get a tracebackShadowNinja
2013-09-15Always use builtin JThread librarykwolekr
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-06-27Add LuaVoxelManipkwolekr
2013-05-25Move scriptapi to separate folder (by sapier)sapier
On the lua side, notably minetest.env:<function>(<args>) should now be replaced by minetest.<function>(<args>). The old way is and will stay supported for a long time. Also: Update and clean up lua_api.txt (by celeron55) Move EnvRef to lua and remove add_rat and add_firefly (by kahrl) Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)