mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Player data to Database (#5475)
* Player data to Database Add player data into databases (SQLite3 & PG only) PostgreSQL & SQLite: better POO Design for databases Add --migrate-players argument to server + deprecation warning * Remove players directory if empty
This commit is contained in:
@@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "database.h"
|
||||
#include "irrlichttypes.h"
|
||||
|
||||
class Database_Dummy : public Database
|
||||
class Database_Dummy : public MapDatabase, public PlayerDatabase
|
||||
{
|
||||
public:
|
||||
bool saveBlock(const v3s16 &pos, const std::string &data);
|
||||
@@ -33,6 +33,13 @@ public:
|
||||
bool deleteBlock(const v3s16 &pos);
|
||||
void listAllLoadableBlocks(std::vector<v3s16> &dst);
|
||||
|
||||
void savePlayer(RemotePlayer *player) {}
|
||||
bool loadPlayer(RemotePlayer *player, PlayerSAO *sao) { return true; }
|
||||
bool removePlayer(const std::string &name) { return true; }
|
||||
void listPlayers(std::vector<std::string> &) {}
|
||||
|
||||
void beginSave() {}
|
||||
void endSave() {}
|
||||
private:
|
||||
std::map<s64, std::string> m_database;
|
||||
};
|
||||
|
Reference in New Issue
Block a user