pub enum MissionObjective {
Show 23 variants
ReachSpecifiedDate {
year: u32,
week: u32,
},
ControlNRegionsIncluding {
total: u32,
regions: Vec<String>,
},
ControlNProvincesIncluding {
total: u32,
provinces: Vec<String>,
},
ResearchNTechsOfTypeX {
total: u32,
categories: Vec<String>,
text: Option<String>,
},
EarnXAmountFromBuildingWealth {
total: u32,
},
EarnXAmountFromRaiding {
total: u32,
},
OwnNUnits {
total: u32,
naval: bool,
},
OwnNProvincesWithCulturalDominance {
total: u32,
},
ConstructNBuildingsIncluding {
total: u32,
buildings: Vec<String>,
faction: String,
},
SubjugateFactions {
total: u32,
},
MaintainNClientStates {
total: u32,
},
LootOrSackNDifferentSettlementsIncluding {
total: u32,
regions: Vec<String>,
},
RazeOrSackNDifferentSettlementsIncluding {
total: u32,
regions: Vec<String>,
},
AtLeastXReligionInAllProvinces {
total: f32,
religion: String,
},
ReclaimNDifferentSettlementsIncluding {
total: u32,
regions: Vec<String>,
},
EnsureFactionsHaveNoMilitaryPresence {
factions: Vec<String>,
},
AtLeastXPublicOrderInProvinces {
total: f32,
provinces: Vec<String>,
},
StayHorde,
MaintainNAlliances {
total: u32,
},
IncomeAtLeastX {
income: u32,
},
EliminateCharacterInBattle {
faction: String,
},
ConfederateFactions {
total: u32,
},
AttainFameLevel {
level: u32,
},
}Expand description
An objective of a mission, by its script type. total is the amount the objective asks for.
Variants§
ReachSpecifiedDate
Reach a date (year, week_of_year).
ControlNRegionsIncluding
Control a number of regions among some (region).
ControlNProvincesIncluding
Control a number of provinces among some (province).
ResearchNTechsOfTypeX
Research a number of technologies of some categories (technology_category), with an optional text
(override_text).
EarnXAmountFromBuildingWealth
Earn an amount of money from buildings.
EarnXAmountFromRaiding
Earn an amount of money from raiding.
OwnNUnits
Own a number of units (OWN_N_UNITS), or of naval units (OWN_N_NAVAL_UNITS).
OwnNProvincesWithCulturalDominance
Own a number of provinces where the faction’s culture dominates.
ConstructNBuildingsIncluding
Construct a number of buildings among some (building_level), for a faction.
SubjugateFactions
Subjugate a number of factions.
MaintainNClientStates
Keep a number of client states.
LootOrSackNDifferentSettlementsIncluding
Loot or sack a number of settlements (region lists some; the game doesn’t keep them).
RazeOrSackNDifferentSettlementsIncluding
Raze or sack a number of settlements (region lists some; the game doesn’t keep them).
AtLeastXReligionInAllProvinces
Have a religion at a percentage in every province.
ReclaimNDifferentSettlementsIncluding
Reclaim a number of settlements among some (region).
EnsureFactionsHaveNoMilitaryPresence
Leave some factions (faction) without armies.
AtLeastXPublicOrderInProvinces
Have public order at a level in some provinces (province).
StayHorde
Stay a horde.
MaintainNAlliances
Keep a number of alliances.
IncomeAtLeastX
Have an income of at least an amount (income).
EliminateCharacterInBattle
Kill a faction’s leader in battle (faction).
ConfederateFactions
Confederate a number of factions.
AttainFameLevel
Reach a fame level (fame_level).
Implementations§
Source§impl MissionObjective
impl MissionObjective
Sourcepub fn statements(&self) -> Vec<(&'static str, String)>
pub fn statements(&self) -> Vec<(&'static str, String)>
Returns the statements of the objective’s script block, as (key, value) pairs in the order
Self::from_item reads them.
Sourcepub fn from_item(item: &ScriptItem) -> Result<Self>
pub fn from_item(item: &ScriptItem) -> Result<Self>
Reads an objective from its script block.
§Errors
Returns an error if the objective’s type is unsupported, or a value it needs is missing or malformed.
Trait Implementations§
Source§impl Clone for MissionObjective
impl Clone for MissionObjective
Source§fn clone(&self) -> MissionObjective
fn clone(&self) -> MissionObjective
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MissionObjective
impl Debug for MissionObjective
Source§impl PartialEq for MissionObjective
impl PartialEq for MissionObjective
impl StructuralPartialEq for MissionObjective
Auto Trait Implementations§
impl Freeze for MissionObjective
impl RefUnwindSafe for MissionObjective
impl Send for MissionObjective
impl Sync for MissionObjective
impl Unpin for MissionObjective
impl UnsafeUnpin for MissionObjective
impl UnwindSafe for MissionObjective
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSend for T
impl<T> MaybeSync for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.