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

Adjust log parser regular expressions to handle PLA weapons #259

Merged

Conversation

Sentennial
Copy link
Contributor

PLA weapons have a dash, which wasn't being captured with the original regex.

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.

Looks good to me, spoke in discord about the player died/player damaged chains.

@Sentennial
Copy link
Contributor Author

Sentennial commented Dec 28, 2022

Just for the sake of completeness;
This is a log line for a Wound, where the old regex captures correctly
[2022.12.28-02.23.50:489][757]LogSquadTrace: [DedicatedServer]Wound(): Player:WhosRecruit KillingDamage=59.347229 from BP_PlayerController_C_2144942497 caused by BP_40MM_Proj2_C_2144829977

However, it won't match a Wound using a PLA weapon such as:
[2022.12.28-02.17.58:218][895]LogSquadTrace: [DedicatedServer]Wound(): Player:Undeadphule KillingDamage=62.000004 from BP_PlayerController_C_2144839762 caused by BP_QBZ95-1_Optic_Tracer_C_2144836238

Note the -1 in the weapon name. The old regex assumes only alphanumeric characters and underscores. The proposed new regex includes a dash in the capture group.

Example of change working with Kill Feed reporting a PLA weapon kill:
img

@Thomas-Smyth Thomas-Smyth merged commit b8c1d0c into Team-Silver-Sphere:master Dec 28, 2022
@Thomas-Smyth Thomas-Smyth added core bug Bug related to the core SquadJS API patch Patch Change labels Dec 29, 2022
@Thomas-Smyth Thomas-Smyth changed the title Adjust regex to capture wounds by PLA weapons. Adjust log parser regular expressions to handle PLA weapons. Dec 29, 2022
@Thomas-Smyth Thomas-Smyth changed the title Adjust log parser regular expressions to handle PLA weapons. Adjust log parser regular expressions to handle PLA weapons Dec 29, 2022
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