Loading

Paste #pwjr1knwo

  1.     function PerformTownActions() {
  2.         if (!cvgs.IsCompanyValueGSGame() || cvgs.GetCompanyIDRank(AICompany.ResolveCompanyID(AICompany.COMPANY_SELF)) == 1) {
  3.             local cargoId = Utils.getCargoId(cargoClass);
  4.  
  5.             local stationList = AIStationList(AIStation.STATION_ANY);

Paste #pwcf1wdzf

  1.                 if (!AITown.HasStatue(town)) {
  2.                     if (AITown.IsActionAvailable(town, AITown.TOWN_ACTION_BUILD_STATUE)) {
  3.                         local perform_action = true;
  4.                         if (cvgs.IsCompanyValueGSGame() && cvgs.GetCompanyIDRank(AICompany.ResolveCompanyID(AICompany.COMPANY_SELF)) == 1 && cvgs.RankingList().Count() > 1) {
  5.                             AILog.Info("Cost of perfoming action: " + TestPerformTownAction().TestCost(town, AITown.TOWN_ACTION_BUILD_STATUE) + " ; Value difference to company behind: " + cvgs.GetCompanyIDDiffToNext(AICompany.ResolveCompanyID(AICompany.COMPANY_SELF), false));
  6.                             if (TestPerformTownAction().TestCost(town, AITown.TOWN_ACTION_BUILD_STATUE) > cvgs.GetCompanyIDDiffToNext(AIC

Paste #pk6kvijmi

  1. //////////
  2. main.nut
  3. //////////
  4.  
  5. class LuDiAIAfterFix extends AIController {

Paste #pu4p4v5p3

  1. diff --git a/_layouts/default.html b/_layouts/default.html
  2. index badb9a7..d35ab8c 100644
  3. --- a/_layouts/default.html
  4. +++ b/_layouts/default.html
  5. @@ -38,7 +38,7 @@

Paste #prudxgwg7

  1. (bin35) iron-horse$ make clean
  2. [CLEANING]
  3. [DONE]
  4. (bin35) iron-horse$ time make PW=16
  5. [RENDER GRAPHICS] render_graphics.py

Paste #p5wy9orf7

  1. uint16 _slowD;       ///< factor of slowing game down , 1 is normal speed
  2. uint64 _dateS;
  3. uint16 _dayn(0);       ///< factor of slowing game down , 1 is normal speed
  4. Date      _date;       ///< Current date in days (day counter)
  5. unsigned char _yearn ;       ///< regular game year

Paste #pnqztwfas

  1. diff --git a/src/newgrf_animation_type.h b/src/newgrf_animation_type.h
  2. index 1f3995f46d..5ccc81d3a8 100644
  3. --- a/src/newgrf_animation_type.h
  4. +++ b/src/newgrf_animation_type.h
  5. @@ -46,11 +46,12 @@ enum IndustryAnimationTrigger {

Paste #pyni4xdxb

  1. /// Somewhere in english.txt
  2. STR_AI_SETTINGS_CAPTION                                         :{WHITE}{STRING} Parameters of {RAW_STRING}
  3.  
  4. /// Somewhere in AI Settings Window widget construction
  5.         NWidget(WWT_CAPTION, COLOUR_MAUVE, WID_AIS_CAPTION), SetDataTip(STR_AI_SETTINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),

Paste #pnhvryzz0

  1.     if (_next_competitor_start == 0) {
  2.         _next_competitor_start = max(1, AI::GetStartNextTime() * DAY_TICKS);
  3.     }
  4.  
  5.     if (--_next_competitor_start == 0) {

Paste #pjysl6t8a

  1.     if (AI::CanStartNew() && _game_mode != GM_MENU && --_next_competitor_start == 0) {
  2.         /* Allow multiple AIs to possibly start in the same tick. */
  3.         do {
  4.             if (!MaybeStartNewCompany()) break;
  5.         } while (AI::GetStartNextTime() == 0);
  6.     }

Paste #pzkhn4386

  1.         /* This station can be used, add it to st1/st2 */
  2.         if (st1 == NULL) {
  3.             st1 = st; best_rating1 = st->goods[type].rating;
  4.         } else if (owner == MAX_COMPANIES || st1->owner == OWNER_NONE || st->owner == OWNER_NONE || (st->owner == owner && st->owner == st1->owner) || (st->owner != owner && st1->owner != owner)) {
  5.             if (st->goods[type].rating >= best_rating1) {

Paste #ptqh0myzz

  1.         if (economy==0) {
  2.             produce (blast_furnace_simple_produce_0,
  3.                     [
  4.                             IORE: incoming_cargo_waiting("IORE");
  5.                             COAL: incoming_cargo_waiting("COAL");

Paste #pp4mfiqxw

  1. print("Enter the range, values separated by comma:")
  2. [a,b] = [int(z) for z in input().split(',')]
  3. odd = set('13579')
  4. l = []
  5. for n in range(a, b + 1):

help me turn this into a

  1.     /* Count number of AI companies to start. */
  2.     uint num_to_start = 0;
  3.     do {
  4.         if (_networking && num_companies + num_to_start >= _settings_client.network.max_companies) break;
  5.         if (num_ais + num_to_start >= (uint)_settings_game.difficulty.max_no_competitors) break;

Paste #pfuhbl0yr

  1.             if (company_id != INVALID_COMPANY) {
  2.                 if (company_id >= MAX_COMPANIES) return CMD_ERROR;
  3.                 if (ais_to_start != 1) return CMD_ERROR;
  4.                 if (Company::IsValidID(company_id)) return CMD_ERROR;
  5.             }