Project Alice
Loading...
Searching...
No Matches
notifications.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "container_types.hpp"
4#include "text.hpp"
5
6namespace notification {
7
8struct message {
9 std::function<void(sys::state&, text::layout_base&)> body;
10 char const* title = nullptr;
11 dcon::nation_id source; // which nation caused the notification to be sent
12 dcon::nation_id target; // which nation is primarily affected by the event (if != source)
13 dcon::nation_id third; // a secondary nation affected by the event
15};
16
17void post(sys::state& state, message&& m);
18bool nation_is_interesting(sys::state& state, dcon::nation_id n);
19
20} // namespace notification
void post(sys::state &state, message &&m)
bool nation_is_interesting(sys::state &state, dcon::nation_id n)
message_base_type
Definition: constants.hpp:333
dcon::nation_id source
std::function< void(sys::state &, text::layout_base &)> body
dcon::nation_id third
sys::message_base_type type
dcon::nation_id target