mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-09 08:08:31 -06:00
Potential item search implementation
This commit is contained in:
@@ -96,12 +96,21 @@ function inventory_tab.build(map_data, player_data)
|
||||
end
|
||||
|
||||
if search_item then
|
||||
if not station.deliveries then
|
||||
goto continue
|
||||
end
|
||||
for item_name, _ in pairs(station.deliveries) do
|
||||
if item_name == search_item then
|
||||
goto has_match
|
||||
if station.deliveries then
|
||||
for item_name, _ in pairs(station.deliveries) do
|
||||
if item_name == search_item then
|
||||
goto has_match
|
||||
end
|
||||
end
|
||||
else
|
||||
local comb1_signals, _ = get_signals(station)
|
||||
for _, signal_ID in pairs(comb1_signals) do
|
||||
local item = signal_ID.signal.name
|
||||
if item then
|
||||
if string.match(item, search_item) then
|
||||
goto has_match
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
goto continue
|
||||
|
||||
Reference in New Issue
Block a user