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

Player activity tracker: refactoring #768

Merged

Conversation

modos189
Copy link
Contributor

I looked at what changes the Player Tracker add-on was making and updated the Player activity tracker code at some points. This was to use this add-on as an example to make it easier for other plugins to make changes to Player activity tracker. On the other hand, I made only those changes that will not be unnecessary in our code base.

What's done:

  1. The ago function has been moved to window.formatAgo and has more possibilities, tests for the function have been written
  2. Instead of polyLineByAgeEnl and polyLineByAgeRes the polyLineByPlayerAndAge is used, specifying the player's name.
  3. Added window.PLAYER_TRACKER_MAX_DISPLAY_EVENTS variable containing the maximum number of displayed actions
  4. Added window.plugin.playerTracker.getDrawnTracesByTeam function to refer to layers

These changes should not affect the plugin's functionality, but will simplify the development of third-party plugins that use Player activity tracker

Copy link

github-actions bot commented Oct 26, 2024

🤖 Pull request artifacts

file commit
IITC_Mobile-test.apk 3afb6c8
test-0.39.1.20241110.122422.zip 3afb6c8

See build on website

@modos189 modos189 force-pushed the feature/extend-player-tracker-plugins branch from 78f3307 to 3afb6c8 Compare November 10, 2024 12:24
@modos189 modos189 merged commit 1fcbd28 into IITC-CE:master Nov 10, 2024
4 checks passed
@modos189 modos189 deleted the feature/extend-player-tracker-plugins branch November 10, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants