Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tank detection in layer data #274

Merged

Conversation

fantinodavide
Copy link
Contributor

No description provided.

@werewolfboy13
Copy link
Collaborator

So I am the pipeline maintainer, what is the use case again for this?

@fantinodavide
Copy link
Contributor Author

The regex /tank/ is used to determine if a vehicle is a tank, but was also matching other vehicles whose icon is "map_jeep_antitank"

@werewolfboy13 werewolfboy13 self-assigned this Jan 21, 2023
@werewolfboy13
Copy link
Collaborator

Have we checked that no tanks will be missed with this change? I can check the SDK output if needed.

image

Copy link
Contributor

@ect0s ect0s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Looks correct to me,

I did pull down the layers.json and run a few grep expressions on it. Without this fix, we do collide on jeep_antitank.

And with the fix it appears to be correct.

The only edge case, would be if the "icon" type is mislabeled on a vehicle which would be upstream in the wiki code.

cat _tank.txt | sort | uniq -c
    415             "icon": "map_tank",
cat tank.txt | sort | uniq -c
    194             "icon": "map_jeep_antitank",
    415             "icon": "map_tank",

@werewolfboy13 werewolfboy13 changed the title Antitank vehicles are recognized as tanks due to regex too generalized Fixes regex in layer.js to include tanks only. Jan 22, 2023
@werewolfboy13 werewolfboy13 merged commit 537344e into Team-Silver-Sphere:master Jan 22, 2023
@werewolfboy13 werewolfboy13 added the core bug Bug related to the core SquadJS API label Feb 12, 2023
@Thomas-Smyth Thomas-Smyth changed the title Fixes regex in layer.js to include tanks only. Improve tank detection in layer data Feb 12, 2023
@Thomas-Smyth Thomas-Smyth added core feature request Feature request related to the core SquadJS API patch Patch Change and removed core feature request Feature request related to the core SquadJS API labels Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core bug Bug related to the core SquadJS API patch Patch Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants