UFO: Alien Invasion Issue Tracker
Please log in to bookmark issues
CLOSED  Bug report #5142  -  Incorrect production time calculation when adding/removing workers
Posted Sep 17, 2013 - updated Oct 31, 2015
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
  • Assigned to
  • Progress
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
  • Owned by
    Not owned by anyone
  • Estimated time
    Not estimated
  • Category
  • Resolution
  • Priority
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Targetted for
    icon_milestones.png Not determined
  • Complexity
    icon_customdatatype.png Not determined
  • Platform
    icon_customdatatype.png Not determined
  • Architecture
    icon_customdatatype.png Not determined
Issue description
When adding or removing workers from a project, the new production time is calculated incorrectly. Specifically, the game acts as if the workers had been assigned to that project from the very start, rather than just being assigned now.

For example, for one worker to create Shiva Rounds takes 100 hours. After 8 hours production the time remaining is 92 hours. If one then assigns nine more workers to the project then it would be logical for the remaining time to be adjusted to 9.2 hours (i.e., ten times faster). Instead, the game adjusts the time to 2 hours (i.e., 10 hours for 10 workers to complete the project, minus 8 hours already spent)! If this calculation gives a negative number, the project will complete almost instantly.
Steps to reproduce this issue
 - Start a new game and build a base.
 - Enter the base screen and set production to Shiva 20mm API rounds. The production time now reads 10h.
 - Unhire 9 employees. The production time now reads 100h.
 - Run time forward by 8 hours. The production time now reads 92h.
 - Hire the 9 workers again. The production time now reads 2h. Unhire them again and it returns to 92h.
 - Run time forward by 6 hours. The production time now reads 86h.
 - Hire the 9 workers again. The production time now reads 0h. Unhire them again and it returns to 86h.
 - Finally hire the 9 workers again and let time run at the lowest setting (5 sec). The production will complete almost immediately.