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

JobRequirementManager required playtime calculation #695

Open
BlueHNT opened this issue Aug 7, 2024 · 0 comments
Open

JobRequirementManager required playtime calculation #695

BlueHNT opened this issue Aug 7, 2024 · 0 comments

Comments

@BlueHNT
Copy link
Contributor

BlueHNT commented Aug 7, 2024

Description

Currently the playtime tracker tells you the total amount required for the job. What I think should be there instead if PlaytTimeActual which would be PlayTimeRequired - PlayTimeUser so calculate how much you still need. Instead of just being a mere total. This would let users know how much they still need instead of just being a solid number.

Media

image

Shown = Required - Played

simple request, but code is giving me aids.

Insider It currently works like this far as I can tell in JobRequirementsManager.cs as done by Death
    public Dictionary<string, TimeSpan> FetchPlaytimeByRoles()
    {
        var jobsToMap = _prototypes.EnumeratePrototypes<JobPrototype>();
        var ret = new Dictionary<string, TimeSpan>();

        foreach (var job in jobsToMap)
            if (_roles.TryGetValue(job.PlayTimeTracker, out var locJobName))
                ret.Add(job.Name, locJobName);

        return ret;
    }

However I want to replace job.PlayTimeTracker with the difference of the 2 and I have no clue how to do it, which is why I am requesting it.

more or less PlayTimeRequirement = job.PlayTimeTracker.role - job.PlayTimeTracker.played (not actual names)

#584 should have some info on this.

@BlueHNT BlueHNT closed this as completed Aug 8, 2024
@BlueHNT BlueHNT reopened this Aug 8, 2024
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

No branches or pull requests

1 participant