game: add discoveries to news

This commit is contained in:
Crypto City 2022-07-11 10:50:34 +00:00
parent 74a3dd463d
commit 79dd5c05c7
2 changed files with 8 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -118,6 +118,14 @@ void UINewsDialog::UpdateFilter(const std::shared_ptr<GameWallet> &w)
event = game->get_player_name(e.account) + " joined the game";
icon = "images/new-settler.png";
}
if (e.cmd == get_cc_tag<uint8_t>(cryptonote::cc_command_research_t()))
{
if (boost::starts_with(e.event, "Discovered "))
{
event = game->get_player_name(e.account) + " d" + e.event.substr(1);
icon = "images/discovery.png";
}
}
}
if (icon.empty() && filter_buildings && !e.flags.empty())
{