mirror of
https://github.com/cuberite/cuberite.git
synced 2025-01-07 03:16:55 +08:00
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
|
Mobs/MonsterTypes.h
|
||||||
OSSupport/File.h
|
OSSupport/File.h
|
||||||
Protocol/MojangAPI.h
|
Protocol/MojangAPI.h
|
||||||
Registries/Statistics.h
|
Registries/CustomStatistics.h
|
||||||
Root.h
|
Root.h
|
||||||
Scoreboard.h
|
Scoreboard.h
|
||||||
Server.h
|
Server.h
|
||||||
Statistics.h
|
StatisticsManager.h
|
||||||
StringUtils.h
|
StringUtils.h
|
||||||
UI/Window.h
|
UI/Window.h
|
||||||
UUID.h
|
UUID.h
|
||||||
|
@ -46,7 +46,7 @@ Here are the conventions:
|
|||||||
- `Foo(Vector3d a_Param1, const cCuboid & a_Param2)`
|
- `Foo(Vector3d a_Param1, const cCuboid & a_Param2)`
|
||||||
- See the discussion in issue #3853
|
- See the discussion in issue #3853
|
||||||
- Use the provided wrappers for OS stuff:
|
- 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:
|
- No magic numbers, use named constants:
|
||||||
- `E_ITEM_XXX`, `E_BLOCK_XXX` and `E_META_XXX` for items and blocks.
|
- `E_ITEM_XXX`, `E_BLOCK_XXX` and `E_META_XXX` for items and blocks.
|
||||||
- `cEntity::etXXX` for entity types, `cMonster::mtXXX` for mob types.
|
- `cEntity::etXXX` for entity types, `cMonster::mtXXX` for mob types.
|
||||||
|
@ -68,7 +68,7 @@ $cfile "../CompositeChat.h"
|
|||||||
$cfile "../Map.h"
|
$cfile "../Map.h"
|
||||||
$cfile "../MapManager.h"
|
$cfile "../MapManager.h"
|
||||||
$cfile "../Scoreboard.h"
|
$cfile "../Scoreboard.h"
|
||||||
$cfile "../Statistics.h"
|
$cfile "../StatisticsManager.h"
|
||||||
$cfile "../Protocol/MojangAPI.h"
|
$cfile "../Protocol/MojangAPI.h"
|
||||||
$cfile "../UUID.h"
|
$cfile "../UUID.h"
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ $cfile "../BlockEntities/MobSpawnerEntity.h"
|
|||||||
$cfile "../BlockEntities/FlowerPotEntity.h"
|
$cfile "../BlockEntities/FlowerPotEntity.h"
|
||||||
|
|
||||||
// Registries:
|
// Registries:
|
||||||
$cfile "../Registries/Statistics.h"
|
$cfile "../Registries/CustomStatistics.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ extern "C"
|
|||||||
|
|
||||||
#include "../Defines.h"
|
#include "../Defines.h"
|
||||||
#include "../FunctionRef.h"
|
#include "../FunctionRef.h"
|
||||||
#include "../Registries/Statistics.h"
|
#include "../Registries/CustomStatistics.h"
|
||||||
#include "PluginManager.h"
|
#include "PluginManager.h"
|
||||||
#include "LuaState_Typedefs.inc"
|
#include "LuaState_Typedefs.inc"
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ target_sources(
|
|||||||
Scoreboard.cpp
|
Scoreboard.cpp
|
||||||
Server.cpp
|
Server.cpp
|
||||||
SpawnPrepare.cpp
|
SpawnPrepare.cpp
|
||||||
Statistics.cpp
|
StatisticsManager.cpp
|
||||||
StringCompression.cpp
|
StringCompression.cpp
|
||||||
StringUtils.cpp
|
StringUtils.cpp
|
||||||
UUID.cpp
|
UUID.cpp
|
||||||
@ -138,8 +138,7 @@ target_sources(
|
|||||||
SetChunkData.h
|
SetChunkData.h
|
||||||
SettingsRepositoryInterface.h
|
SettingsRepositoryInterface.h
|
||||||
SpawnPrepare.h
|
SpawnPrepare.h
|
||||||
Statistics.h
|
StatisticsManager.h
|
||||||
Stopwatch.h
|
|
||||||
StringCompression.h
|
StringCompression.h
|
||||||
StringUtils.h
|
StringUtils.h
|
||||||
UUID.h
|
UUID.h
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "../FastRandom.h"
|
#include "../FastRandom.h"
|
||||||
#include "../ClientHandle.h"
|
#include "../ClientHandle.h"
|
||||||
|
|
||||||
#include "../WorldStorage/StatSerializer.h"
|
#include "../WorldStorage/StatisticsSerializer.h"
|
||||||
#include "../CompositeChat.h"
|
#include "../CompositeChat.h"
|
||||||
|
|
||||||
#include "../Blocks/BlockHandler.h"
|
#include "../Blocks/BlockHandler.h"
|
||||||
@ -1925,7 +1925,7 @@ bool cPlayer::LoadFromFile(const AString & a_FileName)
|
|||||||
{
|
{
|
||||||
// Load the player stats.
|
// Load the player stats.
|
||||||
// We use the default world name (like bukkit) because stats are shared between dimensions / worlds.
|
// 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 (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
@ -2059,7 +2059,7 @@ void cPlayer::SaveToDisk()
|
|||||||
// Save the player stats.
|
// Save the player stats.
|
||||||
// We use the default world name (like bukkit) because stats are shared between dimensions / worlds.
|
// 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.
|
// 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 (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "../World.h"
|
#include "../World.h"
|
||||||
#include "../Items/ItemHandler.h"
|
#include "../Items/ItemHandler.h"
|
||||||
|
|
||||||
#include "../Statistics.h"
|
#include "../StatisticsManager.h"
|
||||||
|
|
||||||
#include "../UUID.h"
|
#include "../UUID.h"
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ target_sources(
|
|||||||
SleepResolutionBooster.h
|
SleepResolutionBooster.h
|
||||||
StackTrace.h
|
StackTrace.h
|
||||||
StartAsService.h
|
StartAsService.h
|
||||||
|
Stopwatch.h
|
||||||
TCPLinkImpl.h
|
TCPLinkImpl.h
|
||||||
UDPEndpointImpl.h
|
UDPEndpointImpl.h
|
||||||
WinStackWalker.h
|
WinStackWalker.h
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "BlockState.h"
|
#include "BlockState.h"
|
||||||
#include "Registries/Items.h"
|
#include "Registries/Items.h"
|
||||||
#include "Registries/Statistics.h"
|
#include "Registries/CustomStatistics.h"
|
||||||
|
|
||||||
namespace Palette_1_13
|
namespace Palette_1_13
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "BlockState.h"
|
#include "BlockState.h"
|
||||||
#include "Registries/Items.h"
|
#include "Registries/Items.h"
|
||||||
#include "Registries/Statistics.h"
|
#include "Registries/CustomStatistics.h"
|
||||||
|
|
||||||
namespace Palette_1_13_1
|
namespace Palette_1_13_1
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "BlockState.h"
|
#include "BlockState.h"
|
||||||
#include "Registries/Items.h"
|
#include "Registries/Items.h"
|
||||||
#include "Registries/Statistics.h"
|
#include "Registries/CustomStatistics.h"
|
||||||
|
|
||||||
namespace Palette_1_14
|
namespace Palette_1_14
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "BlockState.h"
|
#include "BlockState.h"
|
||||||
#include "Registries/Items.h"
|
#include "Registries/Items.h"
|
||||||
#include "Registries/Statistics.h"
|
#include "Registries/CustomStatistics.h"
|
||||||
|
|
||||||
namespace Palette_1_15
|
namespace Palette_1_15
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "BlockState.h"
|
#include "BlockState.h"
|
||||||
#include "Registries/Items.h"
|
#include "Registries/Items.h"
|
||||||
#include "Registries/Statistics.h"
|
#include "Registries/CustomStatistics.h"
|
||||||
|
|
||||||
namespace Palette_1_16
|
namespace Palette_1_16
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ Declares the 1.8 protocol classes:
|
|||||||
|
|
||||||
#include "Protocol.h"
|
#include "Protocol.h"
|
||||||
#include "../ByteBuffer.h"
|
#include "../ByteBuffer.h"
|
||||||
#include "../Registries/Statistics.h"
|
#include "../Registries/CustomStatistics.h"
|
||||||
|
|
||||||
#include "../mbedTLS++/AesCfb128Decryptor.h"
|
#include "../mbedTLS++/AesCfb128Decryptor.h"
|
||||||
#include "../mbedTLS++/AesCfb128Encryptor.h"
|
#include "../mbedTLS++/AesCfb128Encryptor.h"
|
||||||
|
@ -5,6 +5,6 @@ target_sources(
|
|||||||
|
|
||||||
BlockStates.h
|
BlockStates.h
|
||||||
BlockTypes.h
|
BlockTypes.h
|
||||||
|
CustomStatistics.h
|
||||||
Items.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 "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
|
// Statistics.h
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Registries/Statistics.h"
|
|
||||||
|
|
||||||
/* Hello fellow developer !
|
/* Hello fellow developer !
|
||||||
In case you are trying to add new statistics to Cuberite you need to do a few things:
|
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. */
|
/** Class that manages the statistics and achievements of a single player. */
|
||||||
struct StatisticsManager
|
struct StatisticsManager
|
||||||
{
|
{
|
@ -9,7 +9,7 @@ target_sources(
|
|||||||
NBTChunkSerializer.cpp
|
NBTChunkSerializer.cpp
|
||||||
SchematicFileSerializer.cpp
|
SchematicFileSerializer.cpp
|
||||||
ScoreboardSerializer.cpp
|
ScoreboardSerializer.cpp
|
||||||
StatSerializer.cpp
|
StatisticsSerializer.cpp
|
||||||
WSSAnvil.cpp
|
WSSAnvil.cpp
|
||||||
WorldStorage.cpp
|
WorldStorage.cpp
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ target_sources(
|
|||||||
NBTChunkSerializer.h
|
NBTChunkSerializer.h
|
||||||
SchematicFileSerializer.h
|
SchematicFileSerializer.h
|
||||||
ScoreboardSerializer.h
|
ScoreboardSerializer.h
|
||||||
StatSerializer.h
|
StatisticsSerializer.h
|
||||||
WSSAnvil.h
|
WSSAnvil.h
|
||||||
WorldStorage.h
|
WorldStorage.h
|
||||||
)
|
)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Defines.h"
|
#include "Defines.h"
|
||||||
#include "Mobs/MonsterTypes.h"
|
#include "Mobs/MonsterTypes.h"
|
||||||
#include "Registries/Statistics.h"
|
#include "Registries/CustomStatistics.h"
|
||||||
|
|
||||||
namespace NamespaceSerializer
|
namespace NamespaceSerializer
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
// StatSerializer.cpp
|
// StatisticsSerializer.cpp
|
||||||
|
|
||||||
|
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "../Statistics.h"
|
#include "StatisticsManager.h"
|
||||||
#include "StatSerializer.h"
|
#include "StatisticsSerializer.h"
|
||||||
#include "NamespaceSerializer.h"
|
#include "NamespaceSerializer.h"
|
||||||
|
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace StatSerializer
|
namespace StatisticsSerializer
|
||||||
{
|
{
|
||||||
static auto MakeStatisticsDirectory(const std::string & WorldPath, std::string && FileName)
|
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
|
// 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. */
|
/* Try to load the player statistics. */
|
||||||
void Load(StatisticsManager & Manager, const std::string & WorldPath, std::string && FileName);
|
void Load(StatisticsManager & Manager, const std::string & WorldPath, std::string && FileName);
|
@ -1,7 +1,7 @@
|
|||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "../TestHelpers.h"
|
#include "../TestHelpers.h"
|
||||||
#include "Bindings/BlockTypePalette.h"
|
#include "Bindings/BlockTypePalette.h"
|
||||||
#include "Stopwatch.h"
|
#include "OSSupport/Stopwatch.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user