4#include "dcon_generated.hpp"
15inline ve::tagged_vector<int32_t>
to_generic(ve::tagged_vector<dcon::province_id> v) {
16 return ve::tagged_vector<int32_t>(v);
18inline ve::contiguous_tags<int32_t>
to_generic(ve::contiguous_tags<dcon::province_id> v) {
19 return ve::contiguous_tags<int32_t>(v.value);
21inline ve::unaligned_contiguous_tags<int32_t>
to_generic(ve::unaligned_contiguous_tags<dcon::province_id> v) {
22 return ve::unaligned_contiguous_tags<int32_t>(v.value);
24inline ve::partial_contiguous_tags<int32_t>
to_generic(ve::partial_contiguous_tags<dcon::province_id> v) {
25 return ve::partial_contiguous_tags<int32_t>(v.value, v.subcount);
30inline ve::tagged_vector<int32_t>
to_generic(ve::tagged_vector<dcon::nation_id> v) {
31 return ve::tagged_vector<int32_t>(v);
33inline ve::contiguous_tags<int32_t>
to_generic(ve::contiguous_tags<dcon::nation_id> v) {
34 return ve::contiguous_tags<int32_t>(v.value);
36inline ve::unaligned_contiguous_tags<int32_t>
to_generic(ve::unaligned_contiguous_tags<dcon::nation_id> v) {
37 return ve::unaligned_contiguous_tags<int32_t>(v.value);
39inline ve::partial_contiguous_tags<int32_t>
to_generic(ve::partial_contiguous_tags<dcon::nation_id> v) {
40 return ve::partial_contiguous_tags<int32_t>(v.value, v.subcount);
45inline ve::tagged_vector<int32_t>
to_generic(ve::tagged_vector<dcon::pop_id> v) {
46 return ve::tagged_vector<int32_t>(v);
48inline ve::contiguous_tags<int32_t>
to_generic(ve::contiguous_tags<dcon::pop_id> v) {
49 return ve::contiguous_tags<int32_t>(v.value);
51inline ve::unaligned_contiguous_tags<int32_t>
to_generic(ve::unaligned_contiguous_tags<dcon::pop_id> v) {
52 return ve::unaligned_contiguous_tags<int32_t>(v.value);
54inline ve::partial_contiguous_tags<int32_t>
to_generic(ve::partial_contiguous_tags<dcon::pop_id> v) {
55 return ve::partial_contiguous_tags<int32_t>(v.value, v.subcount);
60inline ve::tagged_vector<int32_t>
to_generic(ve::tagged_vector<dcon::state_instance_id> v) {
61 return ve::tagged_vector<int32_t>(v);
63inline ve::contiguous_tags<int32_t>
to_generic(ve::contiguous_tags<dcon::state_instance_id> v) {
64 return ve::contiguous_tags<int32_t>(v.value);
66inline ve::unaligned_contiguous_tags<int32_t>
to_generic(ve::unaligned_contiguous_tags<dcon::state_instance_id> v) {
67 return ve::unaligned_contiguous_tags<int32_t>(v.value);
69inline ve::partial_contiguous_tags<int32_t>
to_generic(ve::partial_contiguous_tags<dcon::state_instance_id> v) {
70 return ve::partial_contiguous_tags<int32_t>(v.value, v.subcount);
75inline ve::tagged_vector<int32_t>
to_generic(ve::tagged_vector<dcon::rebel_faction_id> v) {
76 return ve::tagged_vector<int32_t>(v);
78inline ve::contiguous_tags<int32_t>
to_generic(ve::contiguous_tags<dcon::rebel_faction_id> v) {
79 return ve::contiguous_tags<int32_t>(v.value);
81inline ve::unaligned_contiguous_tags<int32_t>
to_generic(ve::unaligned_contiguous_tags<dcon::rebel_faction_id> v) {
82 return ve::unaligned_contiguous_tags<int32_t>(v.value);
84inline ve::partial_contiguous_tags<int32_t>
to_generic(ve::partial_contiguous_tags<dcon::rebel_faction_id> v) {
85 return ve::partial_contiguous_tags<int32_t>(v.value, v.subcount);
88inline dcon::province_id
to_prov(int32_t v) {
89 return dcon::province_id(dcon::province_id::value_base_t(v));
91inline ve::tagged_vector<dcon::province_id>
to_prov(ve::tagged_vector<int32_t> v) {
92 return ve::tagged_vector<dcon::province_id>(v, std::true_type{});
94inline ve::contiguous_tags<dcon::province_id>
to_prov(ve::contiguous_tags<int32_t> v) {
95 return ve::contiguous_tags<dcon::province_id>(v.value);
97inline ve::unaligned_contiguous_tags<dcon::province_id>
to_prov(ve::unaligned_contiguous_tags<int32_t> v) {
98 return ve::unaligned_contiguous_tags<dcon::province_id>(v.value);
100inline ve::partial_contiguous_tags<dcon::province_id>
to_prov(ve::partial_contiguous_tags<int32_t> v) {
101 return ve::partial_contiguous_tags<dcon::province_id>(v.value, v.subcount);
105 return dcon::nation_id(dcon::nation_id::value_base_t(v));
107inline ve::tagged_vector<dcon::nation_id>
to_nation(ve::tagged_vector<int32_t> v) {
108 return ve::tagged_vector<dcon::nation_id>(v, std::true_type{});
110inline ve::contiguous_tags<dcon::nation_id>
to_nation(ve::contiguous_tags<int32_t> v) {
111 return ve::contiguous_tags<dcon::nation_id>(v.value);
113inline ve::unaligned_contiguous_tags<dcon::nation_id>
to_nation(ve::unaligned_contiguous_tags<int32_t> v) {
114 return ve::unaligned_contiguous_tags<dcon::nation_id>(v.value);
116inline ve::partial_contiguous_tags<dcon::nation_id>
to_nation(ve::partial_contiguous_tags<int32_t> v) {
117 return ve::partial_contiguous_tags<dcon::nation_id>(v.value, v.subcount);
121 return dcon::pop_id(dcon::pop_id::value_base_t(v));
123inline ve::tagged_vector<dcon::pop_id>
to_pop(ve::tagged_vector<int32_t> v) {
124 return ve::tagged_vector<dcon::pop_id>(v, std::true_type{});
126inline ve::contiguous_tags<dcon::pop_id>
to_pop(ve::contiguous_tags<int32_t> v) {
127 return ve::contiguous_tags<dcon::pop_id>(v.value);
129inline ve::unaligned_contiguous_tags<dcon::pop_id>
to_pop(ve::unaligned_contiguous_tags<int32_t> v) {
130 return ve::unaligned_contiguous_tags<dcon::pop_id>(v.value);
132inline ve::partial_contiguous_tags<dcon::pop_id>
to_pop(ve::partial_contiguous_tags<int32_t> v) {
133 return ve::partial_contiguous_tags<dcon::pop_id>(v.value, v.subcount);
136inline dcon::state_instance_id
to_state(int32_t v) {
137 return dcon::state_instance_id(dcon::state_instance_id::value_base_t(v));
139inline ve::tagged_vector<dcon::state_instance_id>
to_state(ve::tagged_vector<int32_t> v) {
140 return ve::tagged_vector<dcon::state_instance_id>(v, std::true_type{});
142inline ve::contiguous_tags<dcon::state_instance_id>
to_state(ve::contiguous_tags<int32_t> v) {
143 return ve::contiguous_tags<dcon::state_instance_id>(v.value);
145inline ve::unaligned_contiguous_tags<dcon::state_instance_id>
to_state(ve::unaligned_contiguous_tags<int32_t> v) {
146 return ve::unaligned_contiguous_tags<dcon::state_instance_id>(v.value);
148inline ve::partial_contiguous_tags<dcon::state_instance_id>
to_state(ve::partial_contiguous_tags<int32_t> v) {
149 return ve::partial_contiguous_tags<dcon::state_instance_id>(v.value, v.subcount);
153 return dcon::rebel_faction_id(dcon::rebel_faction_id::value_base_t(v));
155inline ve::tagged_vector<dcon::rebel_faction_id>
to_rebel(ve::tagged_vector<int32_t> v) {
156 return ve::tagged_vector<dcon::rebel_faction_id>(v, std::true_type{});
158inline ve::contiguous_tags<dcon::rebel_faction_id>
to_rebel(ve::contiguous_tags<int32_t> v) {
159 return ve::contiguous_tags<dcon::rebel_faction_id>(v.value);
161inline ve::unaligned_contiguous_tags<dcon::rebel_faction_id>
to_rebel(ve::unaligned_contiguous_tags<int32_t> v) {
162 return ve::unaligned_contiguous_tags<dcon::rebel_faction_id>(v.value);
164inline ve::partial_contiguous_tags<dcon::rebel_faction_id>
to_rebel(ve::partial_contiguous_tags<int32_t> v) {
165 return ve::partial_contiguous_tags<dcon::rebel_faction_id>(v.value, v.subcount);
184 ve::tagged_vector<int32_t> this_slot, int32_t from_slot);
186 ve::tagged_vector<int32_t> this_slot, int32_t from_slot);
188 ve::tagged_vector<int32_t> this_slot, int32_t from_slot);
190 ve::tagged_vector<int32_t> this_slot, int32_t from_slot);
192 ve::contiguous_tags<int32_t> this_slot, int32_t from_slot);
194 ve::contiguous_tags<int32_t> this_slot, int32_t from_slot);
int32_t to_generic(dcon::province_id v)
dcon::state_instance_id to_state(int32_t v)
dcon::pop_id to_pop(int32_t v)
dcon::province_id to_prov(int32_t v)
int32_t read_int32_t_from_payload(uint16_t const *data)
bool evaluate(sys::state &state, dcon::trigger_key key, int32_t primary, int32_t this_slot, int32_t from_slot)
dcon::rebel_faction_id to_rebel(int32_t v)
float read_float_from_payload(uint16_t const *data)
float evaluate_additive_modifier(sys::state &state, dcon::value_modifier_key modifier, int32_t primary, int32_t this_slot, int32_t from_slot)
dcon::nation_id to_nation(int32_t v)
ve::fp_vector evaluate_purely_additive_modifier(sys::state &state, dcon::value_modifier_key modifier, ve::contiguous_tags< int32_t > primary, ve::tagged_vector< int32_t > this_slot, int32_t from_slot)
float evaluate_multiplicative_modifier(sys::state &state, dcon::value_modifier_key modifier, int32_t primary, int32_t this_slot, int32_t from_slot)