Project Alice
Loading...
Searching...
No Matches
notifications.cpp
Go to the documentation of this file.
1#include "notifications.hpp"
2#include "system_state.hpp"
3
4namespace notification {
5
6void post(sys::state& state, message&& m) {
7 //
8 // TODO: pre filter out any messages that the player is not interested in at all according to their message settings.
9 // But, probably don't try to fiter out by "interesting" except for considering whether the player nation is itself involved
10 // as that will probably be a more computationally expensive check
11 //
12
13 bool v = state.new_messages.try_emplace(std::move(m));
14 assert(v);
15}
16
17bool nation_is_interesting(sys::state& state, dcon::nation_id n) {
18 return state.world.nation_get_is_interesting(n);
19}
20
21} // namespace notification
#define assert(condition)
Definition: debug.h:74
void post(sys::state &state, message &&m)
bool nation_is_interesting(sys::state &state, dcon::nation_id n)