tiger-lib 1.18.0

Library used by the tools ck3-tiger, vic3-tiger, and imperator-tiger. This library holds the bulk of the code for them. It can be built either for ck3-tiger with the feature ck3, or for vic3-tiger with the feature vic3, or for imperator-tiger with the feature imperator, but not both at the same time.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
use std::sync::LazyLock;

use crate::everything::Everything;
use crate::helpers::TigerHashMap;
use crate::lowercase::Lowercase;
use crate::scopes::Scopes;
use crate::token::Token;

#[inline]
pub fn iterator(
    name_lc: &Lowercase,
    _name: &Token,
    _data: &Everything,
) -> Option<(Scopes, Scopes)> {
    ITERATOR_MAP.get(name_lc.as_str()).copied()
}

static ITERATOR_MAP: LazyLock<TigerHashMap<&'static str, (Scopes, Scopes)>> = LazyLock::new(|| {
    let mut hash = TigerHashMap::default();
    for (from, s, to) in ITERATOR.iter().copied() {
        hash.insert(s, (from, to));
    }
    hash
});

/// LAST UPDATED CK3 VERSION 1.16.0
/// See `effects.log` from the game data dumps
/// These are the list iterators. Every entry represents
/// a every_, ordered_, random_, and any_ version.
const ITERATOR: &[(Scopes, &str, Scopes)] = &[
    (Scopes::Character, "acclaimed_knight", Scopes::Character),
    (Scopes::Character, "accolade", Scopes::Accolade),
    (Scopes::None, "accolade_type", Scopes::AccoladeType),
    (Scopes::Character, "active_accolade", Scopes::Accolade),
    (Scopes::None, "active_dynasty", Scopes::Dynasty),
    (Scopes::None, "activity", Scopes::Activity),
    (Scopes::Activity, "activity_phase_location", Scopes::Province),
    (Scopes::Activity, "activity_phase_location_future", Scopes::Province),
    (Scopes::Activity, "activity_phase_location_past", Scopes::Province),
    (Scopes::None, "activity_type", Scopes::ActivityType),
    (Scopes::Character, "alert_creatable_title", Scopes::LandedTitle),
    (Scopes::Character, "alert_usurpable_title", Scopes::LandedTitle),
    (Scopes::Character, "ally", Scopes::Character),
    (Scopes::Character, "ancestor", Scopes::Character),
    (Scopes::Character, "army", Scopes::Army),
    (Scopes::Province, "army_in_location", Scopes::Army),
    (Scopes::Army, "army_maa_regiment", Scopes::Regiment),
    (Scopes::None, "artifact", Scopes::Artifact),
    (Scopes::Artifact, "artifact_claimant", Scopes::Character),
    (Scopes::Artifact, "artifact_house_claimant", Scopes::DynastyHouse),
    (Scopes::Activity, "attending_character", Scopes::Character),
    (Scopes::Character, "available_task_contract", Scopes::TaskContract),
    (Scopes::None, "barony", Scopes::LandedTitle),
    (Scopes::None, "casus_belli_type", Scopes::CasusBelliType),
    (Scopes::Character, "character_active_contract", Scopes::TaskContract),
    (Scopes::Character, "character_artifact", Scopes::Artifact),
    (Scopes::Character, "character_epidemic", Scopes::Epidemic),
    (Scopes::Province, "character_in_location", Scopes::Character),
    (Scopes::Character, "character_situation", Scopes::Situation),
    (Scopes::Character, "character_struggle", Scopes::Struggle),
    (Scopes::Character, "character_task_contract", Scopes::TaskContract),
    (
        Scopes::Character,
        "character_to_title_neighboring_and_across_water_county",
        Scopes::LandedTitle,
    ),
    (
        Scopes::Character,
        "character_to_title_neighboring_and_across_water_duchy",
        Scopes::LandedTitle,
    ),
    (
        Scopes::Character,
        "character_to_title_neighboring_and_across_water_empire",
        Scopes::LandedTitle,
    ),
    (
        Scopes::Character,
        "character_to_title_neighboring_and_across_water_kingdom",
        Scopes::LandedTitle,
    ),
    (Scopes::Character, "character_to_title_neighboring_county", Scopes::LandedTitle),
    (Scopes::Character, "character_to_title_neighboring_duchy", Scopes::LandedTitle),
    (Scopes::Character, "character_to_title_neighboring_empire", Scopes::LandedTitle),
    (Scopes::Character, "character_to_title_neighboring_kingdom", Scopes::LandedTitle),
    (Scopes::Character, "character_trait", Scopes::Trait),
    (Scopes::Character, "character_war", Scopes::War),
    (Scopes::None, "character_with_royal_court", Scopes::Character),
    (Scopes::Character, "child", Scopes::Character),
    (Scopes::Character, "claim", Scopes::LandedTitle),
    (Scopes::LandedTitle, "claimant", Scopes::Character),
    (Scopes::Character, "claimed_artifact", Scopes::Artifact),
    (Scopes::Character, "close_family_member", Scopes::Character),
    (Scopes::Character, "close_or_extended_family_member", Scopes::Character),
    (Scopes::Combat, "combat_side", Scopes::CombatSide),
    (Scopes::None, "completed_legend", Scopes::Legend),
    (Scopes::Character, "concubine", Scopes::Character),
    (Scopes::None, "confederation", Scopes::Confederation),
    (Scopes::Confederation, "confederation_member", Scopes::Character),
    (Scopes::Confederation, "confederation_member_house", Scopes::DynastyHouse),
    (Scopes::None, "confederation_type", Scopes::ConfederationType),
    (Scopes::LandedTitle, "connected_county", Scopes::LandedTitle),
    (Scopes::Character, "consort", Scopes::Character),
    (Scopes::Character, "contact", Scopes::Character),
    (Scopes::GreatProject, "contribution", Scopes::ProjectContribution),
    (Scopes::LandedTitle, "controlled_faith", Scopes::Faith),
    (Scopes::LandedTitle, "controlled_title_maa_regiment", Scopes::Regiment),
    (Scopes::Character, "councillor", Scopes::Character),
    (Scopes::None, "county", Scopes::LandedTitle),
    (Scopes::None, "county_in_region", Scopes::LandedTitle),
    (Scopes::LandedTitle, "county_province", Scopes::Province),
    (Scopes::LandedTitle, "county_province_epidemic", Scopes::Epidemic),
    (Scopes::LandedTitle, "county_situation", Scopes::Situation),
    (Scopes::LandedTitle, "county_situation_sub_region", Scopes::SituationSubRegion),
    (Scopes::LandedTitle, "county_struggle", Scopes::Struggle),
    (Scopes::Character, "court_position_candidate", Scopes::Character),
    (Scopes::Character, "court_position_employer", Scopes::Character),
    (Scopes::Character, "court_position_holder", Scopes::Character), // TODO find out how court position is supplied
    (Scopes::None, "court_position_type", Scopes::CourtPositionType),
    (Scopes::Character, "courtier", Scopes::Character),
    (Scopes::Character, "courtier_away", Scopes::Character),
    (Scopes::Character, "courtier_or_guest", Scopes::Character),
    (Scopes::Culture, "culture_county", Scopes::LandedTitle),
    (Scopes::Culture, "culture_duchy", Scopes::LandedTitle),
    (Scopes::Culture, "culture_empire", Scopes::LandedTitle),
    (Scopes::None, "culture_global", Scopes::Culture),
    (Scopes::None, "culture_innovation", Scopes::CultureInnovation),
    (Scopes::Culture, "culture_kingdom", Scopes::LandedTitle),
    (Scopes::None, "culture_pillar", Scopes::CulturePillar),
    (Scopes::None, "culture_tradition", Scopes::CultureTradition),
    (Scopes::Character, "de_jure_claim", Scopes::LandedTitle),
    (Scopes::LandedTitle, "de_jure_county", Scopes::LandedTitle),
    (Scopes::LandedTitle, "de_jure_county_holder", Scopes::Character),
    (Scopes::LandedTitle, "de_jure_top_liege", Scopes::Character),
    (Scopes::None, "decision", Scopes::Decision),
    (Scopes::Faith, "defensive_great_holy_wars", Scopes::GreatHolyWar),
    (Scopes::LandedTitle, "dejure_vassal_title_holder", Scopes::Character),
    (Scopes::Character, "diarchy_succession_character", Scopes::Character),
    (Scopes::Character, "diplomacy_councillor", Scopes::Character),
    (Scopes::LandedTitle, "direct_de_facto_vassal_title", Scopes::LandedTitle),
    (Scopes::LandedTitle, "direct_de_jure_vassal_title", Scopes::LandedTitle),
    (Scopes::Character, "directly_owned_province", Scopes::Province),
    (Scopes::None, "doctrine", Scopes::Doctrine),
    (Scopes::None, "domicile", Scopes::Domicile),
    (Scopes::None, "duchy", Scopes::LandedTitle),
    (Scopes::None, "dynasty", Scopes::Dynasty),
    (Scopes::Dynasty, "dynasty_house", Scopes::DynastyHouse),
    (Scopes::Dynasty, "dynasty_member", Scopes::Character),
    (Scopes::LandedTitle, "election_candidate", Scopes::Character),
    (Scopes::Character, "election_title", Scopes::LandedTitle),
    (Scopes::LandedTitle, "elector", Scopes::Character),
    (Scopes::None, "empire", Scopes::LandedTitle),
    (Scopes::TravelPlan, "entourage_character", Scopes::Character),
    (Scopes::None, "epidemic", Scopes::Epidemic),
    (Scopes::None, "epidemic_type", Scopes::EpidemicType),
    (Scopes::Character, "equipped_character_artifact", Scopes::Artifact),
    (Scopes::Character, "extended_family_member", Scopes::Character),
    (Scopes::Faction, "faction_county_member", Scopes::LandedTitle),
    (Scopes::Faction, "faction_member", Scopes::Character),
    (Scopes::Religion, "faith", Scopes::Faith),
    (Scopes::Faith, "faith_character", Scopes::Character),
    (Scopes::Faith, "faith_holy_order", Scopes::HolyOrder),
    (Scopes::Faith, "faith_playable_ruler", Scopes::Character),
    (Scopes::Faith, "faith_ruler", Scopes::Character),
    (Scopes::Character, "foreign_court_guest", Scopes::Character),
    (Scopes::Character, "former_concubine", Scopes::Character),
    (Scopes::Character, "former_concubinist", Scopes::Character),
    (Scopes::Character, "former_spouse", Scopes::Character),
    (Scopes::TravelPlan, "future_path_location", Scopes::Province),
    (Scopes::Character, "general_councillor", Scopes::Character),
    (Scopes::None, "geographical_region", Scopes::GeographicalRegion),
    (Scopes::Character, "government_type", Scopes::GovernmentType),
    (Scopes::Character, "grandparent", Scopes::Character),
    (Scopes::Character, "great_grandparent", Scopes::Character),
    (Scopes::None, "great_project", Scopes::GreatProject),
    (Scopes::Province, "great_project_in_province", Scopes::GreatProject),
    (Scopes::None, "great_project_type", Scopes::GreatProjectType),
    (Scopes::Activity, "guest_subset", Scopes::Character),
    (Scopes::Activity, "guest_subset_current_phase", Scopes::Character),
    (Scopes::None, "hegemony", Scopes::LandedTitle),
    (Scopes::Character, "heir", Scopes::Character),
    (Scopes::Character, "heir_title", Scopes::LandedTitle),
    (Scopes::Character, "held_title", Scopes::LandedTitle),
    (Scopes::Character, "hired_mercenary", Scopes::MercenaryCompany),
    (Scopes::None, "holding_type", Scopes::HoldingType),
    (Scopes::Faith, "holy_site", Scopes::LandedTitle),
    (Scopes::Character, "home_court_hostage", Scopes::Character),
    (Scopes::Character, "hooked_character", Scopes::Character),
    (Scopes::Character, "hostile_raider", Scopes::Character),
    (Scopes::None, "house_aspiration", Scopes::HouseAspiration),
    (Scopes::DynastyHouse, "house_claimed_artifact", Scopes::Artifact),
    (Scopes::DynastyHouse, "house_member", Scopes::Character),
    (Scopes::DynastyHouse, "house_relation", Scopes::HouseRelation),
    (Scopes::None, "house_relation_level", Scopes::HouseRelationLevel),
    (Scopes::None, "house_relation_type", Scopes::HouseRelationType),
    (Scopes::DynastyHouse, "house_unity_member", Scopes::Character),
    (Scopes::None, "important_location", Scopes::LandedTitle),
    (Scopes::LandedTitle, "important_location_for_title", Scopes::LandedTitle),
    (Scopes::LandedTitle, "in_de_facto_hierarchy", Scopes::LandedTitle),
    (Scopes::LandedTitle, "in_de_jure_hierarchy", Scopes::LandedTitle),
    (Scopes::None, "in_global_list", Scopes::all()),
    (Scopes::None, "in_list", Scopes::all()),
    (Scopes::None, "in_local_list", Scopes::all()),
    (Scopes::None, "independent_ruler", Scopes::Character),
    (Scopes::Epidemic, "infected_province", Scopes::Province),
    (Scopes::None, "inspiration", Scopes::Inspiration),
    (Scopes::None, "inspired_character", Scopes::Character),
    (Scopes::None, "interested_title", Scopes::LandedTitle),
    (Scopes::Struggle, "interloper_ruler", Scopes::Character),
    (Scopes::Character, "intrigue_councillor", Scopes::Character),
    (Scopes::Character, "invited_activity", Scopes::Activity),
    (Scopes::Activity, "invited_character", Scopes::Character),
    (Scopes::Struggle, "involved_county", Scopes::LandedTitle),
    (Scopes::Struggle, "involved_ruler", Scopes::Character),
    (Scopes::Character.union(Scopes::Artifact), "killed_character", Scopes::Character),
    (Scopes::None, "kingdom", Scopes::LandedTitle),
    (Scopes::Character, "knight", Scopes::Character),
    (Scopes::Culture, "known_innovation", Scopes::CultureInnovation),
    (Scopes::Character, "known_secret", Scopes::Secret),
    (Scopes::Character, "land_neighboring_realm_with_tributaries", Scopes::LandedTitle),
    (Scopes::Character, "land_neighboring_realm_with_tributaries_owner", Scopes::Character),
    (Scopes::Character, "learning_councillor", Scopes::Character),
    (Scopes::HolyOrder, "leased_title", Scopes::LandedTitle),
    (Scopes::None, "legend", Scopes::Legend),
    (Scopes::Legend, "legend_promoter", Scopes::Character),
    (Scopes::None, "legend_type", Scopes::LegendType),
    (Scopes::Character, "liege_or_above", Scopes::Character),
    (Scopes::None, "living_character", Scopes::Character),
    (Scopes::Character, "maa_regiment", Scopes::Regiment),
    (Scopes::Character, "martial_councillor", Scopes::Character),
    (Scopes::None, "mercenary_company", Scopes::MercenaryCompany),
    (Scopes::Character, "memory", Scopes::CharacterMemory),
    (Scopes::CharacterMemory, "memory_participant", Scopes::Character),
    (Scopes::Character, "neighboring_and_across_water_realm_owner", Scopes::Character),
    (Scopes::Character, "neighboring_and_across_water_realm_same_rank_owner", Scopes::Character),
    (Scopes::Character, "neighboring_and_across_water_top_liege_realm", Scopes::LandedTitle),
    (Scopes::Character, "neighboring_and_across_water_top_liege_realm_owner", Scopes::Character),
    (Scopes::Character, "neighboring_and_across_water_top_suzerain_realm", Scopes::LandedTitle),
    (Scopes::Character, "neighboring_and_across_water_top_suzerain_realm_owner", Scopes::Character),
    (Scopes::LandedTitle, "neighboring_county", Scopes::LandedTitle),
    (Scopes::Province, "neighboring_province", Scopes::Province),
    (Scopes::Character, "neighboring_realm_owner", Scopes::Character),
    (Scopes::Character, "neighboring_realm_same_rank_owner", Scopes::Character),
    (Scopes::Character, "neighboring_realm_with_tributaries_owner", Scopes::Character),
    (Scopes::Character, "neighboring_top_liege_realm", Scopes::LandedTitle),
    (Scopes::Character, "neighboring_top_liege_realm_owner", Scopes::Character),
    (Scopes::Character, "neighboring_top_suzerain_realm", Scopes::LandedTitle),
    (Scopes::Character, "neighboring_top_suzerain_realm_owner", Scopes::Character),
    (Scopes::Character, "noble_family", Scopes::LandedTitle),
    (Scopes::None, "open_invite_activity", Scopes::Activity),
    (Scopes::Character, "opposite_sex_spouse_candidate", Scopes::Character),
    (Scopes::Trait, "opposite_trait", Scopes::Trait),
    (Scopes::Character, "owned_story", Scopes::StoryCycle),
    (Scopes::LandedTitle, "owned_title_maa_regiment", Scopes::Regiment),
    (Scopes::Character, "parent", Scopes::Character),
    (Scopes::Culture, "parent_culture", Scopes::Culture),
    (Scopes::Culture, "parent_culture_or_above", Scopes::Culture),
    (Scopes::Situation, "participant_group", Scopes::SituationParticipantGroup),
    (Scopes::LandedTitle, "past_holder", Scopes::Character),
    (Scopes::LandedTitle, "past_holder_reversed", Scopes::Character),
    (Scopes::Character, "patroned_holy_order", Scopes::HolyOrder),
    (Scopes::Character, "personal_claimed_artifact", Scopes::Artifact),
    (Scopes::Character, "pinned_character", Scopes::Character),
    (Scopes::Character, "pinned_province", Scopes::Province),
    (Scopes::Character, "pinned_title", Scopes::LandedTitle),
    (Scopes::Character, "pinning_character", Scopes::Character),
    (Scopes::Character, "played_character", Scopes::Character),
    (Scopes::None, "player", Scopes::Character),
    (Scopes::Character, "player_heir", Scopes::Character),
    (Scopes::Character, "player_legend_library", Scopes::Legend),
    (Scopes::GreatHolyWar, "pledged_attacker", Scopes::Character),
    (Scopes::GreatHolyWar, "pledged_defender", Scopes::Character),
    (Scopes::None, "pool_character", Scopes::Character),
    (Scopes::Character, "pool_guest", Scopes::Character),
    (Scopes::ProjectContribution, "potential_contributor", Scopes::Character),
    (Scopes::Character, "potential_marriage_option", Scopes::Character),
    (Scopes::Character, "powerful_family", Scopes::DynastyHouse),
    (Scopes::Character, "powerful_vassal", Scopes::Character),
    (Scopes::Character, "pretender_title", Scopes::LandedTitle),
    (Scopes::Character, "primary_war_enemy", Scopes::Character),
    (Scopes::Character, "prisoner", Scopes::Character),
    (Scopes::None, "province", Scopes::Province),
    (Scopes::Province, "province_domicile", Scopes::Domicile),
    (Scopes::Province, "province_epidemic", Scopes::Epidemic),
    (Scopes::Province, "province_legend", Scopes::Legend),
    (Scopes::Character, "prowess_councillor", Scopes::Character),
    (Scopes::Character, "raid_target", Scopes::Character),
    (Scopes::Character, "realm_border_county", Scopes::LandedTitle),
    (Scopes::Character, "realm_county", Scopes::LandedTitle),
    (Scopes::Character, "realm_de_jure_duchy", Scopes::LandedTitle),
    (Scopes::Character, "realm_de_jure_empire", Scopes::LandedTitle),
    (Scopes::Character, "realm_de_jure_kingdom", Scopes::LandedTitle),
    (Scopes::Character, "realm_province", Scopes::Province),
    (Scopes::Character, "relation", Scopes::Character), // TODO takes a type
    (Scopes::HouseRelation, "relation_house", Scopes::DynastyHouse),
    (Scopes::None, "religion_global", Scopes::Religion),
    (Scopes::HoldingType, "required_heir_government_type", Scopes::GovernmentType),
    (Scopes::None, "ruler", Scopes::Character),
    (Scopes::Character, "same_sex_spouse_candidate", Scopes::Character),
    (Scopes::Character, "scheme", Scopes::Scheme),
    (Scopes::Scheme, "scheme_agent_character", Scopes::Character),
    (Scopes::Scheme, "scheme_agent_slot", Scopes::AgentSlot),
    (Scopes::Character, "secret", Scopes::Secret),
    (Scopes::Secret, "secret_knower", Scopes::Character),
    (Scopes::Secret, "secret_participant", Scopes::Character),
    (Scopes::Character, "sibling", Scopes::Character),
    (Scopes::CombatSide, "side_commander", Scopes::Character),
    (Scopes::CombatSide, "side_knight", Scopes::Character),
    (Scopes::CombatSide, "side_participant", Scopes::Character),
    (Scopes::Situation, "situation_county", Scopes::LandedTitle),
    (Scopes::Situation, "situation_participant", Scopes::Character),
    (Scopes::Situation, "situation_sub_region", Scopes::SituationSubRegion),
    (Scopes::SituationParticipantGroup, "situation_group_participant", Scopes::Character),
    (Scopes::SituationSubRegion, "situation_sub_region_county", Scopes::LandedTitle),
    (
        Scopes::SituationSubRegion,
        "situation_sub_region_geographical_region",
        Scopes::GeographicalRegion,
    ),
    (Scopes::SituationSubRegion, "situation_sub_region_participant", Scopes::Character),
    (
        Scopes::SituationSubRegion,
        "situation_sub_region_participant_group",
        Scopes::SituationParticipantGroup,
    ),
    (Scopes::None, "special_building_province", Scopes::Province),
    (Scopes::Activity, "special_guest", Scopes::Character),
    (Scopes::Character, "sponsored_inspiration", Scopes::Inspiration),
    (Scopes::Character, "spouse", Scopes::Character),
    (Scopes::Character, "spouse_candidate", Scopes::Character),
    (Scopes::Legend, "spread_province", Scopes::Province),
    (Scopes::Character, "stewardship_councillor", Scopes::Character),
    (Scopes::Character, "sub_realm_barony", Scopes::LandedTitle),
    (Scopes::Character, "sub_realm_county", Scopes::LandedTitle),
    (Scopes::Character, "sub_realm_duchy", Scopes::LandedTitle),
    (Scopes::Character, "sub_realm_empire", Scopes::LandedTitle),
    (Scopes::Character, "sub_realm_kingdom", Scopes::LandedTitle),
    (Scopes::Character, "sub_realm_title", Scopes::LandedTitle),
    (Scopes::Character, "subject", Scopes::Character),
    (Scopes::Character, "succession_appointment_invested_candidate", Scopes::Character),
    (Scopes::Character, "succession_appointment_invested_title", Scopes::LandedTitle),
    (Scopes::LandedTitle, "succession_appointment_investors", Scopes::Character),
    (Scopes::CasusBelli, "target_title", Scopes::LandedTitle),
    (Scopes::Character, "targeting_faction", Scopes::Faction),
    (Scopes::Character, "targeting_scheme", Scopes::Scheme),
    (Scopes::Character, "targeting_secret", Scopes::Secret),
    (Scopes::None, "task_contract", Scopes::TaskContract),
    (Scopes::None, "task_contract_type", Scopes::TaskContractType),
    (Scopes::Character, "tax_collector", Scopes::Character),
    (Scopes::Character, "tax_collector_vassal", Scopes::Character),
    (Scopes::Character, "tax_slot", Scopes::TaxSlot),
    (Scopes::TaxSlot, "tax_slot_vassal", Scopes::Character),
    (Scopes::LandedTitle, "this_title_or_de_jure_above", Scopes::LandedTitle),
    (Scopes::LandedTitle, "title_heir", Scopes::Character),
    (Scopes::LandedTitle, "title_interested_in_location", Scopes::LandedTitle),
    (Scopes::LandedTitle, "title_joined_faction", Scopes::Faction),
    (Scopes::LandedTitle, "title_maa_regiment", Scopes::Regiment),
    (
        Scopes::LandedTitle,
        "title_to_title_neighboring_and_across_water_county",
        Scopes::LandedTitle,
    ),
    (Scopes::LandedTitle, "title_to_title_neighboring_and_across_water_duchy", Scopes::LandedTitle),
    (
        Scopes::LandedTitle,
        "title_to_title_neighboring_and_across_water_empire",
        Scopes::LandedTitle,
    ),
    (
        Scopes::LandedTitle,
        "title_to_title_neighboring_and_across_water_kingdom",
        Scopes::LandedTitle,
    ),
    (Scopes::LandedTitle, "title_to_title_neighboring_county", Scopes::LandedTitle),
    (Scopes::LandedTitle, "title_to_title_neighboring_duchy", Scopes::LandedTitle),
    (Scopes::LandedTitle, "title_to_title_neighboring_empire", Scopes::LandedTitle),
    (Scopes::LandedTitle, "title_to_title_neighboring_kingdom", Scopes::LandedTitle),
    (Scopes::Character, "top_realm_border_county", Scopes::LandedTitle),
    (Scopes::Culture, "tradition", Scopes::CultureTradition),
    (Scopes::None, "trait", Scopes::Trait),
    (Scopes::None, "trait_in_category", Scopes::Trait),
    (Scopes::Character, "traveling_family_member", Scopes::Character),
    (Scopes::Character, "tributary", Scopes::Character),
    (Scopes::Character, "truce_holder", Scopes::Character),
    (Scopes::Character, "truce_target", Scopes::Character),
    (Scopes::Character, "unassigned_taxpayers", Scopes::Character),
    (Scopes::Character, "unspent_known_secret", Scopes::Secret),
    (Scopes::Character, "vassal", Scopes::Character),
    (Scopes::None, "vassal_contract", Scopes::VassalContract),
    (Scopes::Character, "vassal_or_below", Scopes::Character),
    (Scopes::TravelPlan, "visited_location", Scopes::Province),
    (Scopes::Character, "war_ally", Scopes::Character),
    (Scopes::War, "war_attacker", Scopes::Character),
    (Scopes::War, "war_defender", Scopes::Character),
    (Scopes::Character, "war_enemy", Scopes::Character),
    (Scopes::War, "war_participant", Scopes::Character),
    (Scopes::Character, "warden_hostage", Scopes::Character),
];

pub fn iterator_removed(name: &str) -> Option<(&'static str, &'static str)> {
    for (removed_name, version, explanation) in ITERATOR_REMOVED.iter().copied() {
        if name == removed_name {
            return Some((version, explanation));
        }
    }
    None
}

/// Every entry represents a every_, ordered_, random_, and any_ version.
const ITERATOR_REMOVED: &[(&str, &str, &str)] = &[
    ("activity_declined", "1.9", ""),
    ("activity_invited", "1.9", ""),
    ("participant", "1.9", ""),
    ("scheme_agent", "1.13", "replaced with scheme_agent_character"),
    ("heir_to_title", "1.13", "was duplicate of heir_title"),
];