Skip to main content

load_startpos

Function load_startpos 

Source
pub fn load_startpos(
    dependencies: &Dependencies,
    pack: &Pack,
    campaign: &str,
) -> Result<ESF>
Expand description

Loads the startpos of a campaign (campaigns/<campaign>/startpos.esf), from the pack if it has it, otherwise from the game’s files.

§Arguments

  • dependencies - The game’s files.
  • pack - Pack that may have the startpos.
  • campaign - Campaign key.

§Errors

Returns an error if neither has the startpos, or it can’t be decoded.