JonathanSafer / screeps

Screeps AI
MIT License
25 stars 8 forks source link

PC should only use powers when needed #70

Closed JonathanSafer closed 4 years ago

JonathanSafer commented 4 years ago

similarly to operate factory, the PC should not operate spawn, obs or extensions unless it is useful to the base. Otherwise we are just wasting Ops.

JonathanSafer commented 4 years ago

Basically operate obs should never get used right now since the obs never tries to long range scan

JonathanSafer commented 4 years ago

operate extensions and spawn are a little more difficult to determine when they should be used (maybe only during military action?)

jordansafer commented 4 years ago

there are functions canOperateObs, canOperateExtensions, canOperateSpawn (i think this is what they are called). So rn this issue is saying they should all return false? I think it's fair to change source/extension to detect if there's a hostile creep in the room or military flag placed

jordansafer commented 4 years ago

TLDR:: Add Util fns

  1. Change operate spawn/extensions, so if any UtilFn returns true, we use them
JonathanSafer commented 4 years ago

Exactly my thought

JonathanSafer commented 4 years ago

Operate extensions and spawn are now activated by usage. Operate observer is disabled until an operated observer is even needed #12 . Operate controller is also activated by usage but drains Ops. As is this particular issue would seem to be resolved.