From 34bf5c0d9db195edf8b576d1273876966cf650b2 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 4 May 2021 16:11:56 +0100 Subject: Rename files to match code --- src/Statistics.h | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 src/Statistics.h (limited to 'src/Statistics.h') diff --git a/src/Statistics.h b/src/Statistics.h deleted file mode 100644 index 38d2f0f7e..000000000 --- a/src/Statistics.h +++ /dev/null @@ -1,43 +0,0 @@ - -// 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: ---------------------------------------------------------------------------- -1. add a new entry to the enum class Statistic in Registries\Statistics.h file -2. add this to serialization functions in WorldStorage\NamespaceSerializer.cpp - The String in the above is used for saving on disk! - so use the same string! - -In case you want to add a mapping of network IDs to the used stats -you will find a lua script in ../Tools/BlockTypePaletteGenerator/ExportStatMapping.lua -it will provide you with information how to use it. you need a registries.json -exported from the server https://wiki.vg/Data_Generators - - Greetings 12xx12 */ - - - - - -/** Class that manages the statistics and achievements of a single player. */ -struct StatisticsManager -{ - typedef unsigned StatValue; - - // TODO: Block tallies, entities killed, all the others - - std::unordered_map Custom; - - /** Returns whether the prerequisite for awarding an achievement are satisfied. */ - bool SatisfiesPrerequisite(CustomStatistic a_Stat) const; - -private: - - /** Returns if a statistic is both present and has nonzero value. */ - bool IsStatisticPresent(CustomStatistic a_Stat) const; -}; -- cgit v1.2.3