jyhad
April 7, 2018, 6:04pm
1
How can you tell what is considered a weapon when sanderling parses tooltips?
I know that you can fit weapon, hover over to get tooltip and look at sanderling parse …
I mean is there a way I can tell what the sanderling framework considers to be a weapon?
Viir
(Michael Rätzel)
April 9, 2018, 8:06am
2
I remember there is a boolean property called IsWeapon
on a type which represents a tooltip. I guess that is what you mean.
I search the Sanderling repository on github for the string IsWeapon
: Repository search results · GitHub
Using this textsearch yields several results, one of them is this:
{
return;
}
var LabelRegexMatchSuccessIgnoreCase = new Func<string, bool>(
pattern => raw?.LabelText?.Any(label => label?.Text?.RegexMatchSuccess(pattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase) ?? false) ?? false);
var LabelAnyRegexMatchSuccessIgnoreCase = new Func<string[], bool>(
setPattern => setPattern?.Any(LabelRegexMatchSuccessIgnoreCase) ?? false);
IsWeapon = LabelAnyRegexMatchSuccessIgnoreCase(IsWeaponSetIndicatorLabelRegexPattern);
IsTargetPainter = LabelAnyRegexMatchSuccessIgnoreCase(IsTargetPainterSetIndicatorLabelRegexPattern);
IsHardener = LabelAnyRegexMatchSuccessIgnoreCase(IsHardenerSetIndicatorLabelRegexPattern);
IsAfterburner = LabelRegexMatchSuccessIgnoreCase("Afterburner");
IsMicroWarpDrive = LabelRegexMatchSuccessIgnoreCase("Microwarpdrive");
IsShieldBooster = LabelAnyRegexMatchSuccessIgnoreCase(IsShieldBoosterSetIndicatorLabelRegexPattern);
I guess this is the assignment where the decision is made for the given tooltip whether it is considered a weapon.
jyhad
April 9, 2018, 2:46pm
3
Thanks …
I was running a script and it was not recognizing a meta weapon as a weapon … but I will mess about with the code to see if I can get it to see it as weapon in the above code.