Add missing files
This commit is contained in:
17
src/citymania/cm_survey.cpp
Normal file
17
src/citymania/cm_survey.cpp
Normal 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
|
||||
12
src/citymania/cm_survey.hpp
Normal file
12
src/citymania/cm_survey.hpp
Normal 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
|
||||
17
src/citymania/extensions/cmext_game_session_stats.hpp
Normal file
17
src/citymania/extensions/cmext_game_session_stats.hpp
Normal 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
|
||||
Reference in New Issue
Block a user