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

Expose kill and death scores #1489

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

OhPointFive
Copy link
Contributor

This makes the kill and death scores of a ScoreMatchModule publicly visible.

Motivation

We use this to check if a map cares about kills or not.

Specifically, if someone enters a scorebox on a map where there is a kill score, we scale their droplet reward with the number of points the scorebox is worth, since the 10 point scorebox on BlockBlock is more significant than a 3 point scorebox on Facility. On maps with no kill score, the point value of the scorebox likely is not related to how important or difficult it is to score, so we use a fixed value instead.

Since we're using the kill score when looking at a scorebox, we can't easily get the kill score off a MatchPlayerScoreEvent.

The death score is also made public since it seems weird to only provide the one.

Signed-off-by: OhPointFive <[email protected]>
@Pablete1234
Copy link
Member

Maybe expose score config instead? It's essentially the "definition" equivalent that many other modes have (eg: CoreDefinition) that you can get simply by .getDefinition()

Would probably make sense to make the ScoreConfig be renamed to ScoreDefinition, ensure it has public getters for all fields, and expose it as part of the module in a getDefinition. Maybe turn it into a record too.

@OhPointFive
Copy link
Contributor Author

Looks like it's already a record — it has now been renamed and exposed

@Pablete1234
Copy link
Member

I forgot i had already turned it into a record when i last reworked scoring, so yeah that's good already

@Pablete1234 Pablete1234 merged commit 0dae921 into PGMDev:dev Feb 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants