complete spatial indexing refactor - SpatialMap
This commit is contained in:
parent
2887bb9736
commit
d439ff6d3f
18 changed files with 351 additions and 217 deletions
|
|
@ -79,12 +79,12 @@ fn evaluate(
|
|||
this_faction: &str,
|
||||
reactions: &mut Vec<(Entity, Reaction)>,
|
||||
) {
|
||||
for other_entity in map.tile_content[idx].iter() {
|
||||
if let Some(faction) = factions.get(*other_entity) {
|
||||
crate::spatial::for_each_tile_content(idx, |other_entity| {
|
||||
if let Some(faction) = factions.get(other_entity) {
|
||||
reactions.push((
|
||||
*other_entity,
|
||||
other_entity,
|
||||
crate::raws::faction_reaction(this_faction, &faction.name, &crate::raws::RAWS.lock().unwrap()),
|
||||
));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue