Add missing files

This commit is contained in:
dP
2024-03-19 03:21:58 +07:00
parent 34e8262283
commit b1e4eccf4f
3 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#include "../stdafx.h"
#include "cm_survey.hpp"
#include "../openttd.h"
#include "../safeguards.h"
namespace citymania {
void SurveyGameSession(nlohmann::json &survey) {
for (auto& [key, value]: _game_session_stats.cm.hotkeys) {
survey["cm_hotkeys"][key] = value;
}
}
} // namespace citymania

View File

@@ -0,0 +1,12 @@
#ifndef CMEXT_SURVEY_HPP
#define CMEXT_SURVEY_HPP
#include "3rdparty/nlohmann/json.hpp"
namespace citymania {
void SurveyGameSession(nlohmann::json &survey);
} // namespace citymania
#endif

View File

@@ -0,0 +1,17 @@
#ifndef CMEXT_GAME_SESSION_STATS_HPP
#define CMEXT_GAME_SESSION_STATS_HPP
namespace citymania {
namespace ext {
class GameSessionStats {
public:
std::map<std::string, uint> hotkeys;
};
} // namespace ext
} // namespace citymania
#endif