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

Update player-tracker.user.js #975

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update player-tracker.user.js #975

wants to merge 2 commits into from

Conversation

SteelToad
Copy link

Added tracking of fields and +/mu gains
Changed logic used to processing data and displaying data
Implemented separate time limits for fields and events
Added variables for limiting number of output lines for events or fields

Caveat's :
Cannot track when two fields of identical MU count are made at the same time such as splitting a tiny field to create 2 x 1 mu field

Can create a lengthy popup window. This could be alleviated by creating tabs on the popup for Events/+MU/-MU, or by making the pop-up scrollable

It may be better to add this functionality as a separate plugin that could augment player tracker as it is now.

Notes:
I've tried to comment my changes for readability
My code formatting is a little different than you usually see with JavaScript
My first attempt at anything IITC related, and the first javascript I've done for a while
Criticism & Comments most welcome.

functional copy of the code at http://steeltoad.com/experimentalpt.user.js

Added tracking of fields and +/mu gains
Changed logic used to processing data and displaying data
Implemented separate time limits for fields and events
Added variables for limiting number of output lines for events or fields
@SteelToad
Copy link
Author

2015-04-06 091713 screenshot

@lablua
Copy link
Contributor

lablua commented Apr 9, 2015

It seems like something with this change is messing with the fading on the markers for agents that haven't been active in awhile.

I also wonder if you considered making it more compact by just displaying the +MU next to the locations they were at, though that only works if you add up multiple fields from a single spot.

Line 570  forgot to change to PLAYER_TRACKER_MAX_EVENT_TIME  causing an error in calculating amount of fade over time
@SteelToad
Copy link
Author

Thanks, Line 570, I forgot to change the PLAYER_TRACKER_MAX_TIME to PLAYER_TRACKER_MAX_EVENT_TIME

I had considered 3 possibilities:

  1. just listing the MU changes as a link which would open a new popup
  2. make the popup scrollable
  3. add tabs to the popup for [Events] [+ MU] [-MU]

1 - would be annoying if you were trying to look at the mu for various agents
2 - (same as 1) but could also look sloppy
3 - would introduce the problem of do you start on the event tab or the last tab you were looking at

@lablua
Copy link
Contributor

lablua commented Apr 10, 2015

Option 1 (popup) might not be bad if it was a link next to each portal they were at, with the MU total at that portal, so you only need the popup when you want a lot of detail.

A possible solution to the various agents problem is to have a pop up available from the sidebar that is a combined list of all agents, with an option to sort or filter by faction.

@SteelToad
Copy link
Author

The individual MU counts are links to the portal at which they were created. Setting the hover-over text for those mu counts as the portal name would provide the mu, portal name, and link all with easy access

return new Date().getTime() - window.PLAYER_TRACKER_MAX_EVENT_TIME;

window.plugin.playerTracker.getFieldLimit = function() // (Ray) separate limit for fields
return new Date().getTime() - window.PLAYER_TRACKER_MAX_FIELD_TIME;

Copy link
Contributor

Choose a reason for hiding this comment

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

missing brackets; won't compile

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.

3 participants