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
4
namespace
notification
{
5
6
void
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
17
bool
nation_is_interesting
(
sys::state
& state, dcon::nation_id n) {
18
return
state.world.nation_get_is_interesting(n);
19
}
20
21
}
// namespace notification
assert
#define assert(condition)
Definition:
debug.h:74
notification
Definition:
notifications.cpp:4
notification::post
void post(sys::state &state, message &&m)
Definition:
notifications.cpp:6
notification::nation_is_interesting
bool nation_is_interesting(sys::state &state, dcon::nation_id n)
Definition:
notifications.cpp:17
notifications.hpp
notification::message
Definition:
notifications.hpp:8
sys::state
Definition:
system_state.hpp:472
system_state.hpp
src
gamestate
notifications.cpp
Generated by
1.9.5