Feature #1585 ยป 0086-AI-Fix-comment-typos-found-by-codespell.patch
| ai/default/daicity.c | ||
|---|---|---|
|         v += v1; | ||
|       } else if (v1 > 0) { | ||
|         /* If value of the effect is negative, do not hold it against | ||
|          * the tech - having the tech wont force one to build the | ||
|          * the tech - having the tech won't force one to build the | ||
|          * building. */ | ||
|         /* We might want the technology that will enable this | ||
| ai/default/daidiplomacy.c | ||
|---|---|---|
| /******************************************************************//** | ||
|   Send a diplomatic message. Use this instead of notify directly | ||
|   because we may want to highligh/present these messages differently | ||
|   because we may want to highlight/present these messages differently | ||
|   in the future. | ||
| **********************************************************************/ | ||
| static void dai_diplo_notify(struct player *pplayer, const char *text, ...) | ||
| ... | ... | |
|       break; | ||
|     } | ||
|     /* They were allied with an enemy at the begining of the turn. */ | ||
|     /* They were allied with an enemy at the beginning of the turn. */ | ||
|     if (adip->is_allied_with_enemy | ||
|         && pclause->type != CLAUSE_CEASEFIRE) { | ||
|       dai_diplo_notify(aplayer, _("*%s (AI)* I would like to see you keep your " | ||
| ai/default/daidiplomat.c | ||
|---|---|---|
| #define LOG_DIPLOMAT LOG_DEBUG | ||
| #define LOG_DIPLOMAT_BUILD LOG_DEBUG | ||
| /* 3000 is a just a large number, but not hillariously large as the | ||
| /* 3000 is just a large number, but not hilariously large as the | ||
|  * previously used one. This is important for diplomacy. - Per */ | ||
| #define DIPLO_DEFENSE_WANT 3000 | ||
| ai/default/daihand.c | ||
|---|---|---|
|   TODO: Audit the use of pplayer->ai.maxbuycost in the code elsewhere, | ||
|   then add support for it here. | ||
|   This function first determins the minimum tax rate (rate_tax_min) and a tax | ||
|   rate for a balanced treasury (rate_tax_balance). Similarily, the science | ||
|   This function first determines the minimum tax rate (rate_tax_min) and a tax | ||
|   rate for a balanced treasury (rate_tax_balance). Similarly, the science | ||
|   rates are determiend (rate_sci_min and rate_sci_balance). Considering the | ||
|   minimum rates for tax and science the chance for celebrations is checked. If | ||
|   celebration is possible for more than half of the cities, the needed luxury | ||
| ai/default/daisettler.c | ||
|---|---|---|
|     if (boat_cost == 0 && pclass->adv.sea_move == MOVE_NONE | ||
|         && tile_continent(ptile) != curcont) { | ||
|       /* We have an accidential land bridge. Ignore it. It will in all | ||
|       /* We have an accidental land bridge. Ignore it. It will in all | ||
|        * likelihood go away next turn, or even in a few nanoseconds. */ | ||
|       continue; | ||
|     } | ||
| ai/default/daitools.c | ||
|---|---|---|
|     if (path) { | ||
|       for (i = 1; i < path->length; i++) { | ||
|         if (path->positions[i].tile == path->positions[i - 1].tile) { | ||
|           /* The path-finding code advices us to wait there to refuel. */ | ||
|           /* The path-finding code advice us to wait there to refuel. */ | ||
|           struct tile *ptile = path->positions[i].tile; | ||
|           pf_path_destroy(path); | ||
| ai/default/daiunit.c | ||
|---|---|---|
| /**********************************************************************//** | ||
|   Returns the city with the most need of an airlift. | ||
|   To be considerd, a city must have an air field. All cities with an | ||
|   To be considered, a city must have an air field. All cities with an | ||
|   urgent need for units are serviced before cities in danger. | ||
|   Return value may be nullptr, this means no servicable city found. | ||
| ... | ... | |
|       if (0 == get_transporter_capacity(buddy)) { | ||
|         /* Reduce want based on move cost. We can't do this for | ||
|          * transports since they move around all the time, leading | ||
|          * to hillarious flip-flops. */ | ||
|          * to hilarious flip-flops. */ | ||
|         def >>= move_cost / (2 * unit_move_rate(punit)); | ||
|       } | ||
|       if (def > best_def) { | ||
| ... | ... | |
|    * never learning steam engine, even though ironclads would be very | ||
|    * useful. -- Syela */ | ||
|   adv_want bk = 0; | ||
|   adv_want want;        /* Want (amortized) of the operaton. */ | ||
|   adv_want want;        /* Want (amortized) of the operation. */ | ||
|   adv_want best = 0;    /* Best of all wants. */ | ||
|   struct tile *goto_dest_tile = nullptr; | ||
|   bool can_occupy; | ||
| ... | ... | |
|         want = 0; | ||
|       } else { | ||
|         want = kill_desire(benefit, attack, bcost, vulnerability, 1); | ||
|           /* Take into account maintainance of the unit. */ | ||
|           /* Take into account maintenance of the unit. */ | ||
|           /* FIXME: Depends on the government. */ | ||
|         want -= move_time * SHIELD_WEIGHTING; | ||
|         /* Take into account unhappiness | ||
| ... | ... | |
|         /* If we reached our destination, ferryboat already called | ||
|          * ai_manage_unit() for leader. So no need to continue here. | ||
|          * Leader might even be dead. | ||
|          * If this return is removed, surronding unit_list_iterate() | ||
|          * If this return is removed, surrounding unit_list_iterate() | ||
|          * has to be replaced with unit_list_iterate_safe()*/ | ||
|         return; | ||
|       } | ||
| ai/tex/texaiplayer.c | ||
|---|---|---|
|       initialize_infrastructure_cache(msg->plr); | ||
|       /* Use _safe iterate in case the main thread | ||
|        * destroyes cities while we are iterating through these. */ | ||
|        * destroys cities while we are iterating through these. */ | ||
|       city_list_iterate_safe(msg->plr->cities, pcity) { | ||
|         struct adv_choice *choice; | ||
|         struct texai_build_choice_req *choice_req | ||