equal
deleted
inserted
replaced
101 DrawStringMultiCenter(140, y, STR_JUST_RAW_STRING, this->width - 4); |
101 DrawStringMultiCenter(140, y, STR_JUST_RAW_STRING, this->width - 4); |
102 } |
102 } |
103 } |
103 } |
104 |
104 |
105 LandInfoWindow(TileIndex tile) : Window(&_land_info_desc) { |
105 LandInfoWindow(TileIndex tile) : Window(&_land_info_desc) { |
106 Player *p = GetPlayer(IsValidPlayer(_local_player) ? _local_player : PLAYER_FIRST); |
106 Player *p = GetPlayer(IsValidPlayerID(_local_player) ? _local_player : PLAYER_FIRST); |
107 Town *t = ClosestTownFromTile(tile, _settings_game.economy.dist_local_authority); |
107 Town *t = ClosestTownFromTile(tile, _settings_game.economy.dist_local_authority); |
108 |
108 |
109 Money old_money = p->player_money; |
109 Money old_money = p->player_money; |
110 p->player_money = INT64_MAX; |
110 p->player_money = INT64_MAX; |
111 CommandCost costclear = DoCommand(tile, 0, 0, 0, CMD_LANDSCAPE_CLEAR); |
111 CommandCost costclear = DoCommand(tile, 0, 0, 0, CMD_LANDSCAPE_CLEAR); |
1362 |
1362 |
1363 void GenerateFileName() |
1363 void GenerateFileName() |
1364 { |
1364 { |
1365 /* Check if we are not a spectator who wants to generate a name.. |
1365 /* Check if we are not a spectator who wants to generate a name.. |
1366 Let's use the name of player #0 for now. */ |
1366 Let's use the name of player #0 for now. */ |
1367 const Player *p = GetPlayer(IsValidPlayer(_local_player) ? _local_player : PLAYER_FIRST); |
1367 const Player *p = GetPlayer(IsValidPlayerID(_local_player) ? _local_player : PLAYER_FIRST); |
1368 |
1368 |
1369 SetDParam(0, p->index); |
1369 SetDParam(0, p->index); |
1370 SetDParam(1, _date); |
1370 SetDParam(1, _date); |
1371 GetString(this->edit_str_buf, STR_4004, lastof(this->edit_str_buf)); |
1371 GetString(this->edit_str_buf, STR_4004, lastof(this->edit_str_buf)); |
1372 SanitizeFilename(this->edit_str_buf); |
1372 SanitizeFilename(this->edit_str_buf); |