aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/production.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/fparkan-runtime/src/production.rs')
-rw-r--r--crates/fparkan-runtime/src/production.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/fparkan-runtime/src/production.rs b/crates/fparkan-runtime/src/production.rs
index ff67b95b..f29cea25 100644
--- a/crates/fparkan-runtime/src/production.rs
+++ b/crates/fparkan-runtime/src/production.rs
@@ -462,13 +462,11 @@ pub fn factory_project_components(
pub fn factory_part_variants(
engine: &Engine,
cockpit: StartingCockpit,
- scheme: usize,
+ records: &[UnitComponentRecord],
component: usize,
) -> Result<Vec<String>, EngineError> {
let (mission, _) = loaded_production(engine)?;
let owner = player_owner(&engine.world, cockpit)?;
- let records = factory_project_components(engine, scheme)
- .ok_or_else(|| production_error("unknown factory scheme"))?;
with_clan_research(&engine.services.vfs, mission, owner, |research| {
Ok(part_variants(records, component, research, |row| {
mission.free_research.learned.contains(&(owner, row))
@@ -852,7 +850,7 @@ pub(super) fn clan_scheme_cost(
})
}
-fn with_clan_research<T>(
+pub(super) fn with_clan_research<T>(
vfs: &Option<Arc<dyn Vfs>>,
mission: &LoadedMissionState,
owner: OwnerId,