Repository navigation
Give plugins silver, gold and location, and add a Silver tracker plugin - #37
Merged
Merged
Conversation
…ing name is saved The tracker still holds what it read for the saved login until its next read. The id and the profile's name are now given to plugins only when the last profile read was made under the ranking name. The name rule had the same gap before this branch.
… be read The status followed the read's stale flag only, so a read that succeeded without a silver value left old numbers under "Tracking".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugins can now read an account's silver, gold, location, player id and equipment (plugin API version 2), and there is a new plugin that uses it: a silver/hr tracker at
samples/silver-tracker, meant for the plugin hub.Merging this releases the client as v1.1.29, because it changes
src/.Client: plugin API version 2
nulland never throws, so XP tracking and the leaderboard can't be broken by it.fourfold.profile.get(accountId)returns{ silver, gold, location, playerId, updatedAt, isStale }.fourfold.stats.getgainsequipment: { armor, helmet, hair, weapon }.apiVersionis now 2. Version 1 plugins run as before. An older FourFold meeting a version 2 plugin shows the existing "Update FourFold to use this plugin."playerIdandinGameNameare given only when the last profile read was made under the account's Ranking username. Without that, the id would lead a plugin to a public page showing the saved login's name. This also closes a gapinGameNamealready had: for one read after a Ranking username was saved, it returned the login's profile name.Plugin: Silver tracker
One block per open account: silver/hr (earned only, over a rolling hour, the XP tracker's rate window ported to JavaScript), session earned and net, balance, a silver goal with time to goal, and a Reset button. One overlay card per account. Sessions are in memory only; goals are saved.
Also
PLUGIN_AUTHORS.mddocuments the new API and the new sample.samples/**joins the release ignore list, so a later plugin-only change doesn't release the client.What was run
FourFoldAccountManager.Core.Tests: 310 passed.FourFoldAccountManager.Desktop.Tests: 29 passed.node samples/silver-tracker/.check/rate.check.mjs: passed.check, run locally against this branch: accepted, withapp.js,index.html,plugin.json,rate.mjsandstyle.cssin the package and the.checkfolder left out.window.fourfold: baseline, rate, spending, goal entry, an invalid goal, "Reached", Reset, a read arriving while a goal box has focus, and card text lengths all behaved. No console errors.What was not run
To check by hand
Copy
samples/silver-trackerinto%LOCALAPPDATA%\FourFoldAccountManager\dev-plugins, switch on Developer mode, and run this branch's build.(await fourfold.profile.get(id)).playerIdisnullfor it.Known limits
Empty), notnull.The hub listing is a separate pull request in the hub repository, after this one is merged and released.