diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll index 1caad44d..bfe77eca 100644 Binary files a/1.6/1.6/Assemblies/WulaFallenEmpire.dll and b/1.6/1.6/Assemblies/WulaFallenEmpire.dll differ diff --git a/Source/WulaFallenEmpire/EventSystem/AI/Utils/ThingDefSearcher.cs b/Source/WulaFallenEmpire/EventSystem/AI/Utils/ThingDefSearcher.cs index 2801431f..9bacadec 100644 --- a/Source/WulaFallenEmpire/EventSystem/AI/Utils/ThingDefSearcher.cs +++ b/Source/WulaFallenEmpire/EventSystem/AI/Utils/ThingDefSearcher.cs @@ -98,6 +98,11 @@ namespace WulaFallenEmpire.EventSystem.AI.Utils // Exact match if (label == lowerQuery) score = 1.0f; else if (defName == lowerQuery) score = 0.9f; + // Starts with match (High priority for defNames like "WoodLog" when searching "Wood") + else if (defName.StartsWith(lowerQuery)) + { + score = 0.8f + (0.1f * ((float)lowerQuery.Length / defName.Length)); + } // Contains match else if (label.Contains(lowerQuery)) { @@ -106,7 +111,7 @@ namespace WulaFallenEmpire.EventSystem.AI.Utils } else if (defName.Contains(lowerQuery)) { - score = 0.5f; + score = 0.5f + (0.2f * ((float)lowerQuery.Length / defName.Length)); } // Bonus for tradeability (more likely to be what player wants)