Schoolie440 / ScreepsCoop

Brian, Joe, and Ben's Coop Screeps Repo
0 stars 1 forks source link

Jobs cleanup (energy Collect) #13

Closed Schoolie440 closed 5 years ago

Schoolie440 commented 5 years ago

Currently jobs.js has some copy/pasted source finding/harvesting code. This code is in each job function in the else portion of the if(creep.memory.working) statement. This should be moved to its own function and replaced with a function call in each job.

Schoolie440 commented 5 years ago

Enabled the new energyCollect function to reduce duplicate code

Joe, I used what we had made, we just needed to do jobs.energyCollect for the function call instead of just collectEnergy.