Skip to content

Commit

Permalink
Fix entity search
Browse files Browse the repository at this point in the history
  • Loading branch information
tburrows13 committed Oct 24, 2024
1 parent 228f8af commit 5e57336
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,8 @@ function Search.blocking_search(force, state, target_item, surface_list, type_li
-- Or just try an entity with the same name as the item
target_entity_name = target_name
end
if prototypes.entity[target_entity_name] then
-- Type will be table if storage.item_to_entities succeeded. We know they are all valid entities
if type(target_entity_name) == "table" or prototypes.entity[target_entity_name] then
entities = surface.find_entities_filtered{
name = target_entity_name,
force = { force, "neutral" },
Expand Down

0 comments on commit 5e57336

Please sign in to comment.