Closed FutureAstroMiner closed 2 years ago
Interesting. I like skipping the find-check for the extractor when there are no minerals.
Also, I would have just changed the return value of getCreepMemory()
to use the role harvester.minerals
as before, but this way is actually even better and allows us to get rid of that pseudo-role. So thanks for the PR.
The code style isn't quite perfect, but I'll merge this anyway since I'm in the process of cleaning up the codebase anyway, so I can fix it later.
Mineral harvesters were being spawned with "harvester" as the role but the filter on the spawn role was looking for "harvester.mineral".
This fixes the filter on the spawn role to look for the correct role by using the prototype on the mineral.