Mattes D
1c8e60f91a
Added LuaState tracker and memory stats logging.
2015-09-28 21:30:31 +02:00
Mattes D
ad57ce5f99
Extended and fixed the cFile API.
2015-09-26 22:54:18 +02:00
Samuel Barney
804805d35a
Silenced and fixed many warning messages across multiple files.
2015-07-29 09:49:30 -06:00
Mattes D
8df31067d4
Externalized cPrefabPiecePool self-test.
2015-06-19 16:15:59 +02:00
Mattes D
c6012a95bd
LuaState: Added support for config-style usage.
...
Globals and table values can be queried from the Lua state easily.
Use perfect forwarding.
2015-06-17 17:13:45 +02:00
tycho
dae9e5792a
Made -Weverything an error.
2015-05-24 12:56:56 +01:00
tycho
480052c058
Added LuaState support for all integral types
...
All so added error handling for out of range values
2015-05-19 17:09:05 +01:00
Mattes D
1240c76cb4
Lua: Break into ZBS debugger on API errors.
2015-05-16 16:19:18 +02:00
Mattes D
4b97569b3a
ToLua now generates cLuaState::Push() and GetStackValue()
...
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.
2015-05-12 09:20:54 +02:00
Mattes D
dd10ffb63a
OnExecuteCommand hook can override the command result (crXXX).
2015-05-10 23:11:30 +02:00
Tiger Wang
218010cd96
Fixed some Visual Studio warnings
2015-05-08 23:32:02 +01:00
tycho
448df85e56
Added support for additional data in the ParticleEffect Packet
...
Also started refactoring how broadcasts are handled
2015-05-07 03:47:46 +01:00
Mattes D
fc95501f68
Added cBlockArea:GetNonAirCropRelCoords() API function.
...
Fixes #1915 .
2015-04-29 15:14:22 +02:00
Mattes D
a89d5f53fd
Refactored ManualBindings' callbacks using templates.
...
This is a bit easier to read, has better error reporting and fixes a few subtle bugs.
Fixes #1889 .
2015-04-23 22:20:31 +02:00
Mattes D
08624348f4
Implemented cPluginManager:DoWithPlugin(), fixed ForEachPlugin().
...
Both functions are exported as static.
2015-04-23 19:41:01 +02:00
Mattes D
9c5162041e
cNetwork: Added UDP API.
2015-02-20 14:28:05 +01:00
Mattes D
16636ff6e2
LuaAPI: Added client TLS support for TCP links.
2015-02-12 20:05:55 +01:00
Mattes D
014b96adb3
Exported cServerHandle and cNetwork:Listen to Lua.
...
Also added an example to the NetworkTest plugin.
2015-02-04 08:40:52 +01:00
Mattes D
360c632e36
cNetwork: Exported the Connect() method and cTCPLink class to Lua.
2015-02-04 08:40:50 +01:00
tycho
e7424adbf4
Switched LuaState to use sizeof...
2015-01-31 15:44:14 +00:00
Tycho
2a9664d6ca
Initial convertion of a_Dt to std::chrono
...
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2015-01-11 21:12:26 +00:00
Mattes D
2b7f34515a
cLuaState: Fixed errors on non-existent callbacks.
...
This mostly affected table-based callbacks, such as the cLineBlockTracer. If a callback didn't exist, the code would still push its arguments on the stack, breaking the next callback.
2014-10-31 19:25:45 +01:00
Tiger Wang
a26541a7c3
En masse NULL -> nullptr replace
2014-10-22 20:12:49 -07:00
Mattes D
cf73fee7e3
Fixed minor style issues.
2014-10-19 18:45:42 +02:00
worktycho
25ebedbe45
Use universal references
2014-10-16 15:11:35 +01:00
Mattes D
f58d44ea50
cLuaState::Call() uses variadic templates.
...
(doesn't compile)
2014-10-15 19:18:23 +02:00
madmaxoft
4e82a58060
Fixed crash in ForEachEntityInBox API.
...
Fixes #1511 .
2014-10-06 13:48:44 +02:00
Tycho
6ffb7835e7
Removed a few unnessicary includes
2014-09-26 16:26:03 +01:00
madmaxoft
06c66a08cd
LuaState: Fixed referenced function pushing.
...
The references are no longer destroyed by the call.
2014-09-03 23:05:03 +02:00
madmaxoft
a51c1e0b73
Added cWorld::ForEachEntityInBox()
2014-09-03 17:00:26 +02:00
Mattes D
51df169ad5
cLuaState: Fixed Vector3<> names pushed to Lua.
2014-08-22 10:33:15 +02:00
madmaxoft
2423fbf2ef
Normalized comments.
...
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-07-17 22:15:34 +02:00
Mattes D
7e3b26e7ba
Merge pull request #1144 from mc-server/LuaCodeGen
...
Lua code gen
2014-07-06 14:44:52 +02:00
madmaxoft
2dbed03cbc
Changed OnWeatherChanging hook to always read the returned weather.
...
Ref.: http://forum.mc-server.org/showthread.php?tid=1512
2014-07-03 17:49:21 +02:00
madmaxoft
b6d5d50b31
Tolua generates LuaState_Call.inc file.
2014-07-01 22:29:39 +02:00
madmaxoft
d92520016d
Fixed OnProjectileHitBlock bindings.
...
Also sorted the various cLuaState::Push() functions.
2014-06-03 19:29:23 +02:00
STRWarrior
a6ef40cb6e
Fixed error when the hook gets called.
2014-03-29 15:43:03 +01:00
madmaxoft
964647a900
Made pushing plain pointer to Lua a valid operation, with a warning.
...
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)
2014-03-20 09:16:47 +01:00
madmaxoft
74b7f51b89
Errors in Lua don't include the error handler in the stack trace.
...
Fixes #817 .
2014-03-19 22:55:47 +01:00
Tycho
8e11c270fc
Added Noreturn attribtes to a couple of functions and made a missing noreturn an error
2014-03-14 07:59:25 -07:00
madmaxoft
f2df33f746
Merge remote-tracking branch 'xdot/master'
2014-03-12 14:42:04 +01:00
madmaxoft
0c15fdf7b0
Moved Lua API registering into a separate function.
...
This will allow us to use Lua as lite-config files as well, should we want to.
2014-03-12 13:05:28 +01:00
andrew
b4bf13aa4f
Unified Vector classes
2014-03-11 16:02:25 +02:00
madmaxoft
ecfe17b096
cLuaState: Made public the GetStackValue() functions.
2014-03-04 21:55:24 +01:00
madmaxoft
865ae82114
Add Lua plugin path to package.path and .cpath.
...
Fixes #693 .
2014-02-17 23:12:46 +01:00
madmaxoft
33c84aaa4d
Added cLuaState::CheckParamFunctionOrNil().
...
Also fixed error reporting for the two function-checking functions.
2014-02-11 15:03:35 +01:00
madmaxoft
310a25c456
cLuaState::cRef can be unbound and re-bound.
...
This will allow us to store Lua references as member variables in classes and initialize those later than in the constructor.
2014-02-09 18:39:22 +01:00
madmaxoft
2a018cfa49
Implemented cPluginManager:CallPlugin() API.
...
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-21 23:00:35 +01:00
madmaxoft
4a01879911
cLuaState can now check function params.
2014-01-19 23:45:26 +01:00
madmaxoft
332c1c59eb
cCreeper is no longer available in API.
...
Has been replaced by cMonster.
2014-01-13 17:25:16 +01:00