@@ -114,7 +114,7 @@ protected override void QueryHelp(List<QueryType> types) {
114114 base . QueryHelp ( types ) ;
115115
116116 Log ( "\r \n Example commands: " ) ;
117- Log ( $ "{ indent + 1 } \" Lúcio|skin=Overwatch 1 \" ") ;
117+ Log ( $ "{ indent + 1 } \" Lúcio|skin=Overwatch Classic \" ") ;
118118 Log ( $ "{ indent + 1 } \" Tracer|skin=Track and Field\" ") ;
119119 Log ( $ "{ indent + 1 } \" Reinhardt|emote=*\" ") ;
120120 Log ( $ "{ indent + 1 } \" Junker Queen|victorypose=*\" ") ;
@@ -351,6 +351,28 @@ public static void SaveUnlock(
351351 }
352352 }
353353
354+ // todo: add previous zhCN name for ow1 skins: "守望先锋"
355+ // but for whatever reason, ow1 and ow2 skins on rcn+zhCN are all called "守望先锋" now
356+ // needs to be fixed first
357+ private static string [ ] OW1SkinAlternateNames = [
358+ "Overwatch 1" , // old en
359+ "オーバーウォッチ 1" , // old jp
360+ "오버워치 1" , // old kr
361+ "《鬥陣特攻》" ,
362+ /* todo, */
363+ "Classic" , // old rcn-en
364+ "Overwatch Classic" // new en
365+ ] ;
366+ private static string [ ] OW2SkinAlternateNames = [
367+ "Overwatch 2" , // old en
368+ "オーバーウォッチ 2" , // old jp
369+ "오버워치 2" , // old kr
370+ "《鬥陣特攻2》" ,
371+ "守望先锋归来" , // old rcn-cn
372+ "Valorous" , // old rcn-en
373+ "Overwatch" , // new en
374+ ] ;
375+
354376 private static bool ShouldDo ( Unlock unlock , IgnoreCaseDict < ParsedArg > ? config , Dictionary < string , TagExpectedValue > ? tags , UnlockType unlockType ) {
355377 if ( unlock . Type != unlockType ) return false ;
356378
@@ -362,32 +384,25 @@ private static bool ShouldDo(Unlock unlock, IgnoreCaseDict<ParsedArg>? config, D
362384 if ( ! config . TryGetValue ( typeLower , out var configForType ) ) {
363385 return false ;
364386 }
365-
366- if ( configForType . ShouldDo ( unlock . GetName ( ) , tags ) ) {
367- return true ;
368- }
369387
370- // todo: decide if i want to ship this
371- // different extracted name from query is confusing
372- // and polluting the spellcheck with these names is also confusing
373- // maybe it could be precise locale mapping instead
374-
375- // todo: add previous zhCN name for ow1 skins: "守望先锋"
376- // but for whatever reason, ow1 and ow2 skins on rcn+zhCN are all called "守望先锋" now
377- // needs to be fixed first
378- /*ReadOnlySpan<string> alternateNames = unlock.GetSTU().m_name.GUID.GUID switch {
379- 0x0DE00000000024D4 =>
380- ["Overwatch 1", "オーバーウォッチ 1", "오버워치 1", "《鬥陣特攻》", "Classic"],
381- 0x0DE000000000CB5F =>
382- ["Overwatch 2", "オーバーウォッチ 2", "오버워치 2", "《鬥陣特攻2》", "守望先锋归来", "Valorous"],
388+ // todo: different extracted name from query is confusing (log?)
389+ // todo: if there are issues with dup names (cn, for now), maybe it could be a precise locale mapping using data instead
390+ ReadOnlySpan < string > alternateNames = unlock . GetSTU ( ) . m_name . GUID . GUID switch {
391+ 0x0DE00000000024D4 => OW1SkinAlternateNames ,
392+ 0x0DE000000000CB5F => OW2SkinAlternateNames , // shared
393+ 0x0DE0000000022DAB => OW2SkinAlternateNames , // echo, freja
394+ 0x0DE00000000179D3 => OW2SkinAlternateNames , // lw
395+ 0x0DE000000001B41C => OW2SkinAlternateNames , // mauga
396+ 0x0DE000000001AE12 => OW2SkinAlternateNames , // illari
397+ 0x0DE000000001CAC5 => OW2SkinAlternateNames , // venture
398+ 0x0DE00000000204E3 => OW2SkinAlternateNames , // hazard
399+ 0x0DE0000000020A28 => OW2SkinAlternateNames , // juno
400+ 0x0DE000000002B1D8 => OW2SkinAlternateNames , // vendetta
401+ 0x0DE0000000029E6A => OW2SkinAlternateNames , // anran
402+ 0x0DE000000002A7CC => OW2SkinAlternateNames , // jetpack cat
383403 _ => [ ]
384404 } ;
385- foreach (var alternateName in alternateNames) {
386- if (configForType.ShouldDo(alternateName, tags)) {
387- return true;
388- }
389- }*/
390-
391- return false ;
405+
406+ return configForType . ShouldDo ( unlock . GetName ( ) , tags , alternateNames ) ;
392407 }
393408}
0 commit comments