feat: Allow TileState to hold ItemType (Seeds)
This commit is contained in:
@@ -55,7 +55,7 @@ fn dump_savegame(
|
||||
for y in 0..grid.height {
|
||||
if let Ok(entity) = grid.get_tile((x, y)) {
|
||||
if let Ok(state) = tile_query.get(entity) {
|
||||
col.push(*state);
|
||||
col.push(state.clone());
|
||||
} else {
|
||||
col.push(TileState::Unclaimed);
|
||||
}
|
||||
@@ -146,7 +146,7 @@ fn load_savegame(
|
||||
if x < grid.width && y < grid.height {
|
||||
if let Ok(entity) = grid.get_tile((x, y)) {
|
||||
if let Ok(mut state) = tile_query.get_mut(entity) {
|
||||
*state = save_data.tiles[x as usize][y as usize];
|
||||
*state = save_data.tiles[x as usize][y as usize].clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user