aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/production.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-02 05:38:48 +0300
committerValentin Popov <valentin@popov.link>2026-12-02 05:38:48 +0300
commitca1828fc869aaeb72df00c642f918a7723c84df4 (patch)
tree1a16cb74faad26cc652dec2dce2efc64bda3f2ad /crates/fparkan-runtime/src/production.rs
parent6fde1faa1dfed89007566b3373114a89139390b9 (diff)
downloadfparkan-ca1828fc869aaeb72df00c642f918a7723c84df4.tar.xz
fparkan-ca1828fc869aaeb72df00c642f918a7723c84df4.zip
feat(ui): save and reopen warbot projects
Use original designer art and names for named Unit DAT files. Restore researched designs onto the prepared mounts of a compatible factory scheme. Verified saving, restoring and ordering from the Field Camp window, and production after decoding the saved design in the Constructor.
Diffstat (limited to 'crates/fparkan-runtime/src/production.rs')
-rw-r--r--crates/fparkan-runtime/src/production.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/fparkan-runtime/src/production.rs b/crates/fparkan-runtime/src/production.rs
index 3ec6c795..3b407467 100644
--- a/crates/fparkan-runtime/src/production.rs
+++ b/crates/fparkan-runtime/src/production.rs
@@ -714,7 +714,10 @@ fn factory_at_communicator(
.ok_or_else(|| EngineError::Production("stand on a friendly factory communicator".into()))
}
-fn player_owner(world: &World, cockpit: StartingCockpit) -> Result<OwnerId, EngineError> {
+pub(super) fn player_owner(
+ world: &World,
+ cockpit: StartingCockpit,
+) -> Result<OwnerId, EngineError> {
identity_metadata(world, cockpit.handle)?
.owner_id
.ok_or_else(|| EngineError::Production("player clan is unavailable".into()))
@@ -740,7 +743,7 @@ fn production_error(error: impl std::fmt::Display) -> EngineError {
EngineError::Production(error.to_string())
}
-fn clan_scheme_cost(
+pub(super) fn clan_scheme_cost(
vfs: &Option<Arc<dyn Vfs>>,
mission: &LoadedMissionState,
owner: OwnerId,