1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! ModularSynthesisPlugin - Universal crafting/synthesis system
//!
//! Provides a flexible synthesis system where modular components (items, technologies, properties)
//! can be combined to create new things. Features recipe discovery, dependency graphs, time-based
//! synthesis, quality variation, and probabilistic outcomes.
//!
//! # Features
//!
//! - **Recipe System**: Define complex recipes with ingredients, results, prerequisites
//! - **Dependency Graphs**: Automatic prerequisite checking and circular dependency detection
//! - **Discovery Mechanics**: Experimentation-based recipe discovery with attempt bonuses
//! - **Time-based Synthesis**: Processes run over time with completion tracking
//! - **Quality System**: Success probability affects result quality and quantity
//! - **Material Conservation**: Partial refund on failure based on consumption rate
//! - **Hook System**: Extensible with game-specific material handling and skill modifiers
//!
//! # Example
//!
//! ```ignore
//! use issun::plugin::modular_synthesis::*;
//!
//! // Create plugin
//! let synthesis = ModularSynthesisPlugin::new()
//! .with_config(
//! SynthesisConfig::default()
//! .with_discovery_chance(0.15)
//! .with_failure_consumption(0.3)
//! )
//! .with_recipes(my_recipe_registry);
//!
//! // In game loop
//! let system = SynthesisSystem::new(Arc::new(MyGameHook));
//!
//! // Start synthesis
//! let ingredients = vec![
//! (IngredientType::Item { item_id: "iron".to_string() }, 3),
//! (IngredientType::Item { item_id: "wood".to_string() }, 1),
//! ];
//!
//! let synthesis_id = system.start_synthesis(
//! player_id,
//! "iron_sword".to_string(),
//! ingredients,
//! &mut synthesis_state,
//! &mut discovery_state,
//! ®istry,
//! &config,
//! ).await?;
//!
//! // Update syntheses
//! system.update_syntheses(
//! &mut synthesis_state,
//! ®istry,
//! &config,
//! SystemTime::now(),
//! ).await;
//! ```
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;