2#include "dcon_generated.hpp"
15namespace effect_tooltip {
19#define EFFECT_DISPLAY_PARAMS \
20 sys::state &ws, uint16_t const *tval, text::layout_base &layout, int32_t primary_slot, int32_t this_slot, int32_t from_slot, \
21 uint32_t r_lo, uint32_t r_hi, int32_t indentation
35 if(
auto n = ws.
world.province_get_nation_from_province_ownership(p); n)
42 if(
auto n = ws.
world.state_instance_get_nation_from_state_ownership(p); n)
56 auto fp = fatten(ws.
world, p);
57 if(
auto n = fp.get_defection_target().get_nation_from_identity_holder(); n)
71 if(
auto n = ws.
world.province_get_nation_from_province_ownership(p); n)
83 while(sub_units_start < tval + source_size) {
111 if(positive_is_green)
125 if(positive_is_green)
139 if(positive_is_green)
153 if(positive_is_green)
167 if(positive_is_green)
214 return display_subeffects(ws, tval, layout, primary_slot, this_slot, from_slot, r_lo, r_hi, indentation);
222 int32_t indentation) {
256 show_limit(ws, tval, layout, primary_slot, this_slot, from_slot, indentation);
257 return display_subeffects(ws, tval, layout, primary_slot, this_slot, from_slot, r_lo, r_hi, indentation + 1);
263 show_limit(ws, tval, layout, primary_slot, this_slot, from_slot, indentation);
264 return display_subeffects(ws, tval, layout, primary_slot, this_slot, from_slot, r_lo, r_hi, indentation + 1);
269 if(primary_slot != -1) {
270 auto neighbor_range = ws.world.province_get_province_adjacency(
trigger::to_prov(primary_slot));
272 std::vector<dcon::province_id> rlist;
276 for(
auto p : neighbor_range) {
277 auto other = p.get_connected_provinces(p.get_connected_provinces(0) ==
trigger::to_prov(primary_slot) ? 1 : 0);
279 rlist.push_back(other.id);
283 for(
auto p : neighbor_range) {
284 auto other = p.get_connected_provinces(p.get_connected_provinces(0) ==
trigger::to_prov(primary_slot) ? 1 : 0);
285 if(other.get_nation_from_province_ownership()) {
286 rlist.push_back(other.id);
291 if(rlist.size() != 0) {
294 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
303 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
310 if(primary_slot != -1) {
313 std::vector<dcon::province_id> rlist;
318 for(
auto other : neighbor_range) {
320 rlist.push_back(other);
324 for(
auto other : neighbor_range) {
325 if(
dcon::fatten(ws.world, other).get_nation_from_province_ownership()) {
326 rlist.push_back(other);
331 if(rlist.size() != 0) {
335 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
343 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
350 if(primary_slot != -1) {
353 std::vector<dcon::province_id> rlist;
358 for(
auto other : neighbor_range) {
360 rlist.push_back(other);
364 for(
auto other : neighbor_range) {
365 if(!
dcon::fatten(ws.world, other).get_nation_from_province_ownership()) {
366 rlist.push_back(other);
371 if(rlist.size() != 0) {
375 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
383 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
390 if(primary_slot != -1) {
391 auto neighbor_range = ws.world.nation_get_nation_adjacency(
trigger::to_nation(primary_slot));
392 std::vector<dcon::nation_id> rlist;
396 for(
auto p : neighbor_range) {
397 auto other = p.get_connected_nations(0) ==
trigger::to_nation(primary_slot) ? p.get_connected_nations(1)
398 : p.get_connected_nations(0);
400 rlist.push_back(other.id);
404 for(
auto p : neighbor_range) {
405 auto other = p.get_connected_nations(0) ==
trigger::to_nation(primary_slot) ? p.get_connected_nations(1)
406 : p.get_connected_nations(0);
407 rlist.push_back(other.id);
411 if(rlist.size() != 0) {
415 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
423 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
430 std::vector<dcon::nation_id> rlist;
433 for(
auto n : ws.world.in_nation) {
435 rlist.push_back(n.id);
438 for(
auto n : ws.world.in_nation) {
439 if(n.get_owned_province_count() != 0)
440 rlist.push_back(n.id);
443 if(rlist.size() != 0) {
452 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
459 std::vector<dcon::nation_id> rlist;
462 for(
auto n : ws.world.in_nation) {
464 rlist.push_back(n.id);
467 for(
auto n : ws.world.in_nation) {
469 rlist.push_back(n.id);
472 if(rlist.size() != 0) {
483 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
490 std::vector<dcon::nation_id> rlist;
493 for(
auto n : ws.world.in_nation) {
495 rlist.push_back(n.id);
498 for(
auto n : ws.world.in_nation) {
500 rlist.push_back(n.id);
503 if(rlist.size() != 0) {
513 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
523 show_limit(ws, tval, layout, primary_slot, this_slot, primary_slot, indentation);
531 show_limit(ws, tval, layout, primary_slot, primary_slot, from_slot, indentation);
546 if(primary_slot != -1) {
547 auto neighbor_range = ws.world.province_get_province_adjacency(
trigger::to_prov(primary_slot));
548 std::vector<dcon::province_id> rlist;
552 for(
auto p : neighbor_range) {
553 auto other = p.get_connected_provinces(p.get_connected_provinces(0) ==
trigger::to_prov(primary_slot) ? 1 : 0);
554 if(!other.get_nation_from_province_ownership() &&
556 rlist.push_back(other.id);
560 for(
auto p : neighbor_range) {
561 auto other = p.get_connected_provinces(p.get_connected_provinces(0) ==
trigger::to_prov(primary_slot) ? 1 : 0);
562 if(!other.get_nation_from_province_ownership()) {
563 rlist.push_back(other.id);
568 if(rlist.size() != 0) {
581 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
588 std::vector<dcon::nation_id> rlist;
591 for(
auto& n : ws.great_nations) {
593 rlist.push_back(n.nation);
597 for(
auto& n : ws.great_nations) {
598 rlist.push_back(n.nation);
602 if(rlist.size() != 0) {
614 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
621 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
629 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
636 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
643 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
650 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
657 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
668 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
675 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
682 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
689 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
696 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
703 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
710 if(primary_slot != -1) {
711 std::vector<dcon::province_id> rlist;
715 for(
auto p : ws.world.nation_get_province_ownership(
trigger::to_nation(primary_slot))) {
717 rlist.push_back(p.get_province().id);
721 for(
auto p : ws.world.nation_get_province_ownership(
trigger::to_nation(primary_slot))) {
722 rlist.push_back(p.get_province().id);
726 if(rlist.size() != 0) {
742 if(primary_slot != -1)
747 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
754 if(primary_slot != -1) {
755 std::vector<dcon::province_id> rlist;
759 auto d = ws.world.state_instance_get_definition(
trigger::to_state(primary_slot));
760 auto o = ws.world.state_instance_get_nation_from_state_ownership(
trigger::to_state(primary_slot));
761 for(
auto p : ws.world.state_definition_get_abstract_state_membership(d)) {
762 if(p.get_province().get_nation_from_province_ownership() == o) {
764 rlist.push_back(p.get_province().id);
769 auto d = ws.world.state_instance_get_definition(
trigger::to_state(primary_slot));
770 auto o = ws.world.state_instance_get_nation_from_state_ownership(
trigger::to_state(primary_slot));
771 for(
auto p : ws.world.state_definition_get_abstract_state_membership(d)) {
772 if(p.get_province().get_nation_from_province_ownership() == o) {
773 rlist.push_back(p.get_province().id);
778 if(rlist.size() != 0) {
796 if(primary_slot != -1)
802 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
810 if(primary_slot != -1) {
811 auto tag = ws.world.nation_get_identity_from_identity_holder(
trigger::to_nation(primary_slot));
812 auto cores_range = ws.world.national_identity_get_core(tag);
814 std::vector<dcon::province_id> rlist;
818 for(
auto p : cores_range) {
820 rlist.push_back(p.get_province().id);
823 for(
auto p : cores_range) {
824 rlist.push_back(p.get_province().id);
828 if(rlist.size() != 0) {
846 if(primary_slot != -1)
852 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
858 if(primary_slot != -1) {
860 auto cores_range = ws.world.province_get_core(prov);
862 std::vector<dcon::nation_id> rlist;
866 for(
auto p : cores_range) {
867 auto h = p.get_identity().get_nation_from_identity_holder();
869 rlist.push_back(h.id);
872 for(
auto p : cores_range) {
873 auto h = p.get_identity().get_nation_from_identity_holder();
875 rlist.push_back(h.id);
879 if(rlist.size() != 0) {
897 if(primary_slot != -1)
903 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
909 std::vector<dcon::nation_id> rlist;
913 for(
auto si : ws.world.nation_get_overlord_as_ruler(
trigger::to_nation(primary_slot))) {
915 rlist.push_back(si.get_subject().id);
918 for(
auto si : ws.world.nation_get_overlord_as_ruler(
trigger::to_nation(primary_slot))) {
919 if(si.get_subject().get_is_substate())
920 rlist.push_back(si.get_subject().id);
923 if(rlist.size() != 0) {
939 if(primary_slot != -1)
945 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
952 if(primary_slot != -1) {
953 std::vector<dcon::state_instance_id> rlist;
957 for(
auto si : ws.world.nation_get_state_ownership(
trigger::to_nation(primary_slot))) {
959 rlist.push_back(si.get_state().id);
962 for(
auto si : ws.world.nation_get_state_ownership(
trigger::to_nation(primary_slot))) {
963 rlist.push_back(si.get_state().id);
967 if(rlist.size() != 0) {
985 if(primary_slot != -1)
991 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
998 auto chances_total = tval[2];
1000 auto sub_units_start = tval + 3;
1004 bool found_res =
false;
1006 while(sub_units_start < tval + source_size) {
1013 r -= *sub_units_start;
1016 if(r < 0 && !found_res) {
1031 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1035 auto mod_k = dcon::value_modifier_key{ dcon::value_modifier_key::value_base_t(tval[2]) };
1036 if(primary_slot != -1) {
1046 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1059 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1072 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1089 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1101 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1110 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1123 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1140 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1155 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1157 primary_slot != -1 ?
trigger::to_generic(ws.world.nation_get_capital(ws.world.province_get_nation_from_province_ownership(
trigger::to_prov(primary_slot)))) : -1, this_slot,
1168 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1179 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1190 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1199 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1210 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1221 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1232 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1241 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1250 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1252 auto sea_zone = primary_slot != -1 ? [&ws](int32_t p_slot) {
1254 for(
auto adj : pid.get_province_adjacency()) {
1255 if(adj.get_connected_provinces(0).id.index() >= ws.province_definitions.first_sea_province.index()) {
1256 return adj.get_connected_provinces(0).id;
1257 }
else if(adj.get_connected_provinces(1).id.index() >= ws.province_definitions.first_sea_province.index()) {
1258 return adj.get_connected_provinces(1).id;
1261 return dcon::province_id{};
1263 : dcon::province_id{};
1270 primary_slot != -1 ? ws.world.nation_get_primary_culture(
trigger::to_nation(primary_slot)) : dcon::culture_id{};
1271 auto cg = ws.world.culture_get_group_from_culture_group_membership(prim_culture);
1282 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1284 auto union_tag = ws.world.culture_group_get_identity_from_cultural_union_of(cg);
1285 auto group_holder = ws.world.national_identity_get_nation_from_identity_holder(union_tag);
1300 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1302 auto olr = ws.world.nation_get_overlord_as_subject(
trigger::to_nation(primary_slot));
1316 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1324 from_slot != -1 ? ws.world.rebel_faction_get_defection_target(
trigger::to_rebel(from_slot)) : dcon::national_identity_id{};
1325 auto r_holder = ws.world.national_identity_get_nation_from_identity_holder(rtag);
1332 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1338 auto ctag = ws.world.state_instance_get_flashpoint_tag(
trigger::to_state(primary_slot));
1339 auto fp_nation = ws.world.national_identity_get_nation_from_identity_holder(ctag);
1346 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1356 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1370 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1371 auto st = primary_slot != -1 ? ws.world.province_get_state_membership(
trigger::to_prov(primary_slot)) : dcon::state_instance_id{};
1383 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1384 auto st = primary_slot != -1 ? ws.world.province_get_state_membership(ws.world.pop_get_province_from_pop_location(
trigger::to_pop(primary_slot))) : dcon::state_instance_id{};
1390 auto tag_holder = ws.world.national_identity_get_nation_from_identity_holder(tag);
1394 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1406 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1424 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1441 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1458 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1467 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1475 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1859 return ws.
world.state_instance_get_nation_from_state_ownership(p);
1862 return ws.
world.province_get_nation_from_province_ownership(p);
1868 auto fp = fatten(ws.
world, p);
1869 return fp.get_defection_target().get_nation_from_identity_holder();
1871template<
typename T,
typename F>
1888 [&](
auto id) {
return ws.world.culture_get_name(ws.world.nation_get_primary_culture(
id)); });
1899 [&](
auto id) {
return ws.world.culture_get_name(ws.world.nation_get_primary_culture(
id)); });
1910 [&](
auto id) {
return ws.world.culture_get_name(ws.world.nation_get_primary_culture(
id)); });
1921 [&](
auto id) {
return ws.world.culture_get_name(ws.world.nation_get_primary_culture(
id)); });
1932 [&](
auto id) {
return ws.world.culture_get_name(ws.world.nation_get_primary_culture(
id)); });
2034 if(ws.user_settings.spoilers) {
2054 if(from_slot != -1) {
2055 auto new_gov = ws.world.rebel_faction_get_type(
trigger::to_rebel(from_slot)).get_government_change(ws.world.nation_get_government_type(
trigger::to_nation(primary_slot)));
2091 if(primary_slot != -1) {
2092 auto prestige_multiplier =
2093 1.0f + ws.world.nation_get_modifier_values(
trigger::to_nation(primary_slot), sys::national_mod_offsets::prestige);
2094 auto new_prestige = std::max(0.0f,
2095 ws.world.nation_get_prestige(
trigger::to_nation(primary_slot)) + (delta > 0 ? (delta * prestige_multiplier) : delta));
2122 if(primary_slot != -1) {
2123 auto prim_culture = ws.world.nation_get_primary_culture(
trigger::to_nation(primary_slot));
2124 auto cg = ws.world.culture_get_group_from_culture_group_membership(prim_culture);
2125 auto u = ws.world.culture_group_get_identity_from_cultural_union_of(cg);
2128 if(
auto k = ws.lookup_key(std::string_view(
"cultural_union_nation")); k) {
2151 if(primary_slot != -1) {
2152 auto prim_culture = ws.world.nation_get_primary_culture(
trigger::to_nation(primary_slot));
2153 auto cg = ws.world.culture_get_group_from_culture_group_membership(prim_culture);
2154 auto u = ws.world.culture_group_get_identity_from_cultural_union_of(cg);
2157 if(
auto k = ws.lookup_key(std::string_view(
"cultural_union_nation")); k) {
2167 if(ws.user_settings.spoilers) {
2178 if(ws.user_settings.spoilers) {
2189 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
2252 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
2263 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
2414 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
2485 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
2626 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
2677 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
2765 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
2816 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
2867 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
2918 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
3002 if(ws.user_settings.spoilers) {
3013 if(ws.user_settings.spoilers) {
3019 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
3070 auto holder = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
3073 auto hprovs = ws.world.nation_get_province_ownership(holder);
3074 if(hprovs.begin() == hprovs.end()) {
3091 auto hprovs = ws.world.nation_get_province_ownership(holder);
3092 if(hprovs.begin() == hprovs.end()) {
3108 auto holder = ws.world.province_get_nation_from_province_ownership(
trigger::to_prov(this_slot));
3109 auto hprovs = ws.world.nation_get_province_ownership(holder);
3110 if(hprovs.begin() == hprovs.end()) {
3127 auto hprovs = ws.world.nation_get_province_ownership(holder);
3128 if(hprovs.begin() == hprovs.end()) {
3144 auto holder = ws.world.province_get_nation_from_province_ownership(
trigger::to_prov(from_slot));
3145 auto hprovs = ws.world.nation_get_province_ownership(holder);
3146 if(hprovs.begin() == hprovs.end()) {
3194 if(ws.user_settings.spoilers) {
3205 if(ws.user_settings.spoilers) {
3221 if(ws.user_settings.spoilers) {
3232 if(ws.user_settings.spoilers) {
3305 if(primary_slot != -1) {
3306 auto income = ws.world.nation_get_total_poor_income(
trigger::to_nation(primary_slot)) +
3309 auto combined_amount = income * amount;
3373 if(primary_slot != -1) {
3553 if(
auto owner = ws.world.province_get_nation_from_province_ownership(
trigger::to_prov(primary_slot)); owner) {
3554 auto owner_c = ws.world.nation_get_primary_culture(owner);
3574 if(
auto owner = ws.world.state_instance_get_nation_from_state_ownership(
trigger::to_state(primary_slot)); owner) {
3575 auto owner_c = ws.world.nation_get_primary_culture(owner);
3596 auto owner_c = ws.world.nation_get_primary_culture(owner);
3746 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
3807 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
3874 if(ws.user_settings.spoilers) {
3885 if(ws.user_settings.spoilers) {
3897 if(ws.user_settings.spoilers) {
3908 if(ws.user_settings.spoilers) {
3918 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
3933 if(
auto holder = ws.world.province_get_nation_from_province_ownership(
trigger::payload(tval[3]).
prov_id); holder) {
4033 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
4048 if(
auto holder = ws.world.province_get_nation_from_province_ownership(
trigger::payload(tval[3]).
prov_id); holder) {
4147 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
4160 if(
auto holder = ws.world.province_get_nation_from_province_ownership(
trigger::payload(tval[2]).
prov_id); holder) {
4246 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
4259 if(
auto holder = ws.world.province_get_nation_from_province_ownership(
trigger::payload(tval[2]).
prov_id); holder) {
4343 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
4438 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
4819 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
5247 populate_event_submap(ws, m,
event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date,
trigger::payload(tval[1]).
nev_id,
trigger::to_nation(primary_slot),
event::slot_type::nation,
event::slot_type::nation});
5259 populate_event_submap(ws, m,
event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date,
trigger::payload(tval[1]).
nev_id,
trigger::to_nation(primary_slot),
event::slot_type::nation,
event::slot_type::nation});
5299 populate_event_submap(ws, m,
event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date,
trigger::payload(tval[1]).
nev_id,
trigger::to_nation(primary_slot),
event::slot_type::nation,
event::slot_type::state});
5311 populate_event_submap(ws, m,
event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date,
trigger::payload(tval[1]).
nev_id,
trigger::to_nation(primary_slot),
event::slot_type::nation,
event::slot_type::state});
5349 populate_event_submap(ws, m,
event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date,
trigger::payload(tval[1]).
nev_id,
trigger::to_nation(primary_slot),
event::slot_type::nation,
event::slot_type::province});
5361 populate_event_submap(ws, m,
event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date,
trigger::payload(tval[1]).
nev_id,
trigger::to_nation(primary_slot),
event::slot_type::nation,
event::slot_type::province});
5399 populate_event_submap(ws, m,
event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date,
trigger::payload(tval[1]).
nev_id,
trigger::to_nation(primary_slot),
event::slot_type::nation,
event::slot_type::pop});
5411 populate_event_submap(ws, m,
event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date,
trigger::payload(tval[1]).
nev_id,
trigger::to_nation(primary_slot),
event::slot_type::nation,
event::slot_type::pop});
6042 if(primary_slot != -1)
6314 if(ws.user_settings.spoilers) {
6325 if(ws.user_settings.spoilers) {
6331 auto target = ws.world.national_identity_get_nation_from_identity_holder(
trigger::payload(tval[1]).tag_id);
6416 auto esv = ws.to_string_view(ename);
6538 if(ws.user_settings.spoilers) {
6550 if(ws.user_settings.spoilers) {
6562 if(ws.user_settings.spoilers) {
6574 if(ws.user_settings.spoilers) {
6586 if(ws.user_settings.spoilers) {
6598 if(ws.user_settings.spoilers) {
6610 if(ws.user_settings.spoilers) {
6622 if(ws.user_settings.spoilers) {
6634 if(ws.user_settings.spoilers) {
6646 if(ws.user_settings.spoilers) {
6658 if(ws.user_settings.spoilers) {
6687 if(ws.user_settings.spoilers) {
6698 if(ws.user_settings.spoilers) {
6725 auto id_name = ws.world.ideology_get_name(
ideology);
6747 auto opt_name = ws.world.issue_option_get_name(new_opt);
6750 auto id_name = ws.world.ideology_get_name(
ideology);
7303#undef EFFECT_DISPLAY_PARAMS
#define assert(condition)
pop_satisfaction_wrapper_fat fatten(data_container const &c, pop_satisfaction_wrapper_id id) noexcept
std::string_view province_building_type_get_level_text(economy::province_building_type v)
constexpr uint16_t is_random_scope
int32_t get_effect_scope_payload_size(uint16_t const *data)
int32_t effect_scope_data_payload(uint16_t code)
constexpr uint16_t code_mask
int32_t get_generic_effect_payload_size(uint16_t const *data)
constexpr uint16_t scope_has_limit
std::vector< dcon::province_id > country_get_province_adjacency(sys::state &state, dcon::nation_id nat_id)
float daily_research_points(sys::state &state, dcon::nation_id n)
dcon::nation_id owner_of_pop(sys::state const &state, dcon::pop_id pop_ids)
uint64_t get_random(sys::state const &state, uint32_t value_in)
void add_to_layout_box(sys::state &state, layout_base &dest, layout_box &box, embedded_flag ico)
layout_box open_layout_box(layout_base &dest, int32_t indent)
void localised_format_box(sys::state &state, layout_base &dest, layout_box &box, std::string_view key, text::substitution_map const &sub)
void add_line(sys::state &state, layout_base &dest, dcon::text_key txt, int32_t indent)
void add_to_substitution_map(substitution_map &mp, variable_type key, substitution value)
dcon::text_key get_adjective(sys::state &state, dcon::nation_id id)
std::string get_dynamic_state_name(sys::state &state, dcon::state_instance_id state_id)
ankerl::unordered_dense::map< uint32_t, substitution > substitution_map
std::string produce_simple_string(sys::state const &state, dcon::text_key id)
dcon::text_key get_name(sys::state &state, dcon::nation_id id)
void add_space_to_layout_box(sys::state &state, layout_base &dest, layout_box &box)
void close_layout_box(columnar_layout &dest, layout_box &box)
std::variant< std::string_view, dcon::text_key, dcon::province_id, dcon::state_instance_id, dcon::nation_id, dcon::national_identity_id, int64_t, fp_one_place, sys::date, std::monostate, fp_two_places, fp_three_places, fp_four_places, fp_currency, pretty_integer, fp_percentage, fp_percentage_one_place, int_percentage, int_wholenum, dcon::state_definition_id, embedded_icon, embedded_flag, embedded_unit_icon > substitution
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)
dcon::nation_id to_nation(int32_t v)
float evaluate_multiplicative_modifier(sys::state &state, dcon::value_modifier_key modifier, int32_t primary, int32_t this_slot, int32_t from_slot)
void modifier_description(sys::state &state, text::layout_base &layout, dcon::modifier_id mid, int32_t indentation=0)
void multiplicative_value_modifier_description(sys::state &state, text::layout_base &layout, dcon::value_modifier_key modifier, int32_t primary, int32_t this_slot, int32_t from_slot)
void effect_description(sys::state &state, text::layout_base &layout, dcon::effect_key k, int32_t primary_slot, int32_t this_slot, int32_t from_slot, uint32_t r_lo, uint32_t r_hi)
void populate_event_submap(sys::state &state, text::substitution_map &sub, std::variant< event::pending_human_n_event, event::pending_human_f_n_event, event::pending_human_p_event, event::pending_human_f_p_event > const &phe) noexcept
dcon::data_container world
std::vector< int32_t > trigger_data_indices
dcon::text_key lookup_key(std::string_view text) const
std::vector< uint16_t > trigger_data
dcon::national_identity_id tag_id
dcon::national_flag_id natf_id
dcon::national_variable_id natv_id
dcon::invention_id invt_id
dcon::national_event_id nev_id
dcon::provincial_event_id pev_id
dcon::province_id prov_id
dcon::ideology_id ideo_id
dcon::government_type_id gov_id
dcon::technology_id tech_id
dcon::global_flag_id glob_id
dcon::reform_option_id ropt_id
dcon::factory_type_id fac_id
dcon::state_definition_id state_id
dcon::pop_type_id popt_id
dcon::issue_option_id opt_id
dcon::commodity_id com_id
dcon::rebel_type_id reb_id