Skip to main content

write_character_posts

Function write_character_posts 

Source
pub fn write_character_posts(
    inputs: &WorldInputs<'_>,
    posts: &PostPlan,
    faction: &str,
    leader: Option<u32>,
) -> Result<RecordNode>
Expand description

Writes the posts of a faction’s government (CHARACTER_POSTS): one group per post group, with its post count and that many posts. Only the leader post has a holder.

§Arguments

  • inputs - Tables, startpos rows and layouts.
  • posts - Government posts of the factions.
  • faction - Faction key.
  • leader - Runtime id of the faction’s leader, if it has one.

§Errors

Returns an error if the layout lacks a record, or a group has more posts than the layout knows.