migratetion to 0.18.0

This commit is contained in:
2026-02-16 00:02:00 +00:00
parent a9040a4c9e
commit 4ef68c4e04
17 changed files with 1260 additions and 732 deletions
+12 -9
View File
@@ -130,9 +130,10 @@ pub fn item_tile_management_system(
// Single item: ensure visible
if items.len() <= 1 {
if let Some(&entity_id) = items.first() {
let entity = Entity::from_raw(entity_id);
if let Ok(mut rotation_state) = item_query.get_mut(entity) {
rotation_state.should_be_visible = true;
if let Some(entity) = Entity::from_raw_u32(entity_id) {
if let Ok(mut rotation_state) = item_query.get_mut(entity) {
rotation_state.should_be_visible = true;
}
}
}
continue;
@@ -146,17 +147,19 @@ pub fn item_tile_management_system(
.unwrap_or(0);
for &entity_id in items {
let entity = Entity::from_raw(entity_id);
if let Ok(mut rotation_state) = item_query.get_mut(entity) {
rotation_state.should_be_visible = false;
if let Some(entity) = Entity::from_raw_u32(entity_id) {
if let Ok(mut rotation_state) = item_query.get_mut(entity) {
rotation_state.should_be_visible = false;
}
}
}
let next_index = (current_index + 1) % items.len();
if let Some(&next_entity_id) = items.get(next_index) {
let next_entity = Entity::from_raw(next_entity_id);
if let Ok(mut rotation_state) = item_query.get_mut(next_entity) {
rotation_state.should_be_visible = true;
if let Some(next_entity) = Entity::from_raw_u32(next_entity_id) {
if let Ok(mut rotation_state) = item_query.get_mut(next_entity) {
rotation_state.should_be_visible = true;
}
}
}