mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Fix cache for get_storage_for_stack
This commit is contained in:
@@ -406,7 +406,7 @@ function ExpUtil.get_storage_for_stack(options)
|
|||||||
|
|
||||||
-- Perform a search if on has not been done already
|
-- Perform a search if on has not been done already
|
||||||
local cache = options.cache
|
local cache = options.cache
|
||||||
if cache then
|
if not cache then
|
||||||
local entities = surface.find_entities_filtered(options)
|
local entities = surface.find_entities_filtered(options)
|
||||||
cache = {
|
cache = {
|
||||||
entities = entities,
|
entities = entities,
|
||||||
@@ -415,7 +415,6 @@ function ExpUtil.get_storage_for_stack(options)
|
|||||||
}
|
}
|
||||||
options.cache = cache
|
options.cache = cache
|
||||||
end
|
end
|
||||||
--- @cast cache -nil
|
|
||||||
|
|
||||||
-- Find a valid entity from the search results
|
-- Find a valid entity from the search results
|
||||||
local current, count, entities = cache.current, cache.count, cache.entities
|
local current, count, entities = cache.current, cache.count, cache.entities
|
||||||
|
|||||||
Reference in New Issue
Block a user