cleanup
This commit is contained in:
parent
80c34a72b5
commit
662f6ec4aa
1 changed files with 4 additions and 7 deletions
|
|
@ -349,15 +349,12 @@ pub fn try_move_player(delta_x: i32, delta_y: i32, ecs: &mut World) -> bool {
|
|||
let mut item_names: Vec<String> = Vec::new();
|
||||
let mut some = false;
|
||||
for entity in map.tile_content[destination_idx].iter() {
|
||||
if let Some(_hidden) = hidden.get(*entity) {
|
||||
} else {
|
||||
if let Some(_) = names.get(*entity) {
|
||||
if !hidden.get(*entity).is_some() && names.get(*entity).is_some() {
|
||||
let item_name = get_item_display_name(ecs, *entity).0;
|
||||
item_names.push(item_name);
|
||||
some = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// If some names were found, append. Logger = logger is necessary
|
||||
// makes logger called a mutable self. It's not the most efficient
|
||||
// but it happens infrequently enough (once per player turn at most)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue