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

Classes

struct  event_nation_pair
 
struct  event_prov_pair
 
struct  internal_n_epair
 
struct  internal_p_epair
 
struct  pending_human_f_n_event
 
struct  pending_human_f_p_event
 
struct  pending_human_n_event
 
struct  pending_human_p_event
 

Enumerations

enum class  slot_type : uint8_t {
  none , nation , state , province ,
  pop
}
 

Functions

bool is_valid_option (sys::event_option const &opt)
 
void take_option (sys::state &state, pending_human_n_event const &e, uint8_t opt)
 
void take_option (sys::state &state, pending_human_f_n_event const &e, uint8_t opt)
 
void take_option (sys::state &state, pending_human_p_event const &e, uint8_t opt)
 
void take_option (sys::state &state, pending_human_f_p_event const &e, uint8_t opt)
 
template<typename T >
bool event_has_options (sys::state &state, T id)
 
void trigger_national_event (sys::state &state, dcon::national_event_id e, dcon::nation_id n, uint32_t r_lo, uint32_t r_hi, int32_t primary_slot, slot_type pt, int32_t from_slot, slot_type ft)
 
void trigger_national_event (sys::state &state, dcon::national_event_id e, dcon::nation_id n, uint32_t r_hi, uint32_t r_lo, int32_t from_slot, slot_type ft)
 
void trigger_national_event (sys::state &state, dcon::free_national_event_id e, dcon::nation_id n, uint32_t r_lo, uint32_t r_hi)
 
void trigger_provincial_event (sys::state &state, dcon::provincial_event_id e, dcon::province_id p, uint32_t r_hi, uint32_t r_lo, int32_t from_slot, slot_type ft)
 
void trigger_provincial_event (sys::state &state, dcon::free_provincial_event_id e, dcon::province_id p, uint32_t r_hi, uint32_t r_lo)
 
bool would_be_duplicate_instance (sys::state &state, dcon::national_event_id e, dcon::nation_id n, sys::date date)
 
void update_future_events (sys::state &state)
 
void update_events (sys::state &state)
 
void fire_fixed_event (sys::state &state, std::vector< nations::fixed_event > const &v, int32_t primary_slot, slot_type pt, dcon::nation_id this_slot, int32_t from_slot, slot_type ft)
 
void fire_fixed_event (sys::state &state, std::vector< nations::fixed_election_event > const &v, int32_t primary_slot, slot_type pt, dcon::nation_id this_slot, int32_t from_slot, slot_type ft)
 
void fire_fixed_event (sys::state &state, std::vector< nations::fixed_province_event > const &v, dcon::province_id prov, int32_t from_slot, slot_type ft)
 
dcon::issue_id get_election_event_issue (sys::state &state, dcon::national_event_id e)
 

Variables

constexpr int32_t expiration_in_days = 30
 

Enumeration Type Documentation

◆ slot_type

enum class event::slot_type : uint8_t
strong
Enumerator
none 
nation 
state 
province 
pop 

Definition at line 11 of file events.hpp.

Function Documentation

◆ event_has_options()

template<typename T >
bool event::event_has_options ( sys::state state,
id 
)

Definition at line 98 of file events.cpp.

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

◆ fire_fixed_event() [1/3]

void event::fire_fixed_event ( sys::state state,
std::vector< nations::fixed_election_event > const &  v,
int32_t  primary_slot,
slot_type  pt,
dcon::nation_id  this_slot,
int32_t  from_slot,
slot_type  ft 
)

Definition at line 731 of file events.cpp.

Here is the call graph for this function:

◆ fire_fixed_event() [2/3]

void event::fire_fixed_event ( sys::state state,
std::vector< nations::fixed_event > const &  v,
int32_t  primary_slot,
slot_type  pt,
dcon::nation_id  this_slot,
int32_t  from_slot,
slot_type  ft 
)

Definition at line 709 of file events.cpp.

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

◆ fire_fixed_event() [3/3]

void event::fire_fixed_event ( sys::state state,
std::vector< nations::fixed_province_event > const &  v,
dcon::province_id  prov,
int32_t  from_slot,
slot_type  ft 
)

Definition at line 758 of file events.cpp.

Here is the call graph for this function:

◆ get_election_event_issue()

dcon::issue_id event::get_election_event_issue ( sys::state state,
dcon::national_event_id  e 
)

Definition at line 787 of file events.cpp.

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

◆ is_valid_option()

bool event::is_valid_option ( sys::event_option const &  opt)

Definition at line 10 of file events.cpp.

Here is the caller graph for this function:

◆ take_option() [1/4]

void event::take_option ( sys::state state,
pending_human_f_n_event const &  e,
uint8_t  opt 
)

Definition at line 36 of file events.cpp.

Here is the call graph for this function:

◆ take_option() [2/4]

void event::take_option ( sys::state state,
pending_human_f_p_event const &  e,
uint8_t  opt 
)

Definition at line 77 of file events.cpp.

Here is the call graph for this function:

◆ take_option() [3/4]

void event::take_option ( sys::state state,
pending_human_n_event const &  e,
uint8_t  opt 
)

Definition at line 14 of file events.cpp.

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

◆ take_option() [4/4]

void event::take_option ( sys::state state,
pending_human_p_event const &  e,
uint8_t  opt 
)

Definition at line 56 of file events.cpp.

Here is the call graph for this function:

◆ trigger_national_event() [1/3]

void event::trigger_national_event ( sys::state state,
dcon::free_national_event_id  e,
dcon::nation_id  n,
uint32_t  r_lo,
uint32_t  r_hi 
)

Definition at line 204 of file events.cpp.

Here is the call graph for this function:

◆ trigger_national_event() [2/3]

void event::trigger_national_event ( sys::state state,
dcon::national_event_id  e,
dcon::nation_id  n,
uint32_t  r_hi,
uint32_t  r_lo,
int32_t  from_slot,
slot_type  ft 
)

Definition at line 201 of file events.cpp.

Here is the call graph for this function:

◆ trigger_national_event() [3/3]

void event::trigger_national_event ( sys::state state,
dcon::national_event_id  e,
dcon::nation_id  n,
uint32_t  r_lo,
uint32_t  r_hi,
int32_t  primary_slot,
slot_type  pt,
int32_t  from_slot,
slot_type  ft 
)

Definition at line 109 of file events.cpp.

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

◆ trigger_provincial_event() [1/2]

void event::trigger_provincial_event ( sys::state state,
dcon::free_provincial_event_id  e,
dcon::province_id  p,
uint32_t  r_hi,
uint32_t  r_lo 
)

Definition at line 364 of file events.cpp.

Here is the call graph for this function:

◆ trigger_provincial_event() [2/2]

void event::trigger_provincial_event ( sys::state state,
dcon::provincial_event_id  e,
dcon::province_id  p,
uint32_t  r_hi,
uint32_t  r_lo,
int32_t  from_slot,
slot_type  ft 
)

Definition at line 295 of file events.cpp.

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

◆ update_events()

void event::update_events ( sys::state state)

Definition at line 517 of file events.cpp.

Here is the caller graph for this function:

◆ update_future_events()

void event::update_future_events ( sys::state state)

Definition at line 473 of file events.cpp.

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

◆ would_be_duplicate_instance()

bool event::would_be_duplicate_instance ( sys::state state,
dcon::national_event_id  e,
dcon::nation_id  n,
sys::date  date 
)

Definition at line 459 of file events.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ expiration_in_days

constexpr int32_t event::expiration_in_days = 30
inlineconstexpr

Definition at line 9 of file events.hpp.