Project Alice
Loading...
Searching...
No Matches
diplomatic_message Namespace Reference

Classes

struct  message
 

Typedefs

using type = type_t
 

Enumerations

enum class  type_t : uint8_t {
  none = 0 , access_request = 1 , alliance_request = 2 , call_ally_request = 3 ,
  be_crisis_primary_defender = 4 , be_crisis_primary_attacker = 5 , peace_offer = 6 , take_crisis_side_offer = 7 ,
  crisis_peace_offer = 8 , state_transfer = 9
}
 

Functions

void decline (sys::state &state, message const &m)
 
bool can_accept_crisis_offer (sys::state &state, dcon::nation_id from, dcon::nation_id to, sys::crisis_join_offer const &offer)
 
void add_to_crisis_with_offer (sys::state &state, dcon::nation_id from, dcon::nation_id to, sys::crisis_join_offer const &offer)
 
bool can_accept_crisis_peace_offer (sys::state &state, dcon::nation_id from, dcon::nation_id to, dcon::peace_offer_id peace)
 
bool can_accept (sys::state &state, message const &m)
 
void accept (sys::state &state, message const &m)
 
bool ai_will_accept (sys::state &state, message const &m)
 
void post (sys::state &state, message const &m)
 
void update_pending (sys::state &state)
 

Variables

constexpr int32_t expiration_in_days = 15
 

Typedef Documentation

◆ type

Definition at line 49 of file diplomatic_messages.hpp.

Enumeration Type Documentation

◆ type_t

enum class diplomatic_message::type_t : uint8_t
strong
Enumerator
none 
access_request 
alliance_request 
call_ally_request 
be_crisis_primary_defender 
be_crisis_primary_attacker 
peace_offer 
take_crisis_side_offer 
crisis_peace_offer 
state_transfer 

Definition at line 10 of file diplomatic_messages.hpp.

Function Documentation

◆ accept()

void diplomatic_message::accept ( sys::state state,
message const &  m 
)

Definition at line 298 of file diplomatic_messages.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_to_crisis_with_offer()

void diplomatic_message::add_to_crisis_with_offer ( sys::state state,
dcon::nation_id  from,
dcon::nation_id  to,
sys::crisis_join_offer const &  offer 
)

Definition at line 187 of file diplomatic_messages.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ai_will_accept()

bool diplomatic_message::ai_will_accept ( sys::state state,
message const &  m 
)

Definition at line 396 of file diplomatic_messages.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ can_accept()

bool diplomatic_message::can_accept ( sys::state state,
message const &  m 
)

Definition at line 274 of file diplomatic_messages.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ can_accept_crisis_offer()

bool diplomatic_message::can_accept_crisis_offer ( sys::state state,
dcon::nation_id  from,
dcon::nation_id  to,
sys::crisis_join_offer const &  offer 
)

Definition at line 136 of file diplomatic_messages.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ can_accept_crisis_peace_offer()

bool diplomatic_message::can_accept_crisis_peace_offer ( sys::state state,
dcon::nation_id  from,
dcon::nation_id  to,
dcon::peace_offer_id  peace 
)

Definition at line 206 of file diplomatic_messages.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decline()

void diplomatic_message::decline ( sys::state state,
message const &  m 
)

Definition at line 9 of file diplomatic_messages.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ post()

void diplomatic_message::post ( sys::state state,
message const &  m 
)

Definition at line 428 of file diplomatic_messages.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_pending()

void diplomatic_message::update_pending ( sys::state state)

Definition at line 452 of file diplomatic_messages.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ expiration_in_days

constexpr int32_t diplomatic_message::expiration_in_days = 15
inlineconstexpr

Definition at line 8 of file diplomatic_messages.hpp.