Enum tiger_lib::Item

source ·
#[non_exhaustive]
pub enum Item {
Show 223 variants Accessory, AccessoryTag, AccessoryVariation, AccessoryVariationLayout, AccessoryVariationTextures, Asset, BlendShape, CharacterInteraction, Coa, CoaColorList, CoaColoredEmblemList, CoaDesignerColorPalette, CoaDesignerColoredEmblem, CoaDesignerEmblemLayout, CoaDesignerPattern, CoaPatternList, CoaTemplate, CoaTemplateList, CoaTexturedEmblemList, Culture, CustomLocalization, Decision, Define, Dlc, DlcFeature, EffectLocalization, Entity, Ethnicity, Event, EventNamespace, File, Font, Fontfiles, GameConcept, GameRule, GameRuleSetting, GeneAgePreset, GeneAttribute, GeneCategory, GovernmentType, GuiLayer, GuiTemplate, GuiType, Localization, MapEnvironment, MapMode, Modifier, NamedColor, OnAction, Pdxmesh, PortraitAnimation, PortraitCamera, PortraitEnvironment, PortraitModifierGroup, PortraitModifierPack, Province, Religion, ScriptedEffect, ScriptedGui, ScriptedList, ScriptedModifier, ScriptedRule, ScriptedTrigger, ScriptValue, Shortcut, Sound, Terrain, TextFormat, TextIcon, TextureFile, TriggerLocalization, Building, CharacterTemplate, DeathReason, Dna, EventTheme, Law, LawGroup, Message, Region, AccoladeCategory, AccoladeIcon, AccoladeName, AccoladeParameter, AccoladeType, ActivityIntent, ActivityLocale, ActivityOption, ActivityOptionCategory, ActivityPhase, ActivityState, ActivityType, Amenity, ArtifactFeature, ArtifactFeatureGroup, ArtifactHistory, ArtifactRarity, ArtifactSlot, ArtifactSlotType, ArtifactTemplate, ArtifactType, ArtifactVisual, Bookmark, BookmarkGroup, BookmarkPortrait, BuildingFlag, BuildingGfx, CasusBelli, CasusBelliGroup, Catalyst, Character, CharacterBackground, CharacterInteractionCategory, ClothingGfx, CoaGfx, CoaDynamicDefinition, CombatEffect, CombatPhaseEvent, CouncilPosition, CouncilTask, CourtPosition, CourtPositionCategory, CourtSceneCulture, CourtSceneGroup, CourtSceneRole, CourtSceneSetting, CourtType, CultureAesthetic, CultureCreationName, CultureEra, CultureEthos, CultureHeritage, CultureHistory, CultureParameter, CulturePillar, CultureTradition, CultureTraditionCategory, DangerType, DiarchyMandate, DiarchyParameter, DiarchyType, Doctrine, DoctrineGroup, DoctrineParameter, Dynasty, DynastyLegacy, DynastyPerk, EventBackground, EventTransition, Faction, Faith, FaithIcon, Flavorization, Focus, GeneticConstraint, GovernmentFlag, GraphicalFaith, GuestInviteRule, GuestSubset, Holding, HoldingFlag, HolySite, HolySiteFlag, Hook, House, ImportantAction, Innovation, InnovationFlag, Inspiration, Language, LawFlag, Lifestyle, MartialCustom, MemoryCategory, MemoryType, MenAtArms, MenAtArmsBase, ModifierFormat, MottoInsert, Motto, Music, NameList, Nickname, OpinionModifier, Perk, PerkTree, PlayableDifficultyInfo, PointOfInterest, PoolSelector, PrisonType, PulseAction, Relation, RelationFlag, ReligionFamily, RewardItem, Scheme, ScriptedAnimation, ScriptedCost, ScriptedIllustration, Secret, Sexuality, Skill, SpecialBuilding, SpecialGuest, Story, Struggle, StrugglePhase, StrugglePhaseParameter, SuccessionElection, Suggestion, Title, TitleHistory, TitleHistoryType, Trait, TraitCategory, TraitFlag, TraitTrack, TravelOption, UnitGfx, VassalContract, VassalContractFlag, VassalObligationLevel, VassalStance,
}
Expand description

“items” are all the things that can be looked up in the game databases. Anything that can be looked up in script with a literal string key, or that’s loaded into tiger’s database and needs a unique key, is an Item.

There is some overlap with scopes, for example “culture” is both an Item and a scope type, but the difference is that scopes are runtime values while items are always strings.

For example if a trigger takes a culture scope, you could supply either culture:german or scope:target_culture, while if a trigger takes a culture item, you would have to supply just german and don’t have the option of supplying something determined at runtime.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Accessory

§

AccessoryTag

§

AccessoryVariation

§

AccessoryVariationLayout

§

AccessoryVariationTextures

§

Asset

§

BlendShape

§

CharacterInteraction

§

Coa

§

CoaColorList

§

CoaColoredEmblemList

§

CoaDesignerColorPalette

§

CoaDesignerColoredEmblem

§

CoaDesignerEmblemLayout

§

CoaDesignerPattern

§

CoaPatternList

§

CoaTemplate

§

CoaTemplateList

§

CoaTexturedEmblemList

§

Culture

§

CustomLocalization

§

Decision

§

Define

§

Dlc

§

DlcFeature

§

EffectLocalization

§

Entity

§

Ethnicity

§

Event

§

EventNamespace

§

File

§

Font

§

Fontfiles

§

GameConcept

§

GameRule

§

GameRuleSetting

§

GeneAgePreset

§

GeneAttribute

§

GeneCategory

§

GovernmentType

§

GuiLayer

§

GuiTemplate

§

GuiType

§

Localization

§

MapEnvironment

§

MapMode

§

Modifier

§

NamedColor

§

OnAction

§

Pdxmesh

§

PortraitAnimation

§

PortraitCamera

§

PortraitEnvironment

§

PortraitModifierGroup

§

PortraitModifierPack

§

Province

§

Religion

§

ScriptedEffect

§

ScriptedGui

§

ScriptedList

§

ScriptedModifier

§

ScriptedRule

§

ScriptedTrigger

§

ScriptValue

§

Shortcut

§

Sound

§

Terrain

§

TextFormat

§

TextIcon

§

TextureFile

§

TriggerLocalization

§

Building

§

CharacterTemplate

§

DeathReason

§

Dna

§

EventTheme

§

Law

§

LawGroup

§

Message

§

Region

§

AccoladeCategory

§

AccoladeIcon

§

AccoladeName

§

AccoladeParameter

§

AccoladeType

§

ActivityIntent

§

ActivityLocale

§

ActivityOption

§

ActivityOptionCategory

§

ActivityPhase

§

ActivityState

§

ActivityType

§

Amenity

§

ArtifactFeature

§

ArtifactFeatureGroup

§

ArtifactHistory

§

ArtifactRarity

§

ArtifactSlot

§

ArtifactSlotType

§

ArtifactTemplate

§

ArtifactType

§

ArtifactVisual

§

Bookmark

§

BookmarkGroup

§

BookmarkPortrait

§

BuildingFlag

§

BuildingGfx

§

CasusBelli

§

CasusBelliGroup

§

Catalyst

§

Character

§

CharacterBackground

§

CharacterInteractionCategory

§

ClothingGfx

§

CoaGfx

§

CoaDynamicDefinition

§

CombatEffect

§

CombatPhaseEvent

§

CouncilPosition

§

CouncilTask

§

CourtPosition

§

CourtPositionCategory

§

CourtSceneCulture

§

CourtSceneGroup

§

CourtSceneRole

§

CourtSceneSetting

§

CourtType

§

CultureAesthetic

§

CultureCreationName

§

CultureEra

§

CultureEthos

§

CultureHeritage

§

CultureHistory

§

CultureParameter

§

CulturePillar

§

CultureTradition

§

CultureTraditionCategory

§

DangerType

§

DiarchyMandate

§

DiarchyParameter

§

DiarchyType

§

Doctrine

§

DoctrineGroup

§

DoctrineParameter

§

Dynasty

§

DynastyLegacy

§

DynastyPerk

§

EventBackground

§

EventTransition

§

Faction

§

Faith

§

FaithIcon

§

Flavorization

§

Focus

§

GeneticConstraint

§

GovernmentFlag

§

GraphicalFaith

§

GuestInviteRule

§

GuestSubset

§

Holding

§

HoldingFlag

§

HolySite

§

HolySiteFlag

§

Hook

§

House

§

ImportantAction

§

Innovation

§

InnovationFlag

§

Inspiration

§

Language

§

LawFlag

§

Lifestyle

§

MartialCustom

§

MemoryCategory

§

MemoryType

§

MenAtArms

§

MenAtArmsBase

§

ModifierFormat

§

MottoInsert

§

Motto

§

Music

§

NameList

§

Nickname

§

OpinionModifier

§

Perk

§

PerkTree

§

PlayableDifficultyInfo

§

PointOfInterest

§

PoolSelector

§

PrisonType

§

PulseAction

§

Relation

§

RelationFlag

§

ReligionFamily

§

RewardItem

§

Scheme

§

ScriptedAnimation

§

ScriptedCost

§

ScriptedIllustration

§

Secret

§

Sexuality

§

Skill

§

SpecialBuilding

§

SpecialGuest

§

Story

§

Struggle

§

StrugglePhase

§

StrugglePhaseParameter

§

SuccessionElection

§

Suggestion

§

Title

§

TitleHistory

§

TitleHistoryType

§

Trait

§

TraitCategory

§

TraitFlag

§

TraitTrack

§

TravelOption

§

UnitGfx

§

VassalContract

§

VassalContractFlag

§

VassalObligationLevel

§

VassalStance

Implementations§

source§

impl Item

source

pub fn path(self) -> &'static str

Returns a path where items of this type are kept in the script files. Can be "" for items that are built in.

These paths are used both for the user in error reports, and to find the items when loading them.

source

pub fn confidence(self) -> Confidence

Confidence value to use when reporting that an item is missing. Should be Strong for most, Weak for items that aren’t defined anywhere but just used (such as gfx flags).

source

pub fn severity(self) -> Severity

Severity value to use when reporting that an item is missing.

  • Error - most things
  • Warning - things that only impact visuals or presentation
  • Untidy - things that don’t matter much at all
  • Fatal - things that cause crashes if they’re missing This is only one piece of the severity puzzle. It can also depend on the caller who’s expecting the item to exist. That part isn’t handled yet.

Trait Implementations§

source§

impl Clone for Item

source§

fn clone(&self) -> Item

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Item

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Item

Display items in separated word case for maximum friendliness.

Unfortunately there’s no option for this in strum so we have to roll our own by using snake_case and changing the _ to a space.

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'_derivative_strum> From<&'_derivative_strum Item> for &'static str

source§

fn from(x: &'_derivative_strum Item) -> &'static str

Converts to this type from the input type.
source§

impl From<Item> for &'static str

source§

fn from(x: Item) -> &'static str

Converts to this type from the input type.
source§

impl Hash for Item

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IntoEnumIterator for Item

§

type Iterator = ItemIter

source§

fn iter() -> ItemIter

source§

impl Ord for Item

source§

fn cmp(&self, other: &Item) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Item> for Item

source§

fn eq(&self, other: &Item) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Item> for Item

source§

fn partial_cmp(&self, other: &Item) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for Item

source§

impl Eq for Item

source§

impl StructuralEq for Item

source§

impl StructuralPartialEq for Item

Auto Trait Implementations§

§

impl RefUnwindSafe for Item

§

impl Send for Item

§

impl Sync for Item

§

impl Unpin for Item

§

impl UnwindSafe for Item

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> AsAny for Twhere T: Any,

source§

fn as_any(&self) -> &(dyn Any + 'static)

source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

source§

fn type_name(&self) -> &'static str

Gets the type name of self
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast for Twhere T: AsAny + ?Sized,

source§

fn is<T>(&self) -> boolwhere T: AsAny,

Returns true if the boxed type is the same as T. Read more
source§

fn downcast_ref<T>(&self) -> Option<&T>where T: AsAny,

Forward to the method defined on the type Any.
source§

fn downcast_mut<T>(&mut self) -> Option<&mut T>where T: AsAny,

Forward to the method defined on the type Any.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.