adityaravishankar / command-and-conquer

Command & Conquer in HTML5/Javascript
773 stars 168 forks source link

Harvester should automatically find the nearest ore when built #55

Closed cincauhangus closed 12 years ago

cincauhangus commented 12 years ago

The harvester should automatically find the nearest ore patch when the vehicle is built. Harvester should also go back to the refinery whenever ore has been depleted. it should also go back to the ore patch and wait for ore to regenerate. ore collection should be automated entirely.

adityaravishankar commented 12 years ago

As far as I remember, the original game did not do this for newly constructed harvesters. New harvesters would wait to be deployed.... Harvesters from refineries would auto harvest. Can someone confirm?

black-snow commented 12 years ago

Separately built harvesters would not go harvesting on their own. Those who come with new refineries will, though, as there is tiberium within the revealed map area. I don't think harvesters waited for ores to regenerate but will drive back to their last harvesting spot when there is no tiberium within sight (revealed map). They didn't go back to work as soon as it regrew. Need to check this, though.

black-snow commented 12 years ago

Okay I've just checked on this issue. Just as I said, freshly built harvesters from weapon factory do not start seeking for tiberium on their own. Though, harvesters that are sent to the refinery will start harvesting automatically after they have unloaded (and even if they were empty).

cincauhangus commented 12 years ago

Ah, I might have gotten confused with another version of C&C. But I'm sure a harvester will always go back to the refinery even if it's not filled or empty whenever an ore patch is depleted.

I have a question though, will the harvester search the visible map for any new ore deposits or will it just wait at the refinery?

black-snow commented 12 years ago

The harvester will keep on harvesting as long as it can reach any visible ressources. But once it has stopped it wont continue harvesting on its own as ressources regrow. Hence you will need to command it to do so.