chore(deps): migrate to Bevy 0.18
- BorderRadius is no longer a Component; moved into Node.border_radius field at all 15 spawn sites across 6 plugin files - Events<T> renamed to Messages<T> in test code (12 files) - KeyboardEvents SystemParam renamed to KeyboardMessages to match the MessageWriter rename done in the 0.17 hop - WindowResolution::from((f32,f32)) removed; use (u32,u32) tuple in main.rs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -248,10 +248,10 @@ fn spawn_achievements_screen(commands: &mut Commands, records: &[AchievementReco
|
||||
min_width: Val::Px(380.0),
|
||||
max_height: Val::Percent(80.0),
|
||||
overflow: Overflow::clip_y(),
|
||||
border_radius: BorderRadius::all(Val::Px(8.0)),
|
||||
..default()
|
||||
},
|
||||
BackgroundColor(Color::srgb(0.09, 0.09, 0.12)),
|
||||
BorderRadius::all(Val::Px(8.0)),
|
||||
))
|
||||
.with_children(|card| {
|
||||
// Header
|
||||
@@ -415,7 +415,7 @@ mod tests {
|
||||
assert!(unlocked_first_win);
|
||||
|
||||
// Verify the event was emitted.
|
||||
let events = app.world().resource::<Events<AchievementUnlockedEvent>>();
|
||||
let events = app.world().resource::<Messages<AchievementUnlockedEvent>>();
|
||||
let mut cursor = events.get_cursor();
|
||||
let fired: Vec<String> = cursor.read(events).map(|e| e.0.id.clone()).collect();
|
||||
assert!(fired.contains(&"first_win".to_string()));
|
||||
@@ -433,7 +433,7 @@ mod tests {
|
||||
|
||||
// Clear events from first win.
|
||||
app.world_mut()
|
||||
.resource_mut::<Events<AchievementUnlockedEvent>>()
|
||||
.resource_mut::<Messages<AchievementUnlockedEvent>>()
|
||||
.clear();
|
||||
|
||||
app.world_mut().write_message(GameWonEvent {
|
||||
@@ -442,7 +442,7 @@ mod tests {
|
||||
});
|
||||
app.update();
|
||||
|
||||
let events = app.world().resource::<Events<AchievementUnlockedEvent>>();
|
||||
let events = app.world().resource::<Messages<AchievementUnlockedEvent>>();
|
||||
let mut cursor = events.get_cursor();
|
||||
let fired: Vec<String> = cursor.read(events).map(|e| e.0.id.clone()).collect();
|
||||
assert!(
|
||||
@@ -468,7 +468,7 @@ mod tests {
|
||||
});
|
||||
app.update();
|
||||
|
||||
let events = app.world().resource::<Events<XpAwardedEvent>>();
|
||||
let events = app.world().resource::<Messages<XpAwardedEvent>>();
|
||||
let mut cursor = events.get_cursor();
|
||||
let xp_events: Vec<u64> = cursor.read(events).map(|e| e.amount).collect();
|
||||
// The no_undo achievement (BonusXp 25) must have fired an XpAwardedEvent.
|
||||
@@ -494,7 +494,7 @@ mod tests {
|
||||
app.update();
|
||||
|
||||
// "no_undo" awards BonusXp(25). If undo was used it must NOT fire.
|
||||
let events = app.world().resource::<Events<XpAwardedEvent>>();
|
||||
let events = app.world().resource::<Messages<XpAwardedEvent>>();
|
||||
let mut cursor = events.get_cursor();
|
||||
let xp_events: Vec<u64> = cursor.read(events).map(|e| e.amount).collect();
|
||||
assert!(
|
||||
|
||||
Reference in New Issue
Block a user