aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/lib.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-14 22:55:21 +0300
committerValentin Popov <valentin@popov.link>2026-11-14 22:55:21 +0300
commit64bb8b476b525706d08d00be7c6f6cc397606c06 (patch)
tree8a6bb33086190196517ff7e255d815480da4d9b7 /crates/fparkan-runtime/src/lib.rs
parentd43524a8e40bb923d9275e17d3dc586701f08bbf (diff)
downloadfparkan-64bb8b476b525706d08d00be7c6f6cc397606c06.tar.xz
fparkan-64bb8b476b525706d08d00be7c6f6cc397606c06.zip
feat(ai): carry ore from clan mines to storage
Resolve the stock transport order against the newly produced unit. Move between owned endpoints and limit transfers by rate, source stock and destination space. The window logged the first departure and the stock simulation completed an unloading cycle. Native roster selection was called directly. Port approaches and rates remain approximations.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
-rw-r--r--crates/fparkan-runtime/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs
index d93a5e5a..9dba33cb 100644
--- a/crates/fparkan-runtime/src/lib.rs
+++ b/crates/fparkan-runtime/src/lib.rs
@@ -54,6 +54,7 @@ mod clan_transport_schemes;
mod mesh_collision;
mod mining;
mod mission_events;
+mod ore_transport;
mod player_motion;
mod player_status;
mod player_weapon;
@@ -2951,6 +2952,7 @@ pub struct SimulationReport {
pub script_group_orders: Vec<(usize, u32, u64)>,
pub script_problem_waits: Vec<(usize, u32, u64)>,
pub script_factory_patrol_continues: Vec<(usize, u32, u64)>,
+ pub script_ore_transport_orders: Vec<(usize, u32, u64)>,
pub script_capturer_queries: Vec<(usize, u64)>,
pub script_capture_approaches: Vec<(u32, u32, u64)>,
/// First factory completion by clan, in milliseconds.
@@ -3002,6 +3004,7 @@ pub fn simulate_mission_report(
script_group_orders: Vec::new(),
script_problem_waits: Vec::new(),
script_factory_patrol_continues: Vec::new(),
+ script_ore_transport_orders: Vec::new(),
script_capturer_queries: Vec::new(),
script_capture_approaches: Vec::new(),
first_factory_completion_ms: Default::default(),
@@ -3105,6 +3108,9 @@ pub fn simulate_mission_report(
.script_factory_patrol_continues
.extend(loaded.clan_ai_events.patrol_continues());
report
+ .script_ore_transport_orders
+ .extend(loaded.clan_ai_events.transport_orders());
+ report
.script_capturer_queries
.extend(loaded.clan_ai_events.capturer_queries());
report