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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
//! Evolution plugin for Bevy.
//!
//! This module provides integration between issun-core's evolution mechanic
//! and Bevy's ECS system.
//!
//! # Overview
//!
//! The Evolution plugin allows you to add natural time-based state changes
//! to your Bevy entities:
//! - Food spoilage
//! - Plant growth
//! - Resource regeneration
//! - Equipment degradation
//! - Population dynamics
//! - Seasonal cycles
//!
//! # Quick Start
//!
//! ```ignore
//! use bevy::prelude::*;
//! use issun_bevy::plugins::evolution::EvolutionPlugin;
//! use issun_core::mechanics::evolution::prelude::*;
//!
//! // Choose a preset mechanic
//! type MyMechanic = FoodDecay;
//!
//! fn main() {
//! App::new()
//! .add_plugins(DefaultPlugins)
//! .add_plugins(EvolutionPlugin::<MyMechanic>::default())
//! .add_systems(Startup, setup)
//! .run();
//! }
//!
//! fn setup(mut commands: Commands) {
//! // Spawn an entity with evolution state
//! commands.spawn((
//! EvolutionStateComponent::new(100.0, 0.0, 100.0, SubjectType::Food),
//! EnvironmentComponent::new(25.0, 0.8),
//! ));
//! }
//! ```
//!
//! # Manual Control
//!
//! You can disable auto-tick and manually control evolution:
//!
//! ```ignore
//! App::new()
//! .add_plugins(
//! EvolutionPlugin::<FoodDecay>::default()
//! .with_auto_tick(false) // Disable automatic evolution
//! )
//! .add_systems(Update, manual_evolution_system)
//! .run();
//!
//! fn manual_evolution_system(
//! query: Query<Entity, With<EvolutionStateComponent>>,
//! mut writer: MessageWriter<EvolutionTick>,
//! ) {
//! for entity in query.iter() {
//! // Manually trigger evolution
//! writer.write(EvolutionTick::new(entity));
//! }
//! }
//! ```
//!
//! # Custom Mechanics
//!
//! Create custom evolution mechanics by combining policies:
//!
//! ```ignore
//! use issun_core::mechanics::evolution::prelude::*;
//!
//! // Custom: Temperature-based growth with diminishing returns
//! type CustomPlant = EvolutionMechanic<
//! Growth,
//! TemperatureBased,
//! DiminishingRate
//! >;
//!
//! App::new()
//! .add_plugins(EvolutionPlugin::<CustomPlant>::default())
//! .run();
//! ```
// Re-export main types for convenience
pub use ;
pub use ;
pub use ;
// Re-export issun-core presets for convenience
pub use ;