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

Time in Service Tracker Logs incorrectly for personnel born into the unit. #925

Closed
VampireSeraphin opened this issue Sep 10, 2018 · 5 comments · Fixed by #1462
Closed

Time in Service Tracker Logs incorrectly for personnel born into the unit. #925

VampireSeraphin opened this issue Sep 10, 2018 · 5 comments · Fixed by #1462
Labels
Bug Help Wanted The Core developers are unlikely to work on this and are open to community help Needs Investigation This issue needs investigation and/or triage.

Comments

@VampireSeraphin
Copy link

So, I noticed this morning that the time in service tracker is counting from when an NPC was added to the unit, not from when they were first assigned a rank or role. While normally this is pretty trivial, it has given some of the NPCs born into the unit impressive (and pretty hilarious) time in service for 18 year olds.

My suggestion would be that newly born personnel are automatically assigned as dependents with no role, and the tracker is reworked to track from first assigned roll/skill.

@VampireSeraphin
Copy link
Author

Related to this, I just discovered that deceased personnel continue to accrue time in service. I think its nice for MM to be branching out into the zombie genre.

@giorgiga
Copy link
Contributor

Really, MekHQ just remembers the date someone has joined :-)

The zombie army effect is caused by mekhq.campaign.personnel.Person.getTimeInService(GregorianCalendar) not taking Person.deathday into consideration.

The initial issue must be caused by Person.recruitment being set to the birth date, but I couldn't determine how that can happen... as far as my understanding goes, Person.recruitment is initialised with the current campaign date when a person is not a dependant anymore (and newborns are dependants).

@VampireSeraphin
Copy link
Author

Sometimes newborns are assigned skills by MeHq. Perhaps this is overriding the dependents flag?

@pheonixstorm
Copy link
Collaborator

Its possible this is due to turning the feature on AFTER the dependent flag has been set to false but before any job was given. I don't remember what log entry a child gets when born but if its joined then that might confuse it in this edge case. Unless someone accidentally modified the code while fixing bugs or adding another feature. There should be a check during init to keep dependents from getting a TiS.

I will look into it this weekend if I get a chance since this is a 4 day weekend for the kids.

@sixlettervariables sixlettervariables added Bug Help Wanted The Core developers are unlikely to work on this and are open to community help Needs Investigation This issue needs investigation and/or triage. labels Jun 30, 2019
@Windchild292
Copy link
Contributor

I've tackled this as a break from my wider personnel changes.

Zombie time in service has been fixed, and I've investigated any cause of dependents having a recruitment date set before they become a member of the unit and found nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Help Wanted The Core developers are unlikely to work on this and are open to community help Needs Investigation This issue needs investigation and/or triage.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@giorgiga @pheonixstorm @sixlettervariables @VampireSeraphin @Windchild292 and others