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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
//! Time-related messages (Bevy 0.17)
//!
//! ⚠️ **CRITICAL**: Bevy 0.17 では buffered events は `Message` を使用(`Event` ではない)
use *;
/// Request to advance game time (day)
///
/// Published by scene layer or player systems when day should progress.
/// TimerSystem processes this and increments the day counter.
///
/// # Example
///
/// ```ignore
/// use bevy::prelude::*;
/// use issun_bevy::plugins::time::AdvanceTimeRequested;
///
/// // Scene layer requests time advancement
/// fn end_turn_system(mut commands: Commands) {
/// commands.write_message(AdvanceTimeRequested);
/// }
/// ```
;
/// Message published when day changes
///
/// Published by TimerSystem after incrementing the day counter.
///
/// Other systems can subscribe to this message to trigger day-based logic:
/// - ActionResetSystem: Resets action points
/// - Economy systems: Periodic settlements
/// - Quest systems: Time-limited quests
/// - NPC systems: Daily routines
///
/// # Example
///
/// ```ignore
/// use bevy::prelude::*;
/// use issun_bevy::plugins::time::DayChanged;
///
/// // React to day changes
/// fn settlement_system(mut messages: MessageReader<DayChanged>) {
/// for msg in messages.read() {
/// println!("Day {} has begun!", msg.day);
/// // ... settlement logic
/// }
/// }
/// ```
/// Message published every frame/tick
///
/// Used for sub-day timing and animations.
/// Not tied to day progression.
///
/// # Example
///
/// ```ignore
/// use bevy::prelude::*;
/// use issun_bevy::plugins::time::TickAdvanced;
///
/// // React to every tick
/// fn animation_system(mut messages: MessageReader<TickAdvanced>) {
/// for msg in messages.read() {
/// // Update animations based on tick
/// }
/// }
/// ```