Skip to content

Commit

Permalink
Fix Issues After Rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
zicklag committed Oct 6, 2022
1 parent 45100de commit 63eee99
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ impl AssetLoader for ItemLoader {
dependencies.push(image_path);
meta.image.image_handle = image_handle;

match meta.kind {
match &mut meta.kind {
ItemKind::BreakableBox {
ref mut item_handle,
ref item,
Expand Down Expand Up @@ -396,16 +396,16 @@ impl AssetLoader for ItemLoader {
spritesheet.atlas_handle.push(atlas_handle);
}
}

ItemKind::Script {
script,
script_handle,
ref mut script_handle,
} => {
let (script_path, loaded_script_handle) =
get_relative_asset(load_context, load_context.path(), script);
dependencies.push(script_path);
*script_handle = loaded_script_handle;
}
_ => {}
}

load_context.set_default_asset(LoadedAsset::new(meta).with_dependencies(dependencies));
Expand Down
2 changes: 1 addition & 1 deletion src/fighter_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ fn throwing(
item_handle: items_assets.add(item_meta.clone()),
};
let item_commands = commands.spawn_bundle(ItemBundle::new(&item_spawn_meta));
ItemBundle::spawn(item_commands, &item_spawn_meta, &mut items_assets);
ItemBundle::spawn(item_commands, &item_spawn_meta, &mut items_assets, &mut active_scripts);

if let Some(mut available_attacks) = available_attacks {
available_attacks.0.pop();
Expand Down
1 change: 0 additions & 1 deletion src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ impl Projectile {
attack: Attack {
damage: match item_meta.kind {
crate::metadata::ItemKind::Throwable { damage } => damage,
crate::metadata::ItemKind::Health { .. } => panic!("Cannot throw health item"),
crate::metadata::ItemKind::BreakableBox { damage, .. } => damage,
crate::metadata::ItemKind::MeleeWeapon { .. }
| crate::metadata::ItemKind::ProjectileWeapon { .. } => {
Expand Down

0 comments on commit 63eee99

Please sign in to comment.