Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #821112 » 0005-Rename-player.culture-as-player.history.patch

S3_0 - Marko Lindqvist, 2019-06-11 07:01 PM

View differences:

client/packhand.c
2318 2318
    }
2319 2319
  }
2320 2320

  
2321
  pplayer->culture = pinfo->culture;
2321
  pplayer->history = pinfo->history;
2322 2322

  
2323 2323
  /* Don't use player_iterate or player_slot_count here, because we ignore
2324 2324
   * the real number of players and we want to read all the datas. */
common/achievements.c
145 145
  players_iterate(pplayer) {
146 146
    if (achievement_check(ach, pplayer)) {
147 147
      if (!ach->unique) {
148
        pplayer->culture += ach->culture;
148
        pplayer->history += ach->culture;
149 149
        BV_SET(ach->achievers, player_index(pplayer));
150 150
      }
151 151
      player_list_append(achievers, pplayer);
......
166 166

  
167 167
    if (ach->unique) {
168 168
      /* For !ach->unique achievements culture was already added above. */
169
      credited->culture += ach->culture;
169
      credited->history += ach->culture;
170 170
    }
171 171

  
172 172
    /* Mark the selected player as the only one having the achievement */
common/culture.c
43 43
****************************************************************************/
44 44
int player_culture(const struct player *plr)
45 45
{
46
  int culture = plr->culture + get_player_bonus(plr, EFT_NATION_PERFORMANCE);
46
  int culture = plr->history + get_player_bonus(plr, EFT_NATION_PERFORMANCE);
47 47

  
48 48
  city_list_iterate(plr->cities, pcity) {
49 49
    culture += city_culture(pcity);
common/networking/packets.def
870 870
  UINT8 ai_skill_level;
871 871
  BARBARIAN_TYPE barbarian_type;
872 872
  BV_PLAYER gives_shared_vision;
873
  UINT16 culture;
873
  UINT16 history;
874 874
  SINT16 love[MAX_NUM_PLAYER_SLOTS];
875 875

  
876 876
  BOOL color_valid;
common/player.h
296 296
  /* Values to be used next turn. */
297 297
  int multipliers_target[MAX_NUM_MULTIPLIERS];
298 298

  
299
  int culture; /* National level culture - does not include culture of individual
299
  int history; /* National level culture - does not include culture of individual
300 300
                * cities. */
301 301

  
302 302
  union {
server/plrhand.c
1240 1240
  }
1241 1241

  
1242 1242
  if (info_level >= INFO_FULL) {
1243
    packet->culture         = plr->culture;
1243
    packet->history         = plr->history;
1244 1244
  } else {
1245
    packet->culture         = 0;
1245
    packet->history         = 0;
1246 1246
  }
1247 1247
}
1248 1248

  
server/savegame2.c
3215 3215
    }
3216 3216
  }
3217 3217

  
3218
  plr->culture =
3218
  plr->history =
3219 3219
    secfile_lookup_int_default(loading->file, 0, "player%d.culture", plrno);
3220 3220
  plr->server.huts =
3221 3221
    secfile_lookup_int_default(loading->file, 0, "player%d.hut_count", plrno);
server/savegame3.c
4088 4088
    }
4089 4089
  }
4090 4090

  
4091
  plr->culture =
4091
  plr->history =
4092 4092
    secfile_lookup_int_default(loading->file, 0, "player%d.culture", plrno);
4093 4093
  plr->server.huts =
4094 4094
    secfile_lookup_int_default(loading->file, 0, "player%d.hut_count", plrno);
......
4385 4385
                       "player%d.lost_wonders", plrno);
4386 4386
  }
4387 4387

  
4388
  secfile_insert_int(saving->file, plr->culture,
4388
  secfile_insert_int(saving->file, plr->history,
4389 4389
                     "player%d.culture", plrno);
4390 4390
  secfile_insert_int(saving->file, plr->server.huts,
4391 4391
                     "player%d.hut_count", plrno);
server/scripting/api_server_edit.c
626 626
  LUASCRIPT_CHECK_STATE(L);
627 627
  LUASCRIPT_CHECK_SELF(L, pplayer);
628 628

  
629
  pplayer->culture += amount;
629
  pplayer->history += amount;
630 630
}
server/srv_main.c
1363 1363

  
1364 1364
    update_city_activities(pplayer);
1365 1365
    city_thaw_workers_queue();
1366
    pplayer->culture += nation_history_gain(pplayer);
1366
    pplayer->history += nation_history_gain(pplayer);
1367 1367
    research_get(pplayer)->researching_saved = A_UNKNOWN;
1368 1368
    /* reduce the number of bulbs by the amount needed for tech upkeep and
1369 1369
     * check for finished research */
1370
- 
(2-2/3)