summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-05-16Avoid a copy when logging lua stringsPeter Bell1-18/+15
2020-05-16Update logging code to reduce unnecessary string copying:Peter Bell1-4/+5
* Write into a single fmt::memory_buffer * Use string_view instead of AString for listener callbacks * Also collapsed vFLOG and vLOG functions into one per formatting type
2020-05-15Enable some more clang-tidy linter checks (#4738)peterbell101-4/+4
* Avoid inefficient AString -> c_str() -> AString round trip * Avoid redundant string init expressions * Avoid unnecessary return, continue, etc. * Add .clang-format to help with clang-tidy fix-its * Avoid unnecessary passing by value * Avoid unnecessary local copying * Avoid copying in range-for loops * Avoid over-complicated boolean expressions * Some violations missed by my local clang-tidy * Allow unnecessary continue statements * Add brackets * Another expression missed locally * Move BindingsProcessor call into clang-tidy.sh and add space * Fix pushd not found error * Different grouping of CheckBlockInteractionRate
2020-05-08Use Vector3 for cLineBlockTracer and cBlockTracer (#4715)mBornand1-51/+167
* cLineBlockTracer uses Vector
2020-05-05Update fmt to 6.2.0 (#4718)peterbell101-2/+2
* Update fmt to 6.2.0
2020-04-15Fixed Lua Vector unification. (#4652)Mattes D1-5/+5
2020-04-14Bindings: Allow coercion between Vector3 subtypes. (#4646)Mattes D1-45/+33
In manually bound functions, allows one to use any Vector3<T> value, as well as a {x, y, z} table, in Lua as any Vector3<T> parameter. Has example in Debuggers' /vector command. Unfortunately doesn't work in auto-bindings.
2020-03-31Prevent player from being destroyed by plugins (#4584)Alexander Harkness1-0/+32
* Prevent player from being destroyed by plugins Add manual binding, bails out with error message if attempted entity to destroy is player. * Improve warnings and documentation, remove automatic binding * Remove old and unnecessary deprecated function
2019-09-29Refactored more of Entities and BlockEntities to use Vector3. (#4403)Mattes D1-7/+6
2019-08-10Improved CMake generator (#4365)Mattes D1-1/+1
2019-08-09Removed coord-based API from cCuboid. (#4362)Mattes D1-0/+134
2018-07-26CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell101-1/+1
Add check for number of empty lines between functions and fix the corresponding failures
2018-05-02Prefer static_cast to reinterpret_cast (#4223)peterbell101-26/+26
* 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.
2018-01-14Rename cEntity swim states (#3996)Alexander Harkness1-4/+52
* Replace cEntity:m_IsSubmerged with m_IsHeadInWater * Replace cEntity:m_IsSwimming with m_IsInWater * Add API documentation for new symbols * Apply SetSwimState to all entities, not just mobs and players * Pickups now use IsOnFire to check if they are on fire before destruction Fixes #3987
2018-01-03Add the fmt library (#4065)peterbell101-5/+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.
2017-12-21Fixed Clang 5.0 compile errors (#4085)bibo381-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
2017-09-19Removed UTF-8 BOM (#4033)Lukas Pioch1-1/+1
2017-09-11Replace ItemCallbacks with lambdas (#3993)peterbell101-48/+20
2017-09-02Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot1-20/+48
This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
2017-09-01Replace ItemCallbacks with lambdas (#3948)peterbell101-48/+20
2017-08-30Update mbedtls to 2.5.1 (#3964)peterbell101-7/+7
* Renaming changes: * macro prefix "POLARSSL" -> "MBEDTLS" * functions now prefixed with "mbedtls_" * rename PolarSSL++ -> mbedTLS++ * rename polarssl submodule * Use mbedtls' AES-CFB8 implementation. * Add cSslConfig to wrap mbedtls_ssl_config * Update cTCPLink and cBlockingSslClientSocket to use cSslConfig * Use cSslConfig in cHTTPServer * Use cSslConfig for cMojangAPI::SecureRequest * CI Fixes * Set -fomit-frame-pointer on the right target
2017-08-28Cleanup Vector3 constructors and Abspeterbell101-4/+4
2017-08-27Implement Forge protocol handshake support (#3869)satoshinm1-0/+59
2017-08-25Add cUUID class (#3871)peterbell101-31/+254
2017-08-18Represent cItem::m_Lore as an AStringVector (#3882)peterbell101-10/+66
* Replace cItem::m_Lore with AStringVector * Reword deprecation warning * Fix lua bindings
2017-08-17Add cLuaWindow OnClicked Callback (#3901)Lane Kolbly1-0/+1
2017-08-03Remove double includes part 2 (#3890)peterbell101-1/+0
2017-07-12Lua plugin cColor (#3833)Lane Kolbly1-0/+22
2017-06-26Moved ApiParamError into cLuaState.Mattes D1-40/+0
2017-06-24cBlockArea supports block entities. (#3795)Mattes D1-332/+41
2017-05-28Minor cBrewingRecipes cleanup (#3731)peterbell101-1/+2
2017-05-11Tracer replacement (#3704)Mattes D1-2/+204
* Replaced cTracer usage with cLineBlockTracer. * Exported new cLineBlockTracer utility functions to Lua API.
2017-05-09Fixed Lua bindings for const objects.Mattes D1-1/+1
2017-05-01Don't return const ref params and removed functions fromLukas Pioch1-87/+0
ManualBindings.cpp
2016-12-25Refactored to put URL Encoding / Decoding in a single place. (#3491)Mattes D1-18/+67
2016-12-10Export GetPosition and GetSpeed from cEntity as a copy instead of a pointer to lua.Lukas Pioch1-0/+46
2016-09-26LuaAPI: Fixed possible crashes in HTTPRequest bindings.Mattes D1-35/+36
2016-09-25Fixed cCompositeChat's constructor LuaAPI bindings.Mattes D1-2/+102
The tolua-generated constructor would return an extra string value.
2016-09-08Bindings: Fixed some function signatures comments.Mattes D1-4/+6
2016-08-22cLuaState: Added direct support for pushing a nil constant.Mattes D1-4/+2
2016-08-21cLuaState: Added template to push multiple values in a single call. (#3331)Mattes D1-25/+6
2016-08-14Fixed cWorld:ChunkStay bindings. (#3319)Mattes D1-1/+0
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.
2016-08-13Converted cLuaState::cTableRef to use cTrackedRef.Mattes D1-24/+28
This makes the table-based callbacks resistent to LuaState unloads and safer to use.
2016-08-06Fixed cFile API bindings.Mattes D1-16/+16
2016-07-18LuaAPI: Fixed bindings for cChunkDesc:GetBlockTypeMetaMattes D1-0/+32
2016-06-27Converted cLuaState::cCallbackPtr into a UniquePtr.Mattes D1-9/+9
2016-06-27cPluginManager: Use a callback for command handler registration.Mattes D1-29/+65
2016-06-27Changed cLuaWindow callbacks to use cLuaState::cCallback.Mattes D1-71/+86
2016-06-27Changed plugin hook registrations to use cLuaState::cCallback.Mattes D1-6/+20
2016-06-27Removed cWebPlugin, WebAdmin uses cLuaState::cCallback.Mattes D1-60/+222
2016-06-05Bindings: Fixed cBoundingBox API.Mattes D1-0/+80
2016-05-29Added GetTeamNames to cScoreboard (#3217)PlasmaPower1-0/+25
Resolves #3210
2016-03-21Revert "Lua callback"Mattes D1-326/+135
2016-03-17Changed cLuaWindow callbacks to use cLuaState::cCallback.Mattes D1-69/+84
2016-03-17Changed plugin hook registrations to use cLuaState::cCallback.Mattes D1-6/+20
2016-03-17Removed cWebPlugin, WebAdmin uses cLuaState::cCallback.Mattes D1-60/+222
2016-03-01Renamed HTTPServer folder to HTTP.Mattes D1-1/+1
It contains client code as well.
2016-02-05Bulk clearing of whitespaceLogicParrot1-112/+112
2015-12-25Added the cUrlParser class, exported to Lua API.Mattes D1-0/+159
2015-11-03Implemented brewingLukas Pioch1-0/+50
2015-09-26Extended and fixed the cFile API.Mattes D1-4/+406
2015-09-25Maked it compileable for clang-3.7Lukas Pioch1-4/+4
2015-08-18Some warning fixesJulian Laubstein1-1/+1
2015-08-07Refactored code to use cLuaStateSamuel Barney1-7/+11
Fixes #2377.
2015-07-31Unified the doxy-comment format.Mattes D1-1/+1
2015-07-29Silenced and fixed many warning messages across multiple files.Samuel Barney1-58/+58
2015-06-05Added Build info to the cRoot API.Mattes D1-4/+54
2015-05-19Added LuaState support for all integral typestycho1-2/+2
All so added error handling for out of range values
2015-05-14Fixed cPluginManager:ForEachCommand() and ForEachConsoleCommand()Mattes D1-93/+54
The functions would leak one value on the Lua stack for each enumerated command. Fixes #2017.
2015-05-13Moved cWorld manual bindings out into a separate file.Mattes D1-1196/+110
2015-05-10Exported cPluginManager:ExecuteConsoleCommand() to Lua API.Mattes D1-1/+38
Fixes #1999.
2015-05-09CheckBasicStyle: checks spaces around * and &.Mattes D1-6/+6
2015-05-09Fixed some Visual Studio warningsTiger Wang1-2/+2
2015-05-07Fixed inter-plugin calls.Mattes D1-0/+5
When an inter-plugin call failed due to function not found, the server would maul the LuaState and "yield". Fixes #1959.
2015-05-07Added support for additional data in the ParticleEffect Packettycho1-1/+57
Also started refactoring how broadcasts are handled
2015-04-30Fixed bindings for cFile:ReadWholeFile().Mattes D1-7/+38
Fixes #1914
2015-04-29Added cBlockArea:GetNonAirCropRelCoords() API function.Mattes D1-0/+39
Fixes #1915.
2015-04-25cPlayer now checks restrictions.Mattes D1-0/+32
Fixes #1331.
2015-04-23Refactored ManualBindings' callbacks using templates.Mattes D1-365/+238
This is a bit easier to read, has better error reporting and fixes a few subtle bugs. Fixes #1889.
2015-04-23Implemented cPluginManager:DoWithPlugin(), fixed ForEachPlugin().Mattes D1-112/+169
Both functions are exported as static.
2015-04-19Refactored cWebPlugin for C++11 style and proper WebTab clearing.Mattes D1-13/+7
2015-04-19Split the plugin names and plugin folders to avoid confusing them.Mattes D1-95/+117
Ref.: http://forum.mc-server.org/showthread.php?tid=1877
2015-03-21Changed cEntity::m_UniqueID to UInt32.Mattes D1-1/+5
2015-03-20Added cPluginLua::cResettable interface, used for scheduled tasks.Mattes D1-10/+22
This allows plugins to register objects that can "survive" the plugin unloading - they will simply bail out if the plugin is already unloaded, instead of referencing bad plugin data. Fixes #1556.
2015-03-19Improved DoWithID bindings.Mattes D1-3/+3
2015-03-19AllToLua: Removed an unneeded class declaration.Mattes D1-0/+2
It's perfectly possible to declare a class in ManualBindings without the need for declaration in AllToLua.pkg.
2015-03-11Fixed coding conventions for Pull Request #1807flx51-15/+18
2015-03-11Fixes #493 and #490flx51-0/+16
2015-03-03Lua API: Fixed md5 and sha1 hex formatting.Mattes D1-4/+4
std::setw() is only valid for one output operation and needs to be set again in each loop repetition.
2015-02-23Fixed operatorsSTRWarrior1-6/+6
2015-02-23Added forgotten indentSTRWarrior1-2/+2
2015-02-23Replaced lua_isXYZ with cLuaState::CheckParamXYZSTRWarrior1-12/+13
2015-02-23Exported all compression functions in a new class.STRWarrior1-16/+129
2015-02-22Exported CompressString and UncompressString to LuaSTRWarrior1-0/+37
2015-02-21Added cCryptoHash namespace to Lua API.Mattes D1-2/+107
2015-02-20Fixed crash when logging nil values.Matyas Dolak1-0/+32
Ref.: http://forum.mc-server.org/showthread.php?tid=1798
2015-02-04cNetwork: Exported the Connect() method and cTCPLink class to Lua.Mattes D1-1/+2
2014-12-12Exported cWorld:PrepareChunk to Lua API, test in Debuggers.Mattes D1-0/+67
2014-11-17Added UpdateSign() method to DeprecatedBindings.cppHowaner1-3/+2
2014-11-15Fixed a security problem with signs.Howaner1-1/+1
2014-11-05renamed FindAndDoWithUUID to DoWithPlayerByUUID, fixed style and comments, added description to APIDumpLukas Pioch1-2/+2
2014-11-02Added FindAndDoWithUUIDLukas Pioch1-0/+2
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-135/+135
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-135/+135
2014-10-10Moved a few objects to unique_ptrtycho1-1/+1
2014-10-06Fixed crash in ForEachEntityInBox API.madmaxoft1-2/+6
Fixes #1511.
2014-10-01Bindings: Fixed binding for cPlayer::PermissionMatches().madmaxoft1-10/+4
2014-09-26Removed a few unnessicary includesTycho1-2/+0
2014-09-03Exported ForEachEntityInBox() to Lua API.madmaxoft1-0/+70
2014-08-31Rewrited furnace.txt loading.Howaner1-1/+1
2014-08-28Fixed spaces after "template" keyword.Mattes D1-6/+6
2014-08-21cMojangAPI: Fixed MakeUUID___() bindings.Mattes D1-0/+58
ToLua would generate a shadow return value for the input strings.
2014-08-19cPlayer reads ranks from cRankManager.Mattes D1-39/+54
2014-08-12Renamed LoggersTycho1-5/+5
2014-08-10First Implementatation of new Loggin frameworkTycho1-5/+5
2014-08-09WebAdmin: Manually exported string conversion functions.madmaxoft1-1/+59
ToLua generated an extra return value for GetHTMLEscapedString() and GetURLEncodedString(), making them difficult to use.
2014-08-09WebAdmin: Manually exported string conversion functions.madmaxoft1-1/+59
ToLua generated an extra return value for GetHTMLEscapedString() and GetURLEncodedString(), making them difficult to use.
2014-08-08Exported cRankManager to LuaAPI.madmaxoft1-0/+2
2014-08-07Removed debug message.Howaner1-1/+0
2014-08-05Made lua clamp() compatible with all number types.Howaner1-4/+4
2014-08-05Added api documentation for Clamp()Howaner1-2/+2
2014-08-05Added Clamp() function to the lua api.Howaner1-0/+28
2014-08-03cMojangAPI: Added UUID-to-Name lookup.madmaxoft1-1/+97
Also fixed the bindings, now all functions are static-like.
2014-07-31MojangAPI: Added a UseCachedOnly param to GetUUIDsFromPlayerNames().madmaxoft1-5/+14
2014-07-30Exported the beacon.Howaner1-0/+2
2014-07-30ManualBindings: Fixed alignment.madmaxoft1-3/+3
2014-07-30Exported cMojangAPI to Lua.madmaxoft1-3/+6
2014-07-30Added a cMojangAPI class for PlayerName -> UUID lookups, with cache.madmaxoft1-1/+1
The cache is persisted into a SQLite DB file on server shutdown.
2014-07-28Added cClientHandle:GetUUIDsFromPlayerNames() to Lua API.madmaxoft1-3/+62
2014-07-21Style: Normalized to no spaces before closing parenthesis.madmaxoft1-30/+30
2014-07-21Style: Normalized spaces after if, for and while.madmaxoft1-11/+11
2014-07-19Fixed style: spaces after commas.madmaxoft1-13/+13
2014-07-17Basic style fixes.madmaxoft1-14/+13
2014-07-17Normalized comments.madmaxoft1-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.
2014-06-28Fixed a silly path error in #include.Mattes D1-1/+1
2014-06-27Removed the md5 library, obsoleted by PolarSSL.Mattes D1-5/+6
Fixes #1130.
2014-06-19Nullify deleted pointers.archshift1-0/+1
2014-06-11Added cBlockArea:GetCoordRange to Lua API.madmaxoft1-0/+32
2014-05-30Fixed bindings for cCompositeChat:SetMessageType().madmaxoft1-2/+2
2014-05-01Fixed warnings in ManualBindings.madmaxoft1-20/+20
2014-04-26Fixed a memory leak in tolua_cWorld_ChunkStay. (CID 43618)jfhumann1-1/+4
2014-04-01Exported the Base64 encoding and decoding functions to Lua API.madmaxoft1-0/+46
2014-04-01LOG() API reads the LogLevel from the cCompositeChat's MessageType.madmaxoft1-4/+13
2014-03-31Console logging supports cCompositeChat as its parameters.madmaxoft1-12/+34
2014-03-25More 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 Barney1-0/+1
Also had to undefine TOLUA_TEMPLATE_BIND a couple of times.
2014-03-14cPlugin:BindConsoleCommand can be called statically.madmaxoft1-1/+4
This has been documented before it was written.
2014-03-14cPluginManager:Bind[Console]Command returns true on success.madmaxoft1-2/+4
Fixes #801.
2014-03-07Fixed cBlockArea schematic string saving signature.madmaxoft1-3/+7
2014-03-07Fixed a typo.madmaxoft1-4/+4
2014-03-07Add Lua Bindings for FlowerPotEntity.h and add documentation.Howaner1-1/+1
2014-03-07Added cBlockArea serialization to string.madmaxoft1-6/+67
Fixes #665.
2014-03-07Add Flower PotsHowaner1-0/+2
2014-03-04Manually exported cCompositeChat modifiers.madmaxoft1-0/+258
This adds chaining support to them. Fixes #755.
2014-03-01Exported cScoreboard::ForEachTeamandrew1-0/+1
2014-03-01Exported cScoreboard::ForEachObjectiveandrew1-0/+4
2014-02-26Attempted fix for several GCC warnings.madmaxoft1-2/+7
2014-02-23Fixed bindings for cBlockArea:Get(Rel)BlockTypeMeta().madmaxoft1-29/+104
They no longer require the ghost output params.
2014-02-23Rename SkullEntity to MobHeadEntityHowaner1-2/+2
2014-02-23Add Heads completelyHowaner1-0/+2
2014-02-23Added cBlockArea:GetSize() and :GetOrigin() to Lua API.madmaxoft1-0/+64
These don't have a direct C++ equivalent, but are rather useful for the plugins.
2014-02-23Manually exported DoWithMapandrew1-0/+4
2014-02-20Fixed bindings for cBlockArea:Get(Rel)BlockTypeMeta().madmaxoft1-29/+104
They no longer require the ghost output params.
2014-02-19Rename SkullEntity to MobHeadEntityHowaner1-2/+2
2014-02-18Add Heads completelyHowaner1-0/+2
2014-02-11cWorld:ChunkStay() accepts nils as callbacks.madmaxoft1-5/+3
Also removed leftover debug logging.
2014-02-10Rewritten Lua ChunkStay API into a single function, cWorld:ChunkStay().madmaxoft1-16/+24
This fixes problems with indeterminate class object lifespan (Lua-GC) and forgetting to disable it or keep it until ready.
2014-02-09First working version of cLuaChunkStay.madmaxoft1-0/+41
It works, but has random failures, probably due to threading issues.
2014-02-08Fixed cWorld:TryGetHeight() API.madmaxoft1-1/+5
2014-02-05Fixed most of the reordering warningsTycho1-2/+2
2014-02-05Added cPluginManager:LogStackTrace() to the Lua API.madmaxoft1-0/+11
Fixes #637.
2014-02-04Fixed a gcc warning in ManualBindings.madmaxoft1-2/+2
Constructor member order...
2014-01-31Fixed cLineBlockTracer:Trace() signature.madmaxoft1-13/+27
2014-01-31Added cPluginManager:BindCommand() form to the API.madmaxoft1-1/+4
That's the canonical way to call static functions.
2014-01-25Stupid Mistake fixedTycho1-2/+2
2014-01-25Fixed exportsTycho1-2/+0
2014-01-22Fixed spelling errorTycho1-1/+1
2014-01-22Added manual bindings for moved functionsTycho1-0/+66
2014-01-21Implemented cPluginManager:CallPlugin() API.madmaxoft1-100/+96
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.
2014-01-19Changed the cWorld::ScheduleTask() signature.madmaxoft1-10/+14
Now it takes the delay in ticks as an argument, and a cTask descendant as the task to run. Lua API has been updated similarly.
2014-01-18Command blocks: Execute()andrew1-10/+12
2014-01-16Fixed whitespace in previous commit.madmaxoft1-1/+1
2014-01-16Finished exporting cWorld:ScheduleTask() to Lua API.madmaxoft1-1/+15
2014-01-14added cWorld::ScheduleTask FunctionTycho1-4/+58
ScheduleTask schedules a SceduledTask object to be run x ticks in the future. In is exported to lua, fixes #150
2014-01-11Removed internal methods from public cLuaState interface.madmaxoft1-72/+26
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.
2014-01-11Removed unused variables.madmaxoft1-2/+0
The Lua API calls had no side-effects, either.
2014-01-09Exported cClientHandle::SendPluginMessage() to Lua.madmaxoft1-0/+30
2014-01-07Removed a debugging log output in cPluginManager:AddHook().madmaxoft1-1/+0
2014-01-05Fixed cPluginManager:AddHook() binding.madmaxoft1-6/+13
Fixes #401. Old formats are still accepted, for compatibility reasons.
2013-12-14Implemented note block playing and fixed wireTiger Wang1-0/+2
Game of Thrones music in Minecraft, here I come!
2013-12-08Fixed tolua++ compilation.madmaxoft1-1/+1
Duplicate files, wrong includes, const-incorrect code...
2013-12-08Moved bindings-related to a Bindings subfolder.madmaxoft1-12/+12
Ref.: #407
2013-12-05Added cPluginManager:GetCurrentPlugin() to Lua API.madmaxoft1-7/+22
2013-11-27Fixed some of tiger's derpyness.Alexander Harkness1-1/+1
2013-11-24Attempt to fix compilationTiger Wang1-1/+1
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-23Fixed Lua bindings for cFile:GetFolderContents().madmaxoft1-1/+1
2013-11-22Added cFile:GetFolderContents().madmaxoft1-0/+27
Fix 162.
2013-11-22Fixed cRoot:GetFurnaceRecipe() Lua binding.madmaxoft1-3/+4
2013-11-22Changed cRoot:GetFurnaceRecipe() Lua binding signature.madmaxoft1-0/+40
Fix #364.
2013-11-20Added cWorld:ForEachBlockEntityInChunk() and cWorld:DoWithBlockEntityAt() functions.madmaxoft1-20/+22
Also exported them to the Lua API.
2013-11-13cPluginManager:BindCommand() and :BindConsoleComman() now report full Lua stacktrace on failure.madmaxoft1-2/+6
2013-11-09Removed cStringMap.madmaxoft1-1/+0
It wasn't used for anything anymore.
2013-10-23Fixed bindings for cHopperEntity:GetOutputBlockPos().madmaxoft1-0/+44
2013-10-13Re-added the cWorld:GetSignLines() to the API.madmaxoft1-0/+1
Somehow this got lost somewhere.
2013-10-12Fixed and exported cWorld:QueueTask().madmaxoft1-0/+65
This implements #220.
2013-09-18Improved error message in cPlugin:AddWebTab() API.madmaxoft1-4/+6
2013-09-18cPluginManager:BindConsoleCommand can be called with the dot operator, too.madmaxoft1-15/+20
2013-09-18cPluginManager:BindCommand can be called with the dot operator, too.madmaxoft1-12/+19
2013-09-15Fixed previous commit.madmaxoft1-1/+1
2013-09-15Fixed API bindings of cWorld:GetSignLines(), exported cWorld:UseBlockEntity().madmaxoft1-2/+55
2013-09-15Fixed cWorld bindings for GetBlockInfo() and GetBlockTypeMeta().madmaxoft1-0/+110
They no longer require the superficial arguments.
2013-09-11Added StringSplitAndTrim() to Lua APImadmaxoft1-6/+22
2013-08-27Implemented basic physics for projectiles.madmaxoft1-2/+4
2013-08-21cPluginManager.AddHook old-style API usage prints the stack trace.madmaxoft1-0/+1
This eases migration to #121 API.
2013-08-21Added a deprecation warning to the old style API.madmaxoft1-0/+1
This completes #121.
2013-08-21Hook adding uses the new API.madmaxoft1-0/+152
Multiple hooks per plugin can be added. The cPluginManager.AddHook() has four available signatures, the recommended one is cPluginManager.AddHook(HOOK_TYPE, CallbackFunction)
2013-08-19Moved entities into the Entities subfolder.madmaxoft1-1/+1
2013-08-19Finished renaming cPlugin_NewLua to cPluginLua.madmaxoft1-17/+17
2013-08-10Renamed Plugin_NewLua to PluginLua.madmaxoft1-2/+1
2013-08-09Renamed Plugin_NewLua to PluginLua.madmaxoft1-2/+1
2013-08-08LuaState refactoring: using templates for hook function calls.madmaxoft1-15/+15
This simplifies calling Lua functions considerably, it's almost like calling a C++ function, only with an extra argument to delimit args from returned values.
2013-08-07Added cLineBlockTracer to the APImadmaxoft1-4/+176
2013-08-06Fixed compilation in ManualBindingsmadmaxoft1-1/+1
2013-08-06cLuaState is used for pushing splits in ManualBindingsmadmaxoft1-23/+8
2013-08-05Exported the cWorld:TryGetHeight() functionmadmaxoft1-0/+47
2013-08-05Exported cWorld:DoWithEntityByID() to Lua APImadmaxoft1-202/+293
2013-08-05Alpha-sorted the manual bindings' functions.madmaxoft1-13/+13
2013-08-04LuaState refactoring: initial part.madmaxoft1-9/+10
The cLuaState class is a wrapper for the lua_State * and for the common functions on it. The cPlugin_NewLua has been rewritten to use it instead of the raw pointer. Part of #33
2013-07-29WebAdmin templates can use LuaFakeTruth1-0/+61
New WebAdmin templates can use Lua to completely compose the pages themselves. This should allow infinite WebAdmin design possibilities.
2013-06-12Added cWorld::SetSignLines(), re-exported to Lua manually to avoid ghost return valuesmadmaxoft@gmail.com1-0/+55
FS #364 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1582 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-05Added LOGWARNING() function to Lua API, as a synonym to LOGWARN()madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1558 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-04ToLuaDoxy: initial importmadmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1544 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-31Added cLuaWindow:SetOnSlotChanged(); the callback is called only for non-inventory slotsmadmaxoft@gmail.com1-7/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1535 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30Added the OnClosing callback to cLuaWindow APImadmaxoft@gmail.com1-0/+39
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1534 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30LuaWindow: Initial code, the window can be opened, but not much manipulatedmadmaxoft@gmail.com1-7/+73
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1532 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-28Moved BlockEntities to a separate foldermadmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1527 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-26Implemented droppersmadmaxoft@gmail.com1-2/+6
Added a common ancestor class "DropSpenser" that has the common code for dropper and dispenser and is Lua-accessible, too. The Debuggers plugin now triggers both droppers and dispensers when rclking them with a redstone torch. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1514 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-25Fixed the cWorld:DoWithChestAt(), DoWithDispenserAt() and DoWithFurnaceAt() callbacks binding.madmaxoft@gmail.com1-5/+21
They are now doing what the comment said they are doing. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1506 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-24Slight cleanup in the cInventory / cItemGrid APImadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1504 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-10Fixed gcc buildmadmaxoft@gmail.com1-10/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1382 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-10Added cItemGrid to represent an XY grid of items; converted chests to use cItemGrid.madmaxoft@gmail.com1-0/+42
http://forum.mc-server.org/showthread.php?tid=831 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1380 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-15Plugins can now bind console commandsmadmaxoft@gmail.com1-86/+159
FS #300 Most console commands are now implemented in the Core plugin. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1214 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-10Fixed ASSERT / VERIFY mismatch in ManualBindings' error handlingmadmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1206 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-03Added a GetClassStatic function to all entities, as well as cFurnaceEntity, cChestEntity and cWorldfaketruth1-377/+392
Using templates to generate ForEach* functions instead of MACROS Better error reporting in ForEach* functions git-svn-id: http://mc-server.googlecode.com/svn/trunk@1191 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-02Fixed GCC error in ManualBindingsmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1189 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-01Moved command API into cPluginManager.madmaxoft@gmail.com1-16/+126
As specified in http://forum.mc-server.org/showthread.php?tid=765 , commands are now bound using a single function, cPluginManager:BindCommand(). git-svn-id: http://mc-server.googlecode.com/svn/trunk@1183 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-27Added the HOOK_BLOCK_TO_PICKUPS hook that fires when a block is dug up and should be converted to pickups.madmaxoft@gmail.com1-1/+1
Note that cItems is used in the function signature but not yet exported in the API, TODO! git-svn-id: http://mc-server.googlecode.com/svn/trunk@1176 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-12Merged branch "branches/hooks" into "trunk".madmaxoft@gmail.com1-13/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-21Fixed manual bindings' ForEachXXX mapping not checking the object instance for validity.madmaxoft@gmail.com1-0/+5
( http://forum.mc-server.org/showthread.php?tid=591&pid=5007#pid5007 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@996 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-14Completely removed support for old style Lua plugins (can use both Plugin and NewPlugin in settings.ini for now)faketruth1-6/+16
Removed cPlugin_Lua, obviously cPluginManager stores plugins by their (folder)name cPluginManager now scans the Plugins folder for potential plugins and adds them as non-loaded plugins Added a DisablePlugin and LoadPlugin to disable and load plugins on a per-plugin basis instead of all at once cPluginManager::FindPlugins refreshes the plugin list by removing non-existing plugins and adding new plugins Made it incredibly easy to use new plugins from the WebAdmin Exposed some food/hunger related functions in cPlayer to Lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@959 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-11Got rid of "self" in plugins, which is deprecated anywayfaketruth1-1/+1
Fixed bug in many On* hooks that did not pop the return values from the stack Fixed Plugin:Call() that removed one too many items from the stack git-svn-id: http://mc-server.googlecode.com/svn/trunk@950 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-11Can now send usertypes (cPlayer, cEntity, cCuboid) along with a plugin:Call()faketruth1-2/+25
git-svn-id: http://mc-server.googlecode.com/svn/trunk@946 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-10Added functionality so one plugin can call functions on another plugin :Dfaketruth1-0/+85
Fixed Core plugin file addresses in the VS2008 project git-svn-id: http://mc-server.googlecode.com/svn/trunk@945 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-10/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-02Exported cWorld::DoWithChestAt to Luafaketruth1-0/+93
Exported cChestEntity to Lua for handling in DoWithChestAt git-svn-id: http://mc-server.googlecode.com/svn/trunk@820 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-23Added plugin name to deprecation messagesmadmaxoft@gmail.com1-1/+4
Removed duplicate inheritance of m_Name in cPlugin_NewLua by making cWebPlugin interface-only git-svn-id: http://mc-server.googlecode.com/svn/trunk@782 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-23Added a RateCompareString function to StringUtilsfaketruth1-82/+94
Created a preprocessor template (define) for DoWith* functions Exported cWorld::FindAndDoWithPlayer(), cRoot::FindAndDoWithPlayer() and cRoot::ForEachPlayer() to Lua Added a function FindAndDoWithPlayer to cRoot and cWorld. It takes a part of a player name and finds a single player based on that. Fixed Core's MOTD to contain the correct URL to the MCServer site Fixed Core /kick command Fixed Core's WebAdmin kick git-svn-id: http://mc-server.googlecode.com/svn/trunk@779 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-22WebAdmin should not cause crashes anymorefaketruth1-8/+19
Got rid of cWebPlugin_Lua cPlugin_Lua is also a cWebPlugin now, so plugins don't need a separate cWebPlugin object Changed some stuff to use AString instead of char* git-svn-id: http://mc-server.googlecode.com/svn/trunk@777 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-02Added the cWorld::DoWithPlayer() function and exported it in the Lua API. Removed the obsolete cWorld::GetPlayer() function.madmaxoft@gmail.com1-0/+92
git-svn-id: http://mc-server.googlecode.com/svn/trunk@639 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-17Removed the deprecated GetBlockEntity(), added several enumerators to replace it.madmaxoft@gmail.com1-6/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@629 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-17Macro-ized the ForEachSomethingInChunk Lua glue code (will soon be used for block entities, too)madmaxoft@gmail.com1-92/+95
git-svn-id: http://mc-server.googlecode.com/svn/trunk@627 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-16Exported cWorld::ForEachEntity and cWorld::ForEachEntityInChunk; no idea if they actually workmadmaxoft@gmail.com1-28/+132
git-svn-id: http://mc-server.googlecode.com/svn/trunk@620 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-15Rewritten ForEach using #define-s, new ones can be added as a simple one-linermadmaxoft@gmail.com1-166/+86
git-svn-id: http://mc-server.googlecode.com/svn/trunk@618 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-614/+614
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-02Added Lua function cRoot:ForEachWorld(), removed the obsolete cRoot:GetWorld() method (both C++ and Lua)madmaxoft@gmail.com1-3/+94
git-svn-id: http://mc-server.googlecode.com/svn/trunk@534 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-04-11Moved the commands /coords /viewdistance and /regeneratechunks from cServer.cpp to the Core pluginfaketruth1-0/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@457 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16git-svn-id: http://mc-server.googlecode.com/svn/trunk@281 0a769ca7-a7f5-676a-18bf-c427514a06d6faketruth1-1/+1
2012-02-15Can now pass any argument to cWorld:ForEachPlayer in Lua! But I'm not even using it.. lolfaketruth1-18/+46
git-svn-id: http://mc-server.googlecode.com/svn/trunk@262 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14Got rid of cWorld::GetAllPlayers() and implemented ForEachPlayer() more or less in Luafaketruth1-5/+61
Core now uses ForEachPlayer() to interact with connected players git-svn-id: http://mc-server.googlecode.com/svn/trunk@260 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01Introducing StringUtils - the place to be if you are a generic string routine :) No more sprintf()!madmaxoft@gmail.com1-2/+76
git-svn-id: http://mc-server.googlecode.com/svn/trunk@209 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-31Changed how Lua handles the (Post)Params in the HTTPRequest of a WebPluginfaketruth1-0/+59
It should now be theoretically possible to upload files through WebAdmin git-svn-id: http://mc-server.googlecode.com/svn/trunk@203 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-30Added a WebAdmin interface to view users their groups, and the permissions of groups.faketruth1-0/+22
cChunk::Tick did an assertion in cCSLock, I used a cCSUnlock to fix it, but not sure if this is correct. git-svn-id: http://mc-server.googlecode.com/svn/trunk@194 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-1/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-28Converted entire Core plugin including WebAdmin interface to new plugin method/system/thingy and sexyfied it.faketruth1-0/+47
Made some changes to WebAdmin to make the new plugins work Old plugins still work like they're supposed to Not all hooks have been programmed for the new plugins yet, this still needs to be done git-svn-id: http://mc-server.googlecode.com/svn/trunk@182 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-03MCServer c++ source filesfaketruth1-0/+229
git-svn-id: http://mc-server.googlecode.com/svn/trunk@3 0a769ca7-a7f5-676a-18bf-c427514a06d6