Merge pull request #233 from hydroflame/incomplete-program-precision

incomplete programs are more precise
This commit is contained in:
danielyxie 2018-05-09 02:09:58 -05:00 committed by GitHub
commit 2bd18e4e61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1283,7 +1283,7 @@ PlayerObject.prototype.finishCreateProgramWork = function(cancelled, sing=false)
this.getHomeComputer().programs.push(programName);
} else {
var perc = Math.floor(this.timeWorkedCreateProgram / this.timeNeededToCompleteWork * 100).toString();
var perc = (Math.floor(this.timeWorkedCreateProgram / this.timeNeededToCompleteWork * 10000)/100).toString();
var incompleteName = programName + "-" + perc + "%-INC";
this.getHomeComputer().programs.push(incompleteName);
}