1
0
Fork 0
Commit Graph

40 Commits

Author SHA1 Message Date
peterbell10 13144a08e4
Enable some more clang-tidy linter checks (#4738)
* 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-14 22:15:35 +00:00
Mattes D 9ee47e5999 Using Super. 2020-04-16 20:07:48 +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
Mattes D 5f4df3e87d ShapeGen, HeiGen: Changed to use cChunkCoords. 2019-09-08 20:21:49 +02:00
Mattes D e4ac84a6ab BiomeGen: Changed to use cChunkCoords params. 2019-09-08 20:21:49 +02:00
Lane Kolbly 7bdbfad1bb Changed int parameters to vector parameters in cCuboid and simulators (#3874) 2017-08-17 15:48:38 +02:00
peterbell10 a56cfd1f42 Remove smart pointer macros 2017-07-21 14:41:51 +01:00
Lukas Pioch e35ac1bfb9 Clang 5.0 fixes
- Added override keyword
- Removed inherited member variables
2017-05-21 12:19:06 +02:00
Mattes D 187abe3f5e Gen: Moved PiecePool into a separate file.
Also rewritten the PieceGenerator to use std::unique_ptr.
2017-05-04 09:49:30 +02:00
Mattes D 585571d78c PieceGenerator: Added rotation-aware vertical connectors. 2017-02-13 16:50:35 +01:00
Mattes D bb78bd88b5 Fixed villages generating under-water.
The CompoGenBiomal didn't update the heightmap properly.
2016-12-01 17:45:31 +01:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Mattes D b8fbba5eb9 Added PieceStructures generator. 2015-12-01 10:35:07 +01:00
Mattes D e06dd8f20e Added basic support for loading village prefabs from files. 2015-06-20 15:37:41 +02:00
tycho dae9e5792a Made -Weverything an error. 2015-05-24 12:56:56 +01:00
tycho 81c0116cf1 Merge branch 'master' into PreventNewWarnings 2015-05-23 07:33:52 -07:00
Lukas Pioch e30b2ed487 Fixed missing overrides and added a ignore flag for reserved macro for clang version 3.6 and higher. 2015-05-23 16:28:37 +02:00
tycho 2bb25b8afa Fixed some more warnings 2015-05-19 15:21:29 +01:00
Mattes D c13b1931ff More style checking.
Spaces around some operators are checked.
2015-05-09 12:58:54 +02:00
Mattes D 5fb2526e07 Generator: Shape initial refactoring.
The code compiles, but several structure generators are broken, crash on start.
2014-11-12 21:24:26 +01:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Mattes D e0cfbc4d85 Generator: Rewritten to use SharedPtrs. 2014-10-19 14:01:59 +02:00
STRWarrior dd9a19e395 VillageGen: Fixed a typo in comment 2014-08-03 15:31:59 +02:00
madmaxoft c03161f75d Fixed tabs used for alignment. 2014-07-17 23:16:55 +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
Tycho ee50790398 Merge branch 'master' of github.com:mc-server/MCServer 2014-06-16 15:12:50 +01:00
STRWarrior 7cf544079f Roads in villages are made out of wooden planks if they generate on water. 2014-06-11 19:12:29 +02:00
madmaxoft f4e9c88dcd Fixed a memory leak in VillagGen. 2014-05-31 10:33:12 +02:00
madmaxoft 6b41d1a422 Added AlchemistVillage prefabs (Thanks, KingsCraftAu). 2014-05-27 22:08:20 +02:00
madmaxoft 1a742a2b52 Added support for Miners' Village.
The village contains both prefabs that snap to ground and prefabs that connect strictly via connectors.
Fixes #1027.
2014-05-25 23:50:16 +02:00
madmaxoft 96a22cd82c Added Japanese village prefabs. 2014-05-24 15:03:39 +02:00
madmaxoft 6aa7df367f Villages have min and max density setting.
Also made roads use 3+9 scheme, instead of 3+5, for the house connectors.

Fixes #1020.
2014-05-22 21:47:56 +02:00
madmaxoft 85fc0dbd97 Changed desert village roads to gravel. 2014-05-21 23:17:09 +02:00
madmaxoft efcae77828 Added second kind of desert village (FlatRoof). 2014-05-21 23:16:43 +02:00
madmaxoft a7e52e51dc Village roads are drawn properly. 2014-05-17 22:26:09 +02:00
madmaxoft 7004043c61 Village houses are height-adjusted onto the terrain. 2014-05-17 21:54:04 +02:00
madmaxoft 34e5f0c164 Changed village road generation to use multiple prefabs. 2014-05-15 10:43:54 +02:00
madmaxoft f5fdbdaf29 VillageGen rewritten using BFSPieceGenerator.
Piece composition is not good yet, the buildings aren't height-adjusted and the road pieces will need special processing. This is mainly for adjusting the per-piece params.
2014-05-15 00:14:06 +02:00
madmaxoft 9c8e8ef7ae VillageGen: Added well placement and the general algorithm description. 2014-05-12 22:43:59 +02:00
madmaxoft c0727c4265 Initial VillageGen implementation.
WIP, doesn't generate anything yet.
Ref.: 740.
2014-05-11 22:35:41 +02:00