Jump to content

Make the multiplayer slot selection text search look inside group names, not just beginning with


Dzsekeb

Recommended Posts

I feel like this would be a very easy QOL change.

Here's the needed change:
File: DCS/MissionEditor/modules/mul_select_role.lua
In function checkFilters(slot, coalition)

At the end of the function, replace the string.sub calls with string.find.

Here's the change, with the old code commented out:

 

for i, value in base.ipairs(searchCategories) do
  local localizedValue = textutil.Utf8ToLowerCase(getLocalizedSlotValue(value, slot[value]))
  --if string.sub(localizedValue, 1, #searchString) == searchString then
  if string.find(localizedValue, searchString, 1, true) then
    return true 
  end
end

--if string.sub(textutil.Utf8ToLowerCase(playerNameBySlot[slot.unitId] or ""), 1, #searchString) == searchString then
if string.find(textutil.Utf8ToLowerCase(playerNameBySlot[slot.unitId] or ""), searchString, 1, true) then
  return true
end

I verified it works ingame


Edited by Dzsekeb
  • Like 2
  • Thanks 3
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...