class Task { totalFramesRequired : number ; startFrame : number ; startSupply : number ; id : number ; progress = 0 ; isCompleted = false ; newWorker : string | null ; newUnit : string | null ; newStructure : string | null ; newUpgrade : string | null ; morphToUnit : string | null ; isLanding : boolean ; addsTechlab : boolean ; addsReactor : boolean ; addMineralWorker : boolean ; param { Number } totalFramesRequired param { Number } startFrame param { Number } startSupply constructor ( totalFramesRequired = 0 , startFrame = - 1 , startSupply = - 1 , id = - 1 ) { this . totalFramesRequired = totalFramesRequired ; this . startFrame = startFrame ; this . startSupply = startSupply ; this . id = id ; this . progress = 0 ; this . isCompleted = false ; this . newWorker = null ; this . newUnit = null ; this . newStructure = null ; this . newUpgrade = null ; this . morphToUnit = null ; this . isLanding = false ; this . addsTechlab = false ; this . addsReactor = false ; this . addMineralWorker = false ; } param { Boolean } hasChrono updateProgress ( hasChrono = false ) { if ( hasChrono ) { this . progress += 1.5 ; } else { this . progress += 1 ; } if ( this . progress >= this . totalFramesRequired ) { this . isCompleted = true ; } } } export default Task ;