Skip to content

Commit

Permalink
fix #2683 step2
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Mar 23, 2018
1 parent 8f00db6 commit ef9580f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/synced_commands.cpp
Expand Up @@ -32,6 +32,7 @@
#include "units/helper.hpp"
#include "recall_list_manager.hpp"
#include "resources.hpp"
#include "savegame.hpp"
#include "scripting/game_lua_kernel.hpp"
#include "formula/string_utils.hpp"
#include "units/types.hpp"
Expand Down Expand Up @@ -396,8 +397,12 @@ namespace

if(show_long_message && !ignore) {
play_controller::scoped_savegame_snapshot snapshot(controller);
auto& gamestate = controller.gamestate();
//TODO: implement by copying oos_savegame
std::stringstream message;
// TODO: improve message and mark translatable.
message << "The game detected the use of a debug command, maybe another player is cheating";
message << "\n\n" << "details:" << "\n\n" << message;
savegame::oos_savegame save(controller.gamestate(), ignore);
save.save_game_interactive(message.str(), savegame::savegame::YES_NO); // can throw quit_game_exception
}
else {
utils::string_map symbols;
Expand Down

0 comments on commit ef9580f

Please sign in to comment.