Rename files to match code
This commit is contained in:
parent
8be1dd54bb
commit
34bf5c0d9d
@ -79,11 +79,11 @@ function(enable_bindings_generation)
|
||||
Mobs/MonsterTypes.h
|
||||
OSSupport/File.h
|
||||
Protocol/MojangAPI.h
|
||||
Registries/Statistics.h
|
||||
Registries/CustomStatistics.h
|
||||
Root.h
|
||||
Scoreboard.h
|
||||
Server.h
|
||||
Statistics.h
|
||||
StatisticsManager.h
|
||||
StringUtils.h
|
||||
UI/Window.h
|
||||
UUID.h
|
||||
|
@ -46,7 +46,7 @@ Here are the conventions:
|
||||
- `Foo(Vector3d a_Param1, const cCuboid & a_Param2)`
|
||||
- See the discussion in issue #3853
|
||||
- Use the provided wrappers for OS stuff:
|
||||
- Threading is done by inheriting from `cIsThread`, thread synchronization through `cCriticalSection` and `cEvent`, file access and filesystem operations through the `cFile` class, high-precision timing through `cStopWatch`
|
||||
- Threading is done by inheriting from `cIsThread`, thread synchronization through `cCriticalSection` and `cEvent`, file access and filesystem operations through the `cFile` class, high-precision timing through `cStopwatch`
|
||||
- No magic numbers, use named constants:
|
||||
- `E_ITEM_XXX`, `E_BLOCK_XXX` and `E_META_XXX` for items and blocks.
|
||||
- `cEntity::etXXX` for entity types, `cMonster::mtXXX` for mob types.
|
||||
|
@ -68,7 +68,7 @@ $cfile "../CompositeChat.h"
|
||||
$cfile "../Map.h"
|
||||
$cfile "../MapManager.h"
|
||||
$cfile "../Scoreboard.h"
|
||||
$cfile "../Statistics.h"
|
||||
$cfile "../StatisticsManager.h"
|
||||
$cfile "../Protocol/MojangAPI.h"
|
||||
$cfile "../UUID.h"
|
||||
|
||||
@ -124,7 +124,7 @@ $cfile "../BlockEntities/MobSpawnerEntity.h"
|
||||
$cfile "../BlockEntities/FlowerPotEntity.h"
|
||||
|
||||
// Registries:
|
||||
$cfile "../Registries/Statistics.h"
|
||||
$cfile "../Registries/CustomStatistics.h"
|
||||
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ extern "C"
|
||||
|
||||
#include "../Defines.h"
|
||||
#include "../FunctionRef.h"
|
||||
#include "../Registries/Statistics.h"
|
||||
#include "../Registries/CustomStatistics.h"
|
||||
#include "PluginManager.h"
|
||||
#include "LuaState_Typedefs.inc"
|
||||
|
||||
|
@ -58,7 +58,7 @@ target_sources(
|
||||
Scoreboard.cpp
|
||||
Server.cpp
|
||||
SpawnPrepare.cpp
|
||||
Statistics.cpp
|
||||
StatisticsManager.cpp
|
||||
StringCompression.cpp
|
||||
StringUtils.cpp
|
||||
UUID.cpp
|
||||
@ -138,8 +138,7 @@ target_sources(
|
||||
SetChunkData.h
|
||||
SettingsRepositoryInterface.h
|
||||
SpawnPrepare.h
|
||||
Statistics.h
|
||||
Stopwatch.h
|
||||
StatisticsManager.h
|
||||
StringCompression.h
|
||||
StringUtils.h
|
||||
UUID.h
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "../FastRandom.h"
|
||||
#include "../ClientHandle.h"
|
||||
|
||||
#include "../WorldStorage/StatSerializer.h"
|
||||
#include "../WorldStorage/StatisticsSerializer.h"
|
||||
#include "../CompositeChat.h"
|
||||
|
||||
#include "../Blocks/BlockHandler.h"
|
||||
@ -1925,7 +1925,7 @@ bool cPlayer::LoadFromFile(const AString & a_FileName)
|
||||
{
|
||||
// Load the player stats.
|
||||
// We use the default world name (like bukkit) because stats are shared between dimensions / worlds.
|
||||
StatSerializer::Load(m_Stats, m_DefaultWorldPath, GetUUID().ToLongString());
|
||||
StatisticsSerializer::Load(m_Stats, m_DefaultWorldPath, GetUUID().ToLongString());
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@ -2059,7 +2059,7 @@ void cPlayer::SaveToDisk()
|
||||
// Save the player stats.
|
||||
// We use the default world name (like bukkit) because stats are shared between dimensions / worlds.
|
||||
// TODO: save together with player.dat, not in some other place.
|
||||
StatSerializer::Save(m_Stats, m_DefaultWorldPath, GetUUID().ToLongString());
|
||||
StatisticsSerializer::Save(m_Stats, m_DefaultWorldPath, GetUUID().ToLongString());
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "../World.h"
|
||||
#include "../Items/ItemHandler.h"
|
||||
|
||||
#include "../Statistics.h"
|
||||
#include "../StatisticsManager.h"
|
||||
|
||||
#include "../UUID.h"
|
||||
|
||||
|
@ -36,6 +36,7 @@ target_sources(
|
||||
SleepResolutionBooster.h
|
||||
StackTrace.h
|
||||
StartAsService.h
|
||||
Stopwatch.h
|
||||
TCPLinkImpl.h
|
||||
UDPEndpointImpl.h
|
||||
WinStackWalker.h
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "BlockState.h"
|
||||
#include "Registries/Items.h"
|
||||
#include "Registries/Statistics.h"
|
||||
#include "Registries/CustomStatistics.h"
|
||||
|
||||
namespace Palette_1_13
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "BlockState.h"
|
||||
#include "Registries/Items.h"
|
||||
#include "Registries/Statistics.h"
|
||||
#include "Registries/CustomStatistics.h"
|
||||
|
||||
namespace Palette_1_13_1
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "BlockState.h"
|
||||
#include "Registries/Items.h"
|
||||
#include "Registries/Statistics.h"
|
||||
#include "Registries/CustomStatistics.h"
|
||||
|
||||
namespace Palette_1_14
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "BlockState.h"
|
||||
#include "Registries/Items.h"
|
||||
#include "Registries/Statistics.h"
|
||||
#include "Registries/CustomStatistics.h"
|
||||
|
||||
namespace Palette_1_15
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "BlockState.h"
|
||||
#include "Registries/Items.h"
|
||||
#include "Registries/Statistics.h"
|
||||
#include "Registries/CustomStatistics.h"
|
||||
|
||||
namespace Palette_1_16
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ Declares the 1.8 protocol classes:
|
||||
|
||||
#include "Protocol.h"
|
||||
#include "../ByteBuffer.h"
|
||||
#include "../Registries/Statistics.h"
|
||||
#include "../Registries/CustomStatistics.h"
|
||||
|
||||
#include "../mbedTLS++/AesCfb128Decryptor.h"
|
||||
#include "../mbedTLS++/AesCfb128Encryptor.h"
|
||||
|
@ -5,6 +5,6 @@ target_sources(
|
||||
|
||||
BlockStates.h
|
||||
BlockTypes.h
|
||||
CustomStatistics.h
|
||||
Items.h
|
||||
Statistics.h
|
||||
)
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "Statistics.h"
|
||||
#include "StatisticsManager.h"
|
||||
|
||||
|
||||
|
@ -1,10 +1,6 @@
|
||||
|
||||
// Statistics.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Registries/Statistics.h"
|
||||
|
||||
/* Hello fellow developer !
|
||||
In case you are trying to add new statistics to Cuberite you need to do a few things:
|
||||
---------------------------------------------------------------------------
|
||||
@ -24,6 +20,14 @@ exported from the server https://wiki.vg/Data_Generators
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Registries/CustomStatistics.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** Class that manages the statistics and achievements of a single player. */
|
||||
struct StatisticsManager
|
||||
{
|
@ -9,7 +9,7 @@ target_sources(
|
||||
NBTChunkSerializer.cpp
|
||||
SchematicFileSerializer.cpp
|
||||
ScoreboardSerializer.cpp
|
||||
StatSerializer.cpp
|
||||
StatisticsSerializer.cpp
|
||||
WSSAnvil.cpp
|
||||
WorldStorage.cpp
|
||||
|
||||
@ -21,7 +21,7 @@ target_sources(
|
||||
NBTChunkSerializer.h
|
||||
SchematicFileSerializer.h
|
||||
ScoreboardSerializer.h
|
||||
StatSerializer.h
|
||||
StatisticsSerializer.h
|
||||
WSSAnvil.h
|
||||
WorldStorage.h
|
||||
)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "Defines.h"
|
||||
#include "Mobs/MonsterTypes.h"
|
||||
#include "Registries/Statistics.h"
|
||||
#include "Registries/CustomStatistics.h"
|
||||
|
||||
namespace NamespaceSerializer
|
||||
{
|
||||
|
@ -1,10 +1,10 @@
|
||||
|
||||
// StatSerializer.cpp
|
||||
// StatisticsSerializer.cpp
|
||||
|
||||
|
||||
#include "Globals.h"
|
||||
#include "../Statistics.h"
|
||||
#include "StatSerializer.h"
|
||||
#include "StatisticsManager.h"
|
||||
#include "StatisticsSerializer.h"
|
||||
#include "NamespaceSerializer.h"
|
||||
|
||||
#include <json/json.h>
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
|
||||
namespace StatSerializer
|
||||
namespace StatisticsSerializer
|
||||
{
|
||||
static auto MakeStatisticsDirectory(const std::string & WorldPath, std::string && FileName)
|
||||
{
|
@ -1,5 +1,5 @@
|
||||
|
||||
// StatSerializer.h
|
||||
// StatisticsSerializer.h
|
||||
|
||||
// Declares the cStatSerializer class that is used for saving stats into JSON
|
||||
|
||||
@ -20,7 +20,7 @@ namespace Json { class Value; }
|
||||
|
||||
|
||||
|
||||
namespace StatSerializer
|
||||
namespace StatisticsSerializer
|
||||
{
|
||||
/* Try to load the player statistics. */
|
||||
void Load(StatisticsManager & Manager, const std::string & WorldPath, std::string && FileName);
|
@ -1,7 +1,7 @@
|
||||
#include "Globals.h"
|
||||
#include "../TestHelpers.h"
|
||||
#include "Bindings/BlockTypePalette.h"
|
||||
#include "Stopwatch.h"
|
||||
#include "OSSupport/Stopwatch.h"
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user