Skip to main content

tiger_lib/vic3/
item.rs

1//! Victoria 3 specific [`Item`] functions
2
3use crate::item::Item;
4
5/// Returns whether an item type uses the REPLACE/INJECT/CREATE prefixes.
6pub fn injectable_vic3(itype: Item) -> bool {
7    matches!(
8        itype,
9        Item::AcceptanceStatus
10                | Item::Achievement
11                | Item::AiStrategy
12                | Item::AlertGroup
13                | Item::Alert
14                | Item::Amendment
15                | Item::BattleCondition
16                | Item::BuildingGroup
17                | Item::BuildingType
18                | Item::BuyPackage
19                | Item::CharacterInteraction
20                | Item::CharacterTemplate
21                | Item::CharacterTrait
22                | Item::CohesionLevel
23                | Item::CombatUnitExperienceLevel
24                | Item::CombatUnitGroup
25                | Item::CombatUnit
26                | Item::CommanderOrder
27                | Item::CommanderRank
28                | Item::CompanyCharterType
29                | Item::CompanyType
30                | Item::CountryCreation
31                | Item::Country
32                | Item::CountryFormation
33                | Item::CountryRank
34                | Item::CountryType
35                | Item::CultureGraphics
36                | Item::Culture
37                | Item::Decision
38                | Item::Decree
39                | Item::DiplomaticAction
40                | Item::DiplomaticCatalystCategory
41                | Item::DiplomaticCatalyst
42                | Item::DiplomaticPlay
43                | Item::DiscriminationTraitGroup
44                | Item::DiscriminationTrait
45                | Item::Dna
46                | Item::DynamicCompanyName
47                | Item::DynamicCountryMapColor
48                | Item::DynamicCountryName
49                | Item::DynamicTreatyName
50                | Item::Ethnicity
51                | Item::FlagDefinition
52                | Item::GameConcept
53                | Item::GeneCategory
54                | Item::GeographicRegion
55                | Item::Goods
56                | Item::GovernmentType
57                | Item::HarvestConditionType
58                | Item::Ideology
59                | Item::Institution
60                | Item::InterestGroupTrait
61                | Item::InterestGroup
62                | Item::JournalEntry
63                | Item::JournalEntryGroup
64                | Item::TerrainLabel
65                | Item::LawGroup
66                | Item::LawType
67                | Item::LegitimacyLevel
68                | Item::LibertyDesireLevel
69                | Item::MilitaryFormationFlag
70                | Item::MobilizationOptionGroup
71                | Item::MobilizationOption
72                | Item::ModifierTypeDefinition
73                | Item::ObjectiveSubgoalCategory
74                | Item::ObjectiveSubgoal
75                | Item::Objective
76                | Item::Party
77                | Item::PoliticalLobby
78                | Item::PoliticalLobbyAppeasement
79                | Item::PoliticalMovement
80                | Item::PoliticalMovementCategory
81                | Item::PoliticalMovementPopSupport
82                | Item::PopNeed
83                | Item::PopType
84                | Item::PowerBlocCoaPiece
85                | Item::PowerBlocIdentity
86                | Item::PowerBlocMapTexture
87                | Item::PowerBlocName
88                | Item::PrincipleGroup
89                | Item::Principle
90                | Item::PrestigeGoods
91                | Item::ProductionMethodGroup
92                | Item::ProductionMethod
93                | Item::ProposalType
94                | Item::Religion
95                | Item::ScriptValue
96                | Item::ScriptedButton
97                | Item::ScriptedEffect
98                | Item::ScriptedGui
99                | Item::ScriptedList
100                | Item::ScriptedModifier
101                | Item::ScriptedProgressBar
102                | Item::ScriptedRule
103                | Item::ScriptedTrigger
104                | Item::SocialClass
105                | Item::SocialHierarchy
106                | Item::StateTrait
107                | Item::StrategicRegion
108                | Item::SubjectType
109                | Item::Technology
110                | Item::Terrain
111                | Item::TerrainManipulator
112                | Item::Theme
113                | Item::TreatyArticle
114                | Item::TutorialLessonChain
115                | Item::TutorialLesson
116                | Item::WarGoalType
117                | Item::ArmyDiorama
118                | Item::CityBuildingVfx
119                | Item::FleetDiorama
120                | Item::Accessory
121                | Item::PortraitModifierGroup
122                | Item::Music
123                | Item::MusicPlayerCategory
124                // undocumented
125                | Item::Modifier
126                | Item::PortraitAnimation
127    )
128}