Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Wrong overload of function push() got called when pushing a cEntity*. (#4512) | Max Luchterhand | 2020-03-21 | 1 | -0/+10 |
| | | | | | | | * Now having two funcs, Push(cEntity* ..) and Push(const cEntity* ...). For now, the const function just casts away the const qualifier and passes to the other. Co-authored-by: mluchterhand <mluchterhand@max.de> | ||||
* | Add a formatting function for Vector3 (#4282) | peterbell10 | 2018-09-24 | 1 | -3/+2 |
| | | | | | | | | | | * Vector3: Add custom fmt compatible formatter. * cLuaState: Add fmt version of ApiParamError * Use vector formatting in manual bindings * Always log vectors with FLOG | ||||
* | CheckBasicStyle: Check number of empty lines between functions (#4267) | peterbell10 | 2018-07-26 | 1 | -2/+1 |
| | | | | Add check for number of empty lines between functions and fix the corresponding failures | ||||
* | Prefer static_cast to reinterpret_cast (#4223) | peterbell10 | 2018-05-02 | 1 | -3/+3 |
| | | | | | | | * Change reinterpret_cast -> static_cast wherever possible * Remove more unnecessary `const_cast`s. reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there. | ||||
* | Deal with covered switches consistently (#4161) | peterbell10 | 2018-02-05 | 1 | -0/+1 |
| | | | | | | | * Fixes a number of "<function>: not all control paths return a value" warnings on MSVC. * Introduces the UNREACHABLE global macro and uses it instead of conditionally compiled switch defaults. * Move cNBTParseErrorCategory from FastNBT.h into FastNBT.cpp to prevent bad calls to message() | ||||
* | Add the fmt library (#4065) | peterbell10 | 2018-01-03 | 1 | -18/+3 |
| | | | | | | | * Replaces AppendVPrintf with fmt::sprintf * fmt::ArgList now used as a type safe alternative to varargs. * Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu. * Adds FLOG functions to log with fmt's native formatting style. | ||||
* | cLuaState: Update `Push` for entities. (#4128) | peterbell10 | 2018-01-03 | 1 | -47/+35 |
| | | | | | | | Fixes #4127 Some classes were exported but were only pushed as a cEntity meaning exported functions were inaccessible. This brings cLuaState::Push(cEntity *) up to date with all exported entities. | ||||
* | Fixed Clang 5.0 compile errors (#4085) | bibo38 | 2017-12-21 | 1 | -0/+8 |
| | | | | | | | | | | | | * Fixed Clang 5.0 compile errors * Fixed wrong comment * Only disable warnings in Clang 5 or higher * Added a CMake condition for the Clang 5 no-zero-as-null-pointer-constant warning * Now using the use_nullptr branch of the Cuberite specific SQLiteCpp fork | ||||
* | Replace ItemCallbacks with lambdas (#3993) | peterbell10 | 2017-09-11 | 1 | -2/+2 |
| | |||||
* | Revert "Replace ItemCallbacks with lambdas (#3948)" | LogicParrot | 2017-09-02 | 1 | -1/+1 |
| | | | | This reverts commit 496c337cdfa593654018c171f6a74c28272265b5. | ||||
* | Replace ItemCallbacks with lambdas (#3948) | peterbell10 | 2017-09-01 | 1 | -1/+1 |
| | |||||
* | Add cUUID class (#3871) | peterbell10 | 2017-08-25 | 1 | -0/+76 |
| | |||||
* | Fully implemented leashes (#3798) | Pablo Beltrán | 2017-08-21 | 1 | -0/+1 |
| | |||||
* | Represent cItem::m_Lore as an AStringVector (#3882) | peterbell10 | 2017-08-18 | 1 | -0/+31 |
| | | | | | | | | * Replace cItem::m_Lore with AStringVector * Reword deprecation warning * Fix lua bindings | ||||
* | Add cLuaWindow OnClicked Callback (#3901) | Lane Kolbly | 2017-08-17 | 1 | -0/+11 |
| | |||||
* | Moved ApiParamError into cLuaState. | Mattes D | 2017-06-26 | 1 | -1/+67 |
| | |||||
* | cBlockArea supports block entities. (#3795) | Mattes D | 2017-06-24 | 1 | -0/+24 |
| | |||||
* | Fixed handling Lua errors in nested callbacks (#3755) | Mattes D | 2017-06-09 | 1 | -2/+6 |
| | |||||
* | Fixed Lua bindings for const objects. | Mattes D | 2017-05-09 | 1 | -92/+4 |
| | |||||
* | DeadlockDetect now lists some tracked CS's stats. | Mattes D | 2017-01-18 | 1 | -0/+19 |
| | |||||
* | LuaState: Fixed untracking references. | Mattes D | 2017-01-15 | 1 | -5/+7 |
| | | | | One thread may untrack a ref while another thread was closing the LuaState, which had emptied the tracked refs. | ||||
* | Fixed race conditions and forgotten clear in Lua ref tracking. (#3530) | Mattes D | 2017-01-13 | 1 | -4/+7 |
| | | | This fixes occasional crashes on plugin reload. | ||||
* | LuaState: Fixed race condition in ref tracking. (#3529) | Mattes D | 2017-01-09 | 1 | -15/+67 |
| | |||||
* | LuaState: Fixed stack balance when calling functions (#3428) | Mattes D | 2016-11-10 | 1 | -6/+28 |
| | |||||
* | cUrlClient: Exported to Lua API. | Mattes D | 2016-08-23 | 1 | -0/+11 |
| | |||||
* | cLuaState: Moved function param counting to PushCallPop() template. | Mattes D | 2016-08-22 | 1 | -27/+0 |
| | | | | The Push() functions can be used not only for function params, but also returns or temporaries, so it doesn't make sense to count the params there. | ||||
* | cLuaState: Added direct support for pushing a nil constant. | Mattes D | 2016-08-22 | 1 | -12/+13 |
| | |||||
* | cLuaState: Added support for optional params and AStringMap values. | Mattes D | 2016-08-22 | 1 | -0/+76 |
| | |||||
* | Fixed cWorld:ChunkStay bindings. (#3319) | Mattes D | 2016-08-14 | 1 | -12/+110 |
| | | | | | | Introduced new cLuaState::cOptionalCallback for representing optional callbacks (nil from Lua side). Introduced new cLuaState::cStackTable class for easy access to Lua table's elements. Fixes #3305. | ||||
* | Converted cLuaState::cTableRef to use cTrackedRef. | Mattes D | 2016-08-13 | 1 | -33/+128 |
| | | | | This makes the table-based callbacks resistent to LuaState unloads and safer to use. | ||||
* | Removed debug log message. | Mattes D | 2016-08-11 | 1 | -1/+0 |
| | | | | Ref.: #3308 | ||||
* | Fixed LuaAPI library registrations. (#3308) | Mattes D | 2016-08-11 | 1 | -1/+18 |
| | | | | lsqlite3 didn't clean up the stack properly. lxp didn't register itself properly. | ||||
* | Fixed RasPi builds of unit tests. | Mattes D | 2016-08-04 | 1 | -14/+14 |
| | | | | | On RasPi with gcc 4.8.2, the asserts wouldn't compile when tests were enabled. Enforced the assumption that ASSERT code is generated only in Debug builds. | ||||
* | Converted cLuaState::cCallbackPtr into a UniquePtr. | Mattes D | 2016-06-27 | 1 | -0/+13 |
| | |||||
* | Removed dead code related to callbacks. | Mattes D | 2016-06-27 | 1 | -2/+2 |
| | |||||
* | cPluginManager: Use a callback for command handler registration. | Mattes D | 2016-06-27 | 1 | -0/+4 |
| | |||||
* | LuaState: Implemented proper locking for cCallback. | Mattes D | 2016-06-27 | 1 | -12/+46 |
| | |||||
* | Changed cLuaWindow callbacks to use cLuaState::cCallback. | Mattes D | 2016-06-27 | 1 | -13/+57 |
| | |||||
* | Changed plugin hook registrations to use cLuaState::cCallback. | Mattes D | 2016-06-27 | 1 | -9/+28 |
| | |||||
* | Added cLuaState::cCallback for representing (resettable) Lua callbacks. | Mattes D | 2016-06-27 | 1 | -4/+145 |
| | |||||
* | Bindings: Add a const-ptr variant to all stack getter functions | Mattes D | 2016-06-05 | 1 | -0/+1 |
| | |||||
* | LuaState: Inter-plugin calls now support simple tables. (#3220) | Mattes D | 2016-05-31 | 1 | -52/+126 |
| | |||||
* | Revert "Lua callback" | Mattes D | 2016-03-21 | 1 | -212/+8 |
| | |||||
* | Changed cLuaWindow callbacks to use cLuaState::cCallback. | Mattes D | 2016-03-17 | 1 | -14/+58 |
| | |||||
* | Changed plugin hook registrations to use cLuaState::cCallback. | Mattes D | 2016-03-17 | 1 | -9/+28 |
| | |||||
* | Added cLuaState::cCallback for representing (resettable) Lua callbacks. | Mattes D | 2016-03-17 | 1 | -4/+145 |
| | |||||
* | Bulk clearing of whitespace | LogicParrot | 2016-02-05 | 1 | -51/+51 |
| | |||||
* | Added a Json parser and serializer to Lua API. | Mattes D | 2015-12-24 | 1 | -0/+2 |
| | |||||
* | Fixes for clang-3.7 | Lukas Pioch | 2015-12-19 | 1 | -1/+1 |
| | |||||
* | Revised the explosion-related Lua API and docs. | Mattes D | 2015-12-18 | 1 | -33/+33 |
| | | | | Fixes #2746. | ||||
* | Added PieceStructures generator. | Mattes D | 2015-12-01 | 1 | -2/+74 |
| | |||||
* | Added LuaState tracker and memory stats logging. | Mattes D | 2015-09-28 | 1 | -0/+72 |
| | |||||
* | Made Lua API check strings strictly. | Mattes D | 2015-09-28 | 1 | -1/+4 |
| | | | | Previously nil was accepted as a string in cLuaState::CheckParamString(), now it's reported as an error. | ||||
* | Extended and fixed the cFile API. | Mattes D | 2015-09-26 | 1 | -0/+12 |
| | |||||
* | Maked it compileable for clang-3.7 | Lukas Pioch | 2015-09-25 | 1 | -3/+3 |
| | |||||
* | Use container-based infrastructure for Travis | Tiger Wang | 2015-08-20 | 1 | -1/+1 |
| | |||||
* | Silenced and fixed many warning messages across multiple files. | Samuel Barney | 2015-07-29 | 1 | -12/+24 |
| | |||||
* | Added basic support for loading village prefabs from files. | Mattes D | 2015-06-20 | 1 | -1/+5 |
| | |||||
* | LuaState: Added support for config-style usage. | Mattes D | 2015-06-17 | 1 | -10/+73 |
| | | | | | Globals and table values can be queried from the Lua state easily. Use perfect forwarding. | ||||
* | Added LuaState support for all integral types | tycho | 2015-05-19 | 1 | -32/+19 |
| | | | | All so added error handling for out of range values | ||||
* | Lua: Break into ZBS debugger on API errors. | Mattes D | 2015-05-16 | 1 | -0/+26 |
| | |||||
* | Moved cWorld manual bindings out into a separate file. | Mattes D | 2015-05-13 | 1 | -1/+1 |
| | |||||
* | ToLua now generates cLuaState::Push() and GetStackValue() | Mattes D | 2015-05-12 | 1 | -371/+6 |
| | | | | | For classes exported through ToLua it generates the cLuaState::Push() and cLuaState::GetStackValue() functions, as well as the supporting forward declarations and typedefs. Renamed virtual_method_hooks.lua to BindingsProcessor.lua since it no longer provides virtual method hooks and instead does additional processing when generating the bindings. | ||||
* | OnExecuteCommand hook can override the command result (crXXX). | Mattes D | 2015-05-10 | 1 | -0/+12 |
| | |||||
* | Merge remote-tracking branch 'origin/master' into warnings | Tiger Wang | 2015-05-10 | 1 | -2/+2 |
|\ | | | | | | | | | | | Conflicts: src/Mobs/Monster.cpp src/Vector3.h | ||||
| * | More style checking. | Mattes D | 2015-05-09 | 1 | -2/+2 |
| | | | | | | | | Spaces around some operators are checked. | ||||
* | | Fixed some Visual Studio warnings | Tiger Wang | 2015-05-09 | 1 | -3/+15 |
|/ | |||||
* | Fixed inter-plugin calls. | Mattes D | 2015-05-07 | 1 | -9/+4 |
| | | | | | When an inter-plugin call failed due to function not found, the server would maul the LuaState and "yield". Fixes #1959. | ||||
* | Added support for additional data in the ParticleEffect Packet | tycho | 2015-05-07 | 1 | -0/+41 |
| | | | | Also started refactoring how broadcasts are handled | ||||
* | Added cBlockArea:GetNonAirCropRelCoords() API function. | Mattes D | 2015-04-29 | 1 | -1/+31 |
| | | | | Fixes #1915. | ||||
* | Refactored ManualBindings' callbacks using templates. | Mattes D | 2015-04-23 | 1 | -0/+18 |
| | | | | | This is a bit easier to read, has better error reporting and fixes a few subtle bugs. Fixes #1889. | ||||
* | Implemented cPluginManager:DoWithPlugin(), fixed ForEachPlugin(). | Mattes D | 2015-04-23 | 1 | -19/+89 |
| | | | | Both functions are exported as static. | ||||
* | cNetwork: Added UDP API. | Mattes D | 2015-02-20 | 1 | -0/+12 |
| | |||||
* | LuaAPI: Added client TLS support for TCP links. | Mattes D | 2015-02-12 | 1 | -0/+12 |
| | |||||
* | Exported cServerHandle and cNetwork:Listen to Lua. | Mattes D | 2015-02-04 | 1 | -0/+33 |
| | | | | Also added an example to the NetworkTest plugin. | ||||
* | cNetwork: Exported the Connect() method and cTCPLink class to Lua. | Mattes D | 2015-02-04 | 1 | -0/+12 |
| | |||||
* | Fixed type-conversion warnings. | Mattes D | 2015-01-18 | 1 | -1/+1 |
| | |||||
* | Initial convertion of a_Dt to std::chrono | Tycho | 2015-01-11 | 1 | -0/+7 |
| | | | | also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay | ||||
* | En masse NULL -> nullptr replace | Tiger Wang | 2014-10-23 | 1 | -27/+27 |
| | |||||
* | LuaState: Projectiles are pushed using their full class. | Mattes D | 2014-10-22 | 1 | -1/+1 |
| | |||||
* | cLuaState: cEntity is pushed with specific type. | Mattes D | 2014-10-21 | 1 | -7/+48 |
| | |||||
* | Fixed a potential crash in cEntity bindings. | Mattes D | 2014-10-20 | 1 | -2/+6 |
| | |||||
* | cLuaState: cMonster descendants don't push their specific type. | Mattes D | 2014-10-19 | 1 | -1/+10 |
| | | | | The individual mob types aren't exported to Lua, so pushing them would crash the server. | ||||
* | cLuaState: cBlockEntity descendants are pushed with proper class type. | Mattes D | 2014-10-19 | 1 | -1/+1 |
| | |||||
* | LuaState: Pushing a cEntity pushes the correct class name. | Mattes D | 2014-10-19 | 1 | -1/+3 |
| | | | | This makes Lua scripts easier, as they don't need to cast values from cEntity to the specific descendant. | ||||
* | Fixed crash in ForEachEntityInBox API. | madmaxoft | 2014-10-06 | 1 | -3/+11 |
| | | | | Fixes #1511. | ||||
* | LuaState: Fixed class value-getting off the stack. | madmaxoft | 2014-09-03 | 1 | -4/+4 |
| | |||||
* | Added cWorld::ForEachEntityInBox() | madmaxoft | 2014-09-03 | 1 | -0/+26 |
| | |||||
* | cLuaState: Fixed Vector3<> names pushed to Lua. | Mattes D | 2014-08-22 | 1 | -5/+41 |
| | |||||
* | Fixed style: spaces after commas. | madmaxoft | 2014-07-19 | 1 | -2/+1 |
| | |||||
* | Normalized comments. | madmaxoft | 2014-07-17 | 1 | -2/+2 |
| | | | | | This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign. | ||||
* | Changed OnWeatherChanging hook to always read the returned weather. | madmaxoft | 2014-07-03 | 1 | -0/+12 |
| | | | | Ref.: http://forum.mc-server.org/showthread.php?tid=1512 | ||||
* | Fixed OnProjectileHitBlock bindings. | madmaxoft | 2014-06-03 | 1 | -61/+86 |
| | | | | Also sorted the various cLuaState::Push() functions. | ||||
* | Merge branch 'MacFixes' | Tycho | 2014-04-02 | 1 | -0/+1 |
|\ | | | | | | | | | | | Conflicts: src/DeadlockDetect.cpp src/World.cpp | ||||
| * | More fixes to get it to compile for me on Mac 10.9. Mostly just newline additions, but some of the unused variables were causing errors, so I wrapped them in #ifndef __APPLE__ calls, since I didn't know if they were going to be used in the future. | Samuel Barney | 2014-03-25 | 1 | -0/+1 |
| | | | | | | | | Also had to undefine TOLUA_TEMPLATE_BIND a couple of times. | ||||
* | | Fixed error when the hook gets called. | STRWarrior | 2014-03-29 | 1 | -0/+12 |
|/ | |||||
* | Made pushing plain pointer to Lua a valid operation, with a warning. | madmaxoft | 2014-03-20 | 1 | -2/+3 |
| | | | | This is used for exotic explosions, and the NORETURNDEBUG macro caused MSVC warnings across the entire cLuaState class (MSVC marked ALL Push() function overloads as non-returning) | ||||
* | Errors in Lua don't include the error handler in the stack trace. | madmaxoft | 2014-03-19 | 1 | -5/+5 |
| | | | | Fixes #817. | ||||
* | Merge branch 'Werror' into warnings | Tycho | 2014-03-12 | 1 | -5/+9 |
|\ | | | | | | | | | Conflicts: src/Globals.h | ||||
| * | Fixed Lua string return values. | madmaxoft | 2014-03-12 | 1 | -4/+0 |
| | | | | | | | | Fixes #773. | ||||
| * | Moved Lua API registering into a separate function. | madmaxoft | 2014-03-12 | 1 | -1/+9 |
| | | | | | | | | This will allow us to use Lua as lite-config files as well, should we want to. | ||||
* | | Fixed a load of format string errors | Tycho | 2014-03-11 | 1 | -1/+3 |
|/ | |||||
* | Fixed warnings | Tycho | 2014-03-07 | 1 | -0/+1 |
| | |||||
* | cLuaState: Made public the GetStackValue() functions. | madmaxoft | 2014-03-04 | 1 | -6/+12 |
| | |||||
* | Manually exported g_Block tables | andrew | 2014-03-02 | 1 | -0/+2 |
| | |||||
* | Attempted fix for several GCC warnings. | madmaxoft | 2014-02-26 | 1 | -0/+7 |
| | |||||
* | Add Lua plugin path to package.path and .cpath. | madmaxoft | 2014-02-17 | 1 | -0/+26 |
| | | | | Fixes #693. | ||||
* | Added cLuaState::CheckParamFunctionOrNil(). | madmaxoft | 2014-02-11 | 1 | -2/+34 |
| | | | | Also fixed error reporting for the two function-checking functions. | ||||
* | Fixed nested plugin function calls. | madmaxoft | 2014-02-11 | 1 | -6/+9 |
| | |||||
* | cLuaState: Stack traces don't include ghost 0-th element. | madmaxoft | 2014-02-10 | 1 | -1/+1 |
| | |||||
* | cLuaState::cRef can be unbound and re-bound. | madmaxoft | 2014-02-09 | 1 | -7/+45 |
| | | | | This will allow us to store Lua references as member variables in classes and initialize those later than in the constructor. | ||||
* | Removed a useless check in cLuaState. | madmaxoft | 2014-02-04 | 1 | -3/+1 |
| | |||||
* | Fixed calling plugins with userdata params. | madmaxoft | 2014-02-04 | 1 | -0/+1 |
| | |||||
* | Removed a leftover debug message. | madmaxoft | 2014-02-04 | 1 | -1/+0 |
| | |||||
* | Fixed error handling in cPluginManager:CallPlugin() API. | madmaxoft | 2014-02-04 | 1 | -2/+5 |
| | | | | Fixed: When the called function malfunctioned, the entire plugin's call was aborted. | ||||
* | Improved error resistance in cPluginManager:CallPlugin(). | madmaxoft | 2014-02-04 | 1 | -0/+8 |
| | | | | Fixed: If the call failed, all the next plugin calls would fail as well. | ||||
* | Lua: Fixed an error in table-functions callbacks. | madmaxoft | 2014-01-29 | 1 | -1/+5 |
| | |||||
* | Implemented cPluginManager:CallPlugin() API. | madmaxoft | 2014-01-21 | 1 | -16/+183 |
| | | | | This function supersedes cPlugin:Call(), is safer to use in regards to multithreading and once again removes the need for the cPlugin class being exported at all. | ||||
* | cLuaState can now check function params. | madmaxoft | 2014-01-19 | 1 | -0/+34 |
| | |||||
* | cCreeper is no longer available in API. | madmaxoft | 2014-01-13 | 1 | -12/+0 |
| | | | | Has been replaced by cMonster. | ||||
* | Lua errors display stack trace. | madmaxoft | 2014-01-11 | 1 | -3/+25 |
| | | | | Fixes #418. | ||||
* | Removed internal methods from public cLuaState interface. | madmaxoft | 2014-01-11 | 1 | -9/+17 |
| | | | | | | | PushFunction(), CallFunction() and GetReturn() are not to be called independently, but rather only by using the Call() templated overrides. Push() needs to be left in the public part, it is used for pushing results in the ManualBindings. Preparation for #418. | ||||
* | LuaState can push strings with embedded NULs. | madmaxoft | 2014-01-07 | 1 | -1/+1 |
| | | | | This also marginally improves performance, since a strlen() isn't called (inside lua_pushstring()), the string length is stored in the AString object directly. | ||||
* | implemented the recommendations Xoft gave. | STRWarrior | 2013-12-31 | 1 | -0/+12 |
| | |||||
* | Made cmake compilation possible on Windows. | madmaxoft | 2013-12-27 | 1 | -2/+2 |
| | |||||
* | Fixed tolua++ compilation. | madmaxoft | 2013-12-08 | 1 | -1/+1 |
| | | | | Duplicate files, wrong includes, const-incorrect code... | ||||
* | Moved bindings-related to a Bindings subfolder. | madmaxoft | 2013-12-08 | 1 | -0/+1024 |
Ref.: #407 |