Files
@ r27636:dd08900a2d5c
Branch filter:
Location: cpp/openttd-patchpack/source/src/network/network_base.h - annotation
r27636:dd08900a2d5c
1.8 KiB
text/x-c
Fix #11054: Prevent translation of currency codes.
Most languages stick with the 3-letter latin currency codes in the name
string, however some translations are... clever... and use the currency
symbol instead. Whilst this may look nice, it can cause issues with fonts
as some scripts have a specific limited set of fonts which do not include
these symbols.
Instead, hard code the currency code list and add it when drawing the
currency name.
Most languages stick with the 3-letter latin currency codes in the name
string, however some translations are... clever... and use the currency
symbol instead. Whilst this may look nice, it can cause issues with fonts
as some scripts have a specific limited set of fonts which do not include
these symbols.
Instead, hard code the currency code list and add it when drawing the
currency name.
r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r10468:83faa36bfb14 r10468:83faa36bfb14 r10468:83faa36bfb14 r10468:83faa36bfb14 r10468:83faa36bfb14 r10468:83faa36bfb14 r14248:a9050881acd7 r11969:3526c3cc75dc r14248:a9050881acd7 r25289:7c44ede418ad r27166:64e04a3ef9b1 r10468:83faa36bfb14 r17641:a80e43fd2f5e r17360:71e102cec3ce r11967:df0600d2c7e7 r10475:42f4d4bdb35c r17641:a80e43fd2f5e r11967:df0600d2c7e7 r25494:4c9126caa0f2 r25494:4c9126caa0f2 r25494:4c9126caa0f2 r27166:64e04a3ef9b1 r10468:83faa36bfb14 r17641:a80e43fd2f5e r17641:a80e43fd2f5e r17641:a80e43fd2f5e r17641:a80e43fd2f5e r10475:42f4d4bdb35c r13220:c788cc7e3fde r17588:0297fca9cfa3 r17588:0297fca9cfa3 r10468:83faa36bfb14 r10468:83faa36bfb14 r10468:83faa36bfb14 | /*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file network_base.h Base core network types and some helper functions to access them. */
#ifndef NETWORK_BASE_H
#define NETWORK_BASE_H
#include "network_type.h"
#include "core/address.h"
#include "../core/pool_type.hpp"
#include "../company_type.h"
#include "../date_type.h"
#include "../timer/timer_game_calendar.h"
/** Type for the pool with client information. */
typedef Pool<NetworkClientInfo, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENT> NetworkClientInfoPool;
extern NetworkClientInfoPool _networkclientinfo_pool;
/** Container for all information known about a client. */
struct NetworkClientInfo : NetworkClientInfoPool::PoolItem<&_networkclientinfo_pool> {
ClientID client_id; ///< Client identifier (same as ClientState->client_id)
std::string client_name; ///< Name of the client
CompanyID client_playas; ///< As which company is this client playing (CompanyID)
TimerGameCalendar::Date join_date; ///< Gamedate the client has joined
/**
* Create a new client.
* @param client_id The unique identifier of the client.
*/
NetworkClientInfo(ClientID client_id = INVALID_CLIENT_ID) : client_id(client_id) {}
~NetworkClientInfo();
static NetworkClientInfo *GetByClientID(ClientID client_id);
};
#endif /* NETWORK_BASE_H */
|