[freeciv-ai] (PR#6308) Cleanup of ferry handling
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I will attach a patch (in the next email) which cleans and rewrites two
functions: ai_manage_ferryboat and ai_military_gothere.
ai_mil_gothere ceases to be military, settlers can also use it.
If a unit want to go by boat, it can come to the shore and shout for
one. A boat will come.
ai_manage_ferryboat doesn't drive loaded boats anymore, only the empty
ones. If boat is full, it will pass the control to the
passenger-in-charge. If boat is empty, it will look for passengers
using PF and go there.
Some of the calling code has been changed too.
Problems / todos:
1. Units do not agree on a rendez-vous point. Currently units will wait
on the shore for the boats to come, which is ok unless there are railroads.
2. Settlers have different handling, they are done in the end of turn,
so some hacks had to be introduced. We should change settlers imo.
3. Building code is not too great -- currently there are usually more
boats than passengers.
4. We need to keep track of number of passengers and free boats.
Currently boats seek passengers which is suboptimal when there are many
boats. If there are no passengers at all, boats might as well not bother.
I would like to do 4 before the code is committed, possibly 3 as well.
And move gothere function into aitools.
|[Prev in Thread]
||[Next in Thread]|
- [freeciv-ai] (PR#6308) Cleanup of ferry handling,
Gregory Berkolaiko <=