|
OpenTTD Source
14.0-beta3
|
#include "../stdafx.h"#include "network_survey.h"#include "settings_table.h"#include "network.h"#include "network_func.h"#include "../debug.h"#include "../survey.h"#include "../3rdparty/fmt/chrono.h"#include "../3rdparty/fmt/std.h"#include "../safeguards.h"Go to the source code of this file.
Functions | |
| NLOHMANN_JSON_SERIALIZE_ENUM (NetworkSurveyHandler::Reason, { {NetworkSurveyHandler::Reason::PREVIEW, "preview"}, {NetworkSurveyHandler::Reason::LEAVE, "leave"}, {NetworkSurveyHandler::Reason::EXIT, "exit"}, {NetworkSurveyHandler::Reason::CRASH, "crash"}, }) std | |
| Create the payload for the survey. More... | |
Variables | |
| std::string | _savegame_id |
| Unique ID of the current savegame. | |
| NetworkSurveyHandler | _survey = {} |
Opt-in survey part of the network protocol.
Definition in file network_survey.cpp.
| NLOHMANN_JSON_SERIALIZE_ENUM | ( | NetworkSurveyHandler::Reason | , |
| { {NetworkSurveyHandler::Reason::PREVIEW, "preview"}, {NetworkSurveyHandler::Reason::LEAVE, "leave"}, {NetworkSurveyHandler::Reason::EXIT, "exit"}, {NetworkSurveyHandler::Reason::CRASH, "crash"}, } | |||
| ) |
Create the payload for the survey.
| reason | The reason for sending the survey. |
| for_preview | Whether the payload is meant for preview. This indents the result, and filters out the id/key. |
Definition at line 26 of file network_survey.cpp.
References NetworkSurveyHandler::CRASH, NetworkSurveyHandler::EXIT, NetworkSurveyHandler::LEAVE, and NetworkSurveyHandler::PREVIEW.