Project Alice
Loading...
Searching...
No Matches
diplomatic_messages.hpp File Reference
#include "dcon_generated.hpp"
#include "system_state.hpp"
#include "container_types.hpp"
Include dependency graph for diplomatic_messages.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  diplomatic_message::message
 Holds data regarding a diplomatic message between two specified nations at a certain date, whether it be an alliance request, peace offer, calling an ally, etc. Also contains other optional data such as a pertinent war, crisis, state, etc. More...
 
union  diplomatic_message::message::dtype
 

Namespaces

namespace  diplomatic_message
 

Typedefs

using diplomatic_message::type = type_t
 

Enumerations

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

Functions

bool diplomatic_message::can_accept_crisis_offer (sys::state &state, dcon::nation_id from, dcon::nation_id to, sys::full_wg 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)
 
bool diplomatic_message::ai_will_accept (sys::state &state, message const &m)
 Returns the appropriate acceptance evaluation for a given diplomatic message. It is required to define a new case and method for new diplomatic requests. More...
 
void diplomatic_message::decline (sys::state &state, message const &m)
 
void diplomatic_message::accept (sys::state &state, message const &m)
 
bool diplomatic_message::can_accept (sys::state &state, message const &m)
 
void diplomatic_message::post (sys::state &state, message const &m)
 Pushes a diplomatic message to the list of pending diplomatic requests for the specified recipient (m.to), will simply skip and evaluate a response immediately if the recipient is AI-controlled. More...
 
void diplomatic_message::update_pending (sys::state &state)
 

Variables

constexpr int32_t diplomatic_message::expiration_in_days = 15