1
0
Fork 0
Commit Graph

70 Commits

Author SHA1 Message Date
peterbell10 e6634ed26c
Update submodules (#4727)
Closes #4708

This updates jsoncpp, mbedtls, TCLAP and SQLiteCpp to their latest stable release. A few additional changes were needed:

* jsoncpp deprecated Reader, FastWriter and StyledWriter which I've replaced
  with some helper functions in JsonUtils.cpp

* SQLiteCpp changed how it builds with external sqlite libraries, now expecting
  them to be installed. The simplest path was to remove sqlite from cuberite's
  submodule and just use SQLiteCpp's internal version.
2020-05-09 15:51:15 +01:00
Mattes D a765e71325
Removed the obsolete cTracer class. (#4594) 2020-04-03 12:50:08 +00:00
Mattes D 01b8ed5295
Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)
The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change)
The BlockInfo.h file was removed from Globals.h (main change)
The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics)
The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor)
Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header.
That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified.
eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values
2020-04-03 08:57:01 +02:00
Mat 7d4934534e
Stabilise MoveToWorld (#4004)
* Stabilise MoveToWorld

* Fix comments and deprecate ScheduleMoveToWorld

* Enhanced thread safety for m_WorldChangeInfo

* Return unique_ptr from cAtomicUniquePtr::exchange

* cWorld now calls entity cEntity::OnAddToWorld and cEntity::OnRemoveFromWorld.

Allows broadcasting entities added to the world from the world's tick thread.
This also factors out some common code from cEntity::DoMoveToWorld and cEntity::Initialize.

As a consequence, cEntity::Destroy(false) (i.e. Destroying the entity without broadcasting) is impossible.
This isn't used anywhere in Cuberite so it's now deprecated.

* Update entity position after removing it from the world.
Fixes broadcasts being sent to the wrong chunk.

* Fix style

* cEntity: Update LastSentPosition when sending spawn packet

* Add Wno-deprecated-declarations to the lua bindings

* Kill uses of ScheduleMoveToWorld
2020-03-05 12:52:34 +02:00
peterbell10 ee84197014
Force all headers other than "Globals.h" to be included with relative paths (#4269)
Closes #4236

CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/".

#include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
2018-08-29 01:51:25 +01:00
peterbell10 86a8fdf3fe tolua++ bindings use nullptr. (#4219)
Fixes compilation with -Wzero-as-null-pointer-constant.
2018-04-27 23:22:41 +02:00
peterbell10 757231cc6e
Add the fmt library (#4065)
* 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.
2018-01-03 17:41:16 +00:00
peterbell10 832b394715 Fix Travis build (#4101)
Stop using gdb on osx - was breaking the build
Add clang 3.5 build as travis now defaults to 5.0
Fix unknown-warning-option errors on AppleClang
ProtoProxy: Use nullptr
UrlClientTest: add override to callback destructor
Update jsoncpp to use nullptr
2017-12-22 18:25:46 +00:00
bibo38 532731e6f4 Fixed Clang 5.0 compile errors (#4085)
* 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-12-21 11:36:58 +00:00
peterbell10 307e7aaff5 Fix switch warnings (#4013)
* Fix switch warnings
  * Fix a variety of -Wswitch and -Wswitch-enum warnings
  * Remove unneeded -Wno-error flags

* Reorganise some eMonsterType switches
  * Alpha sort eMonsterType cases in WriteMobMetadata
    and in cNBTChunkSerializer::AddMonsterEntity
  * List all mob types in protocol 1.12 and NBTChunkSerializer

* cStructGenTrees::GetNumTrees: remove switch default

* cWSSAnvil::LoadOldMinecartFromNBT: Log unhandled minecart type
2017-09-14 09:48:57 +01:00
peterbell10 f4f2fc7c3d Add cUUID class (#3871) 2017-08-25 13:43:18 +01:00
Pablo Beltrán b18f6637b6 Fully implemented leashes (#3798) 2017-08-21 10:46:41 +02:00
Lane Kolbly b61898c30c Lua plugin cColor (#3833) 2017-07-12 12:30:43 +02:00
Lukas Pioch 885d828712 Added bed entity (#3823)
* Added bed entity

* Export cBedEntity to lua
* Set color of bed through item damage value
* Added bed entity to APIDoc
* NBT: Added loading and saving
* Crafting recipes for the colored beds
2017-07-07 09:31:45 +02:00
peterbell10 33527067ed Update tolua and export EffectID 2017-06-29 18:58:48 +02:00
Mattes D fe42538349 cBlockArea supports block entities. (#3795) 2017-06-24 11:58:06 +02:00
Lukas Pioch 73a3c4e3be Exported boat
- NBT: Added saving / loading of material
- Added the material in the item handler of the boat
- Drop the correct boat if destroyed
- APIDoc: Added desc and functions
2017-05-24 19:02:18 +02:00
Lukas Pioch 7c4576a025 Exported cFallingBlock and cExpOrb (#3700) 2017-05-09 14:24:41 +02:00
Mattes D 0de705eb99 Removed binary ToLua++ from build.
A local Lua executable is used instead.
2017-05-04 17:38:05 +02:00
Tiger Wang 8c6d0b51c7 Use CMake's Android generators to crosscompile 2016-12-12 14:32:32 +00:00
Mattes D fc5fb03fec CMake: Fix system Lua usage for non-5.1 versions. (#3271) 2016-07-21 10:46:31 +01:00
Mattes D 8eaa8613da CMake: Remove needless minimum version specifications. 2016-07-18 22:11:42 +02:00
Mattes D 430b623223 Use system Lua, if available, to generate bindings.
Closes #1031.
2016-07-18 22:11:41 +02:00
Mattes D a184f57eb3 Bindings: Added missing dependencies.
Fixes #3245
2016-07-02 00:30:22 +02:00
Mattes D af8c96026d Removed cWebPlugin, WebAdmin uses cLuaState::cCallback. 2016-06-27 20:51:48 +02:00
Mattes D e3d34d9917 Revert "Lua callback" 2016-03-21 09:58:15 +01:00
Mattes D 62d81eb763 Removed cWebPlugin, WebAdmin uses cLuaState::cCallback. 2016-03-17 19:29:01 +01:00
Mattes D 80e1eb37dd Renamed leftover strings to Cuberite / Server, as needed.
Also upgraded the user setting file for MSVC to 2013.
2016-01-01 21:05:09 +01:00
Mattes D 958df6ad91 Added the cUrlParser class, exported to Lua API. 2015-12-25 18:50:25 +01:00
Mattes D 122d824a8a Added a Json parser and serializer to Lua API. 2015-12-24 14:00:31 +01:00
Matti Hänninen b20294604c Fix old style casts and implicit conversions 2015-08-12 16:51:38 +03:00
Samuel Barney 804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
tycho b2fa71a32a Fix comments 2015-05-28 12:54:04 +01:00
tycho dae9e5792a Made -Weverything an error. 2015-05-24 12:56:56 +01:00
tycho 77f1f58c0a Make -Werror disabling file only
Ad fix a load of warnings
2015-05-19 19:32:10 +01:00
Mattes D 15771e4759 Moved cWorld manual bindings out into a separate file. 2015-05-13 11:30:57 +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
Tiger Wang 2919d08883 Update submodules 2015-05-02 15:57:49 +01:00
Mattes D 9c5162041e cNetwork: Added UDP API. 2015-02-20 14:28:05 +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 17498a97a2 cNetwork: Exported lookup functions to Lua API.
Also added an example in 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
Mattes D a42fa071bc Properly exported cItemFrame and cHangingEntity to Lua. 2014-10-21 22:02:30 +02:00
Mattes D 0c0c762412 Exported individual projectile classes to Lua API.
They used to be exported, but then they were moved to separate files and those werent' added to the ToLua processing list.
2014-10-21 21:25:52 +02:00
Mattes D fe153cc763 Bindings: Removed obsolete codegen files.
LuaState_Call.inc is no longer needed, it was replaced with variadic templates.
2014-10-19 11:32:17 +02:00
Tycho 6e7c0e33b5 Added first test to show the object can be created 2014-09-17 18:40:10 +01:00
Mattes D b8d3ddb409 Removed Group.h from Bindings' dependencies. 2014-08-21 15:49:32 +02:00
madmaxoft 3020e8cc05 Merge remote-tracking branch 'origin/master' into Ranks 2014-08-12 11:10:32 +02:00
Tycho df96f437a3 Fixed circular dependecy luaState_Call.inc 2014-08-10 22:15:52 +01:00
madmaxoft f1dc299fdb Exported cRankManager to LuaAPI. 2014-08-08 23:12:22 +02:00