Skip to content

Commit 1ebafa2

Browse files
committed
chore: fix deploy
1 parent c05d885 commit 1ebafa2

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- run: mdbook build guide
3939

4040
- name: Upload Artefact
41-
uses: actions/upload-artifact@v2
41+
uses: actions/upload-artifact@v4
4242
with:
4343
name: guide
4444
path: guide/book
@@ -49,13 +49,13 @@ jobs:
4949
if: github.event_name == 'push' && ${{ github.ref == 'refs/heads/main' }}
5050
steps:
5151
- name: Download guide
52-
uses: actions/download-artifact@v2
52+
uses: actions/download-artifact@v4
5353
with:
5454
name: guide
5555
path: dist/guide
5656

5757
- name: Download asteroids
58-
uses: actions/download-artifact@v2
58+
uses: actions/download-artifact@v4
5959
with:
6060
name: asteroids
6161
path: dist/asteroids

asteroids/src/main.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ fn particle_system() -> BoxedSystem {
271271

272272
#[derive(Fetch)]
273273
struct CameraQuery {
274-
pos: Mutable<Vec2>,
275-
vel: Mutable<Vec2>,
276-
view: Mutable<Mat3>,
274+
pos: ComponentMut<Vec2>,
275+
vel: ComponentMut<Vec2>,
276+
view: ComponentMut<Mat3>,
277277
}
278278

279279
/// System which makes the camera track the player smoothly.
@@ -387,7 +387,7 @@ fn lifetime_system(dt: f32) -> BoxedSystem {
387387
.with_query(Query::new((entity_ids(), lifetime().as_mut())))
388388
.with_cmd_mut()
389389
.build(
390-
move |mut q: QueryBorrow<(EntityIds, Mutable<f32>)>, cmd: &mut CommandBuffer| {
390+
move |mut q: QueryBorrow<(EntityIds, ComponentMut<f32>)>, cmd: &mut CommandBuffer| {
391391
for (id, lf) in &mut q {
392392
if *lf <= 0.0 {
393393
cmd.set(id, health(), 0.0);
@@ -495,10 +495,10 @@ struct PlayerQuery {
495495
id: EntityIds,
496496
player: Component<()>,
497497
pos: Component<Vec2>,
498-
rot: Mutable<f32>,
499-
vel: Mutable<Vec2>,
500-
difficulty: Mutable<f32>,
501-
invincibility: Mutable<f32>,
498+
rot: ComponentMut<f32>,
499+
vel: ComponentMut<Vec2>,
500+
difficulty: ComponentMut<f32>,
501+
invincibility: ComponentMut<f32>,
502502
material: Component<f32>,
503503
}
504504

@@ -592,7 +592,7 @@ fn despawn_out_of_bounds() -> BoxedSystem {
592592
.with_query(Query::new((position().modified(), health().as_mut())).without(player()))
593593
.build(
594594
|mut player: QueryBorrow<Component<Vec2>, _>,
595-
mut asteroids: QueryBorrow<(ChangeFilter<Vec2>, Mutable<f32>), _>| {
595+
mut asteroids: QueryBorrow<(ChangeFilter<Vec2>, ComponentMut<f32>), _>| {
596596
if let Some(player_pos) = player.first() {
597597
for (asteroid, health) in &mut asteroids {
598598
if player_pos.distance(*asteroid) > 2500.0 {
@@ -616,7 +616,7 @@ fn despawn_dead() -> BoxedSystem {
616616
)
617617
.with_cmd_mut()
618618
.build(
619-
|mut resources: EntityBorrow<Mutable<StdRng>>,
619+
|mut resources: EntityBorrow<ComponentMut<StdRng>>,
620620
mut q: QueryBorrow<(EntityIds, Component<Vec2>, Component<_>, Opt<_>), _>,
621621
cmd: &mut CommandBuffer| {
622622
let rng = resources.get().unwrap();
@@ -652,7 +652,7 @@ fn spawn_asteroids(max_count: usize) -> BoxedSystem {
652652
.with_query(Query::new(asteroid()))
653653
.with_cmd_mut()
654654
.build(
655-
move |mut resources: EntityBorrow<Mutable<StdRng>>,
655+
move |mut resources: EntityBorrow<ComponentMut<StdRng>>,
656656
mut players: QueryBorrow<(Component<Vec2>, Component<f32>), _>,
657657
mut existing: QueryBorrow<Component<()>>,
658658
cmd: &mut CommandBuffer| {

0 commit comments

Comments
 (0)