mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-21 10:09:42 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 633b054830 | |||
| 22cda2f1b8 | |||
| a0f6275c3a | |||
| c29c7f7932 | |||
| 6097389437 |
@@ -1,3 +1,21 @@
|
||||
0.6.2-RC2 (2008-07-25)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Building through the wrong side of a drive through station was allowed [FS#2166] (r13822)
|
||||
- Fix: Check for vehicle length changes outside a depot (callback 0x11) and give a warning about that [FS#2150] (r13816)
|
||||
- Fix: Several minor memory leaks. They only happened once per game (r13809, 13810)
|
||||
- Fix: Checking for train waiting at other side of two-way signal was broken [FS#2162] (r13806)
|
||||
- Fix: Some revision checking code was unintentionally disabled (r13776)
|
||||
- Fix: Enforce the validity of a NetworkAction (chat packet) issued by a client (r13775)
|
||||
- Fix: Selecting non-full length vehicles in the depot gui would place the "mouse pointer" out of the center of the vehicle making it hard to "aim" [FS#2147] (r13759)
|
||||
- Fix: NewGRF rail continuation would always mark a tunnel on the same axis as connected, even when the tunnel faces the wrong direction (r13734)
|
||||
- Fix: Assumption that non-north tiles of a house do not have the 1x1 building bit set was flawed with some NewGRFs. This caused the amount of houses to differ, which causes the town radii to differ, which causes desyncs when towns are expanded (r13729)
|
||||
- Fix: Possible desync on the autorenew settings 20+ game years (i.e. 4.5+ hours) after a company was started (r13718)
|
||||
- Fix: Any player could construct new companies [FS#2144] (r13716)
|
||||
- Fix: Remove the unique_id from the message that a client has joined as it is only exposes the unique_id more than needed (r13714)
|
||||
- Fix: Possible crash on creating a network packet (r13713)
|
||||
- Fix: Enforce the length restrictions of company and president name in the commands too (r13712)
|
||||
|
||||
|
||||
0.6.2-RC1 (2008-07-16)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Possible buffer overflow in string truncation code (r13700)
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ log() {
|
||||
}
|
||||
|
||||
set_default() {
|
||||
released_version=""
|
||||
released_version="0.6.2-RC2"
|
||||
|
||||
ignore_extra_parameters="0"
|
||||
# We set all kinds of defaults for params. Later on the user can override
|
||||
|
||||
+17
-3
@@ -1,28 +1,37 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.Dd Sep 15, 2007
|
||||
.Dd Jul 20, 2008
|
||||
.Dt OPENTTD 6
|
||||
.Sh NAME
|
||||
.Nm openttd
|
||||
.Nd An open source clone of the Microprose game "Transport Tycoon Deluxe"
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl Defhi
|
||||
.Op Fl Defhix
|
||||
.Op Fl G Ar seed
|
||||
.Op Fl b Ar blitter
|
||||
.Op Fl d Ar [level | cat=lvl[, ...]]
|
||||
.Op Fl c Ar config_file
|
||||
.Op Fl g Ar [savegame]
|
||||
.Op Fl l Ar host[:port]
|
||||
.Op Fl n Ar host[:port][#player]
|
||||
.Op Fl r Ar widthxheight
|
||||
.Op Fl t Ar date
|
||||
.Op Fl m Ar driver
|
||||
.Op Fl s Ar driver
|
||||
.Op Fl v Ar driver
|
||||
.Op Fl b Ar blitter
|
||||
.Sh OPTIONS
|
||||
.Bl -tag -width ".Fl n Ar host[:port][#player]"
|
||||
.It Fl D
|
||||
.It Fl D Ar [host][:port]
|
||||
Start a dedicated server
|
||||
.It Fl G Ar seed
|
||||
Seed the pseudo random number generator
|
||||
.It Fl b Ar blitter
|
||||
Set the blitter, see
|
||||
.Fl h
|
||||
.It Fl c Ar config_file
|
||||
Use 'config_file' instead of 'openttd.cfg'
|
||||
.It Fl d Ar [level]
|
||||
Set debug verbosity for all categories to
|
||||
.Ar level
|
||||
@@ -42,6 +51,9 @@ at start or start a new game if omitted
|
||||
Display a summary of all options and available drivers
|
||||
.It Fl i
|
||||
Force to use the DOS palette (use this if you see a lot of magenta)
|
||||
.It Fl l Ar host[:port]
|
||||
Redirect DEBUG(), See
|
||||
.Fl D
|
||||
.It Fl m Ar driver
|
||||
Set the music driver, see
|
||||
.Fl h
|
||||
@@ -57,6 +69,8 @@ Set the starting date
|
||||
.It Fl v Ar driver
|
||||
Set the video driver, see
|
||||
.Fl h
|
||||
.It Fl x
|
||||
Do not automatically save to config file on exit
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
http://wiki.openttd.org/, http://www.openttd.org
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ by the number below on http://bugs.openttd.org.
|
||||
If the bug report is closed, it has been fixed, which then can be verified
|
||||
in the latest SVN version of /trunk.
|
||||
|
||||
Bugs for 0.6.1
|
||||
Bugs for 0.6.2-RC2
|
||||
------------------------------------------------------------------------
|
||||
URL: http://bugs.openttd.org
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
openttd (0.6.2~RC2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Fri, 25 Jul 2008 22:00:00 +0200
|
||||
|
||||
openttd (0.6.2~RC1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
!define APPNAME "OpenTTD" ; Define application name
|
||||
!define APPVERSION "0.6.2" ; Define application version
|
||||
!define INSTALLERVERSION 49 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
|
||||
!define INSTALLERVERSION 50 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
|
||||
|
||||
!define APPURLLINK "http://www.openttd.org"
|
||||
!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}"
|
||||
|
||||
@@ -239,7 +239,7 @@ Function IsCachedVersion(version)
|
||||
End Function
|
||||
|
||||
Dim version
|
||||
version = DetermineSVNVersion
|
||||
version = "0.6.2-RC2"
|
||||
If Not (IsCachedVersion(version) And FSO.FileExists("../src/rev.cpp") And FSO.FileExists("../src/ottdres.rc")) Then
|
||||
UpdateFiles version
|
||||
End If
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
OpenTTD README
|
||||
Last updated: 2008-07-16
|
||||
Release version: 0.6.2-RC1
|
||||
Last updated: 2008-07-25
|
||||
Release version: 0.6.2-RC2
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
+9
-5
@@ -10,6 +10,7 @@
|
||||
#include "../player_base.h"
|
||||
#include "ai.h"
|
||||
#include "default/default.h"
|
||||
#include "trolly/trolly.h"
|
||||
#include "../signal_func.h"
|
||||
|
||||
AIStruct _ai;
|
||||
@@ -223,6 +224,13 @@ void AI_PlayerDied(PlayerID player)
|
||||
{
|
||||
/* Called if this AI died */
|
||||
_ai_player[player].active = false;
|
||||
|
||||
if (_players_ainew[player].pathfinder == NULL) return;
|
||||
|
||||
AyStarMain_Free(_players_ainew[player].pathfinder);
|
||||
delete _players_ainew[player].pathfinder;
|
||||
_players_ainew[player].pathfinder = NULL;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,9 +252,5 @@ void AI_Initialize()
|
||||
*/
|
||||
void AI_Uninitialize()
|
||||
{
|
||||
const Player* p;
|
||||
|
||||
FOR_ALL_PLAYERS(p) {
|
||||
if (p->is_active && p->is_ai) AI_PlayerDied(p->index);
|
||||
}
|
||||
for (PlayerID p = PLAYER_FIRST; p < MAX_PLAYERS; p++) AI_PlayerDied(p);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ static void MoveVehicleCargo(Vehicle *dest, Vehicle *source)
|
||||
* the complete train, which is without the weight of cargo we just
|
||||
* moved back into some (of the) new wagon(s).
|
||||
*/
|
||||
if (dest->type == VEH_TRAIN) TrainConsistChanged(dest->First());
|
||||
if (dest->type == VEH_TRAIN) TrainConsistChanged(dest->First(), true);
|
||||
}
|
||||
|
||||
static bool VerifyAutoreplaceRefitForOrders(const Vehicle *v, const EngineID engine_type)
|
||||
|
||||
@@ -440,6 +440,20 @@ static void DepotClick(Window *w, int x, int y)
|
||||
WP(w, depot_d).sel = v->index;
|
||||
SetWindowDirty(w);
|
||||
SetObjectToPlaceWnd(image, GetVehiclePalette(v), VHM_DRAG, w);
|
||||
|
||||
switch (v->type) {
|
||||
case VEH_TRAIN:
|
||||
_cursor.short_vehicle_offset = 16 - v->u.rail.cached_veh_length * 2;
|
||||
break;
|
||||
|
||||
case VEH_ROAD:
|
||||
_cursor.short_vehicle_offset = 16 - v->u.road.cached_veh_length * 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
_cursor.short_vehicle_offset = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
+6
-7
@@ -330,7 +330,7 @@ FILE *FioFOpenFileSp(const char *filename, const char *mode, Searchpath sp, Subd
|
||||
|
||||
FILE *FioFOpenFileTar(TarFileListEntry *entry, size_t *filesize)
|
||||
{
|
||||
FILE *f = fopen(entry->tar->filename, "rb");
|
||||
FILE *f = fopen(entry->tar_filename, "rb");
|
||||
assert(f != NULL);
|
||||
|
||||
fseek(f, entry->position, SEEK_SET);
|
||||
@@ -470,9 +470,8 @@ static bool TarListAddFile(const char *filename)
|
||||
FILE *f = fopen(filename, "rb");
|
||||
assert(f != NULL);
|
||||
|
||||
TarListEntry *tar_entry = MallocT<TarListEntry>(1);
|
||||
tar_entry->filename = strdup(filename);
|
||||
_tar_list.insert(TarList::value_type(filename, tar_entry));
|
||||
const char *dupped_filename = strdup(filename);
|
||||
_tar_list[filename].filename = dupped_filename;
|
||||
|
||||
TarHeader th;
|
||||
char buf[sizeof(th.name) + 1], *end;
|
||||
@@ -523,9 +522,9 @@ static bool TarListAddFile(const char *filename)
|
||||
|
||||
/* Store this entry in the list */
|
||||
TarFileListEntry entry;
|
||||
entry.tar = tar_entry;
|
||||
entry.size = skip;
|
||||
entry.position = pos;
|
||||
entry.tar_filename = dupped_filename;
|
||||
entry.size = skip;
|
||||
entry.position = pos;
|
||||
/* Force lowercase */
|
||||
strtolower(name);
|
||||
|
||||
|
||||
+4
-2
@@ -67,13 +67,15 @@ extern const char *_searchpaths[NUM_SEARCHPATHS];
|
||||
*/
|
||||
struct TarListEntry {
|
||||
const char *filename;
|
||||
TarListEntry() : filename(NULL) {}
|
||||
~TarListEntry() { free((void*)this->filename); }
|
||||
};
|
||||
struct TarFileListEntry {
|
||||
TarListEntry *tar;
|
||||
const char *tar_filename;
|
||||
int size;
|
||||
int position;
|
||||
};
|
||||
typedef std::map<std::string, TarListEntry *> TarList;
|
||||
typedef std::map<std::string, TarListEntry> TarList;
|
||||
typedef std::map<std::string, TarFileListEntry> TarFileList;
|
||||
extern TarList _tar_list;
|
||||
extern TarFileList _tar_filelist;
|
||||
|
||||
+3
-2
@@ -965,7 +965,7 @@ void DrawMouseCursor()
|
||||
}
|
||||
|
||||
w = _cursor.size.x;
|
||||
x = _cursor.pos.x + _cursor.offs.x;
|
||||
x = _cursor.pos.x + _cursor.offs.x + _cursor.short_vehicle_offset;
|
||||
if (x < 0) {
|
||||
w += x;
|
||||
x = 0;
|
||||
@@ -993,7 +993,7 @@ void DrawMouseCursor()
|
||||
|
||||
/* Draw cursor on screen */
|
||||
_cur_dpi = &_screen;
|
||||
DrawSprite(_cursor.sprite, _cursor.pal, _cursor.pos.x, _cursor.pos.y);
|
||||
DrawSprite(_cursor.sprite, _cursor.pal, _cursor.pos.x + _cursor.short_vehicle_offset, _cursor.pos.y);
|
||||
|
||||
_video_driver->MakeDirty(_cursor.draw_pos.x, _cursor.draw_pos.y, _cursor.draw_size.x, _cursor.draw_size.y);
|
||||
|
||||
@@ -1244,6 +1244,7 @@ static void SetCursorSprite(SpriteID cursor, SpriteID pal)
|
||||
cv->offs.y = p->y_offs;
|
||||
|
||||
cv->dirty = true;
|
||||
cv->short_vehicle_offset = 0;
|
||||
}
|
||||
|
||||
static void SwitchAnimatedCursor()
|
||||
|
||||
@@ -112,6 +112,7 @@ struct AnimCursor {
|
||||
struct CursorVars {
|
||||
Point pos, size, offs, delta; ///< position, size, offset from top-left, and movement
|
||||
Point draw_pos, draw_size; ///< position and size bounding-box for drawing
|
||||
int short_vehicle_offset; ///< offset of the X for short vehicles
|
||||
SpriteID sprite; ///< current image of cursor
|
||||
SpriteID pal;
|
||||
|
||||
|
||||
@@ -333,8 +333,7 @@ static Foundation GetFoundation_Industry(TileIndex tile, Slope tileh)
|
||||
IndustryGfx gfx = GetIndustryGfx(tile);
|
||||
|
||||
/* For NewGRF industry tiles we might not be drawing a foundation. We need to
|
||||
* account for this, otherwise we might be applying a FOUNDATION_LEVELED
|
||||
* on a steep slope which is not allowed. Furthermore other structures should
|
||||
* account for this, as other structures should
|
||||
* draw the wall of the foundation in this case.
|
||||
*/
|
||||
if (gfx >= NEW_INDUSTRYTILEOFFSET) {
|
||||
|
||||
+5
-1
@@ -76,8 +76,9 @@ uint ApplyFoundationToSlope(Foundation f, Slope *s)
|
||||
if (!IsFoundation(f)) return 0;
|
||||
|
||||
if (IsLeveledFoundation(f)) {
|
||||
uint dz = TILE_HEIGHT + (IsSteepSlope(*s) ? TILE_HEIGHT : 0);
|
||||
*s = SLOPE_FLAT;
|
||||
return TILE_HEIGHT;
|
||||
return dz;
|
||||
}
|
||||
|
||||
if (f != FOUNDATION_STEEP_BOTH && IsNonContinuousFoundation(f)) {
|
||||
@@ -384,6 +385,9 @@ void DrawFoundation(TileInfo *ti, Foundation f)
|
||||
|
||||
AddSortableSpriteToDraw(inclined_base + inclined, PAL_NONE, ti->x, ti->y, 16, 16, 1, ti->z);
|
||||
OffsetGroundSprite(31, 9);
|
||||
} else if (IsLeveledFoundation(f)) {
|
||||
AddSortableSpriteToDraw(leveled_base + SlopeWithOneCornerRaised(highest_corner), PAL_NONE, ti->x, ti->y, 16, 16, 7, ti->z - TILE_HEIGHT);
|
||||
OffsetGroundSprite(31, 1);
|
||||
} else if (f == FOUNDATION_STEEP_LOWER) {
|
||||
/* one corner raised */
|
||||
OffsetGroundSprite(31, 1);
|
||||
|
||||
+3
-3
@@ -2833,7 +2833,7 @@ STR_8858_MAKE_THE_HIGHLIGHTED_ORDER :{BLACK}Označen
|
||||
STR_TIMETABLE_TOOLTIP :{BLACK}Jízdní řád - příkaz vybereš kliknutím.
|
||||
STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Změnit čas pro splnění jízdního příkazu
|
||||
STR_TIMETABLE_CLEAR_TIME_TOOLTIP :{BLACK}Zrušit čas pro splnění jízdního příkazu
|
||||
STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Smazat ukazatel zpoždění, takže vozidlo pojede na čas
|
||||
STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Smazat zpoždění, takže vozidlo pojede na čas
|
||||
STR_SERVICE_HINT :{BLACK}Přeskoč tento cíl, pokud není potřeba pravidelná údržba
|
||||
STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER :{BLACK}Cena: {CURRENCY} Hmotnost: {WEIGHT_S}{}Rychlost: {VELOCITY} Výkon: {POWER}{}Cena provozu: {CURRENCY} ročně{}Kapacita: {CARGO}
|
||||
STR_885C_BROKEN_DOWN :{RED}Porucha
|
||||
@@ -2856,7 +2856,7 @@ STR_886B_CAN_T_RENAME_TRAIN_VEHICLE :{WHITE}Nemohu p
|
||||
STR_MAKE_THE_HIGHLIGHTED_ORDER :{BLACK}U označeného příkazu vozidlo musí vyložit náklad
|
||||
STR_TRANSFER :{BLACK}Překládka
|
||||
STR_CLEAR_TIME :{BLACK}Smazat čas
|
||||
STR_RESET_LATENESS :{BLACK}Smazat ukazatel zpoždění
|
||||
STR_RESET_LATENESS :{BLACK}Zapomenout zpoždění
|
||||
|
||||
STR_TRAIN_STOPPING :{RED}Zastavuje
|
||||
STR_TRAIN_STOPPING_VEL :{RED}Zastavuje, {VELOCITY}
|
||||
@@ -2888,7 +2888,7 @@ STR_9000_ROAD_VEHICLE_IN_THE_WAY :{WHITE}Silničn
|
||||
STR_9001_ROAD_VEHICLES :{WHITE}{COMPANY} - {COMMA} silniční{P "" "" ch} vozid{P lo la el}
|
||||
STR_9002 :{WHITE}{VEHICLE}
|
||||
STR_9003_ROAD_VEHICLE_DEPOT :{WHITE}Garáže pro silniční vozidla {TOWN}
|
||||
STR_9004_NEW_VEHICLES :{BLACK}Nová silniční vozidla
|
||||
STR_9004_NEW_VEHICLES :{BLACK}Nová vozidla
|
||||
STR_9006_NEW_ROAD_VEHICLES :{WHITE}Nová silniční vozidla
|
||||
STR_9007_BUILD_VEHICLE :{BLACK}Koupit silniční vozidlo
|
||||
STR_9009_CAN_T_BUILD_ROAD_VEHICLE :{WHITE}Nemohu koupit nové silniční vozidlo...
|
||||
|
||||
@@ -3129,6 +3129,7 @@ STR_NEWGRF_NOT_FOUND_WARNING :{WHITE}Mangler
|
||||
STR_NEWGRF_UNPAUSE_WARNING_TITLE :{YELLOW}Manglende GRF-fil(er)
|
||||
STR_NEWGRF_UNPAUSE_WARNING :{WHITE}OpenTTD kan gå ned, når spillet sættes i gang igen. Undlad at indsende fejlrapporter for efterfølgende nedbrud.{}Vil du virkelig sætte spillet i gang igen?
|
||||
|
||||
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Spillet er gemt i en version uden sporveje. Alle sporveje er blevet fjernet.
|
||||
STR_CURRENCY_WINDOW :{WHITE}Brugerdefineret møntfod
|
||||
STR_CURRENCY_EXCHANGE_RATE :{LTBLUE}Kurs: {ORANGE}{CURRENCY} = £ {COMMA}
|
||||
STR_CURRENCY_SEPARATOR :{LTBLUE}Tilskuer:
|
||||
|
||||
@@ -3130,6 +3130,10 @@ STR_NEWGRF_NOT_FOUND_WARNING :{WHITE}Missing
|
||||
STR_NEWGRF_UNPAUSE_WARNING_TITLE :{YELLOW}Missing GRF file(s)
|
||||
STR_NEWGRF_UNPAUSE_WARNING :{WHITE}Unpausing can crash OpenTTD. Do not file bug reports for subsequent crashes.{}Do you really want to unpause?
|
||||
|
||||
STR_NEWGRF_BROKEN :{WHITE}Behaviour of NewGRF '{0:STRING}' is likely to cause desyncs and/or crashes.
|
||||
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}It changes vehicle length for '{1:ENGINE}' when not inside a depot.
|
||||
STR_BROKEN_VEHICLE_LENGTH :{WHITE}Train '{VEHICLE}' belonging to '{COMPANY}' has invalid length. It is probably caused by problems with NewGRFs. Game may desync or crash.
|
||||
|
||||
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Game was saved in version without tram support. All trams have been removed.
|
||||
|
||||
STR_CURRENCY_WINDOW :{WHITE}Custom currency
|
||||
|
||||
+1
-34
@@ -699,72 +699,39 @@ STR_023D_RANDOM_TOWN :{BLACK}Suvaline
|
||||
STR_023E_BUILD_TOWN_IN_RANDOM_LOCATION :{BLACK}Ehita linn suvalisse kohta
|
||||
STR_023F_INDUSTRY_GENERATION :{WHITE}Tööstuste loomine
|
||||
STR_0240_COAL_MINE :{BLACK}Kivisöekaevandus
|
||||
STR_0240_COAL_MINE.in :{BLACK}Kivisöekaevanduses
|
||||
STR_0241_POWER_STATION :{BLACK}Elektrijaam
|
||||
STR_0241_POWER_STATION.in :{BLACK}Elektrijaamas
|
||||
STR_0242_SAWMILL :{BLACK}Saeveski
|
||||
STR_0242_SAWMILL.in :{BLACK}Saeveskis
|
||||
STR_0243_FOREST :{BLACK}Mets
|
||||
STR_0244_OIL_REFINERY :{BLACK}Naftarafineerimistehas
|
||||
STR_0244_OIL_REFINERY.in :{BLACK}Naftarafineerimistehases
|
||||
STR_0245_OIL_RIG :{BLACK}Naftapuurplatvorm
|
||||
STR_0245_OIL_RIG.in :{BLACK}Naftapuurplatvormis
|
||||
STR_0246_FACTORY :{BLACK}Tehas
|
||||
STR_0246_FACTORY.in :{BLACK}Tehases
|
||||
STR_0247_STEEL_MILL :{BLACK}Terasetööstus
|
||||
STR_0247_STEEL_MILL.in :{BLACK}Terasetööstuses
|
||||
STR_0248_FARM :{BLACK}Põllumajandusettevõte
|
||||
STR_0248_FARM.in :{BLACK}Põllumajandusettevõttes
|
||||
STR_0249_IRON_ORE_MINE :{BLACK}Rauamaagikaevandus
|
||||
STR_0249_IRON_ORE_MINE.in :{BLACK}Rauamaagikaevanduses
|
||||
STR_024A_OIL_WELLS :{BLACK}Naftapuuraugud
|
||||
STR_024A_OIL_WELLS.in :{BLACK}Naftapuuraukudes
|
||||
STR_024B_BANK :{BLACK}Pank
|
||||
STR_024B_BANK.in :{BLACK}Pangas
|
||||
STR_024C_PAPER_MILL :{BLACK}Paberitehas
|
||||
STR_024C_PAPER_MILL.in :{BLACK}Paberitehases
|
||||
STR_024D_FOOD_PROCESSING_PLANT :{BLACK}Toidutöötlustehas
|
||||
STR_024D_FOOD_PROCESSING_PLANT.in :{BLACK}Toidutöötlustehases
|
||||
STR_024E_PRINTING_WORKS :{BLACK}Trükikoda
|
||||
STR_024E_PRINTING_WORKS.in :{BLACK}Trükikojas
|
||||
STR_024F_GOLD_MINE :{BLACK}Kullakaevandus
|
||||
STR_024F_GOLD_MINE.in :{BLACK}Kullakaevanduses
|
||||
STR_0250_LUMBER_MILL :{BLACK}Saeveski
|
||||
STR_0250_LUMBER_MILL.in :{BLACK}Saeveskis
|
||||
STR_0251_FRUIT_PLANTATION :{BLACK}Puuviljaistandus
|
||||
STR_0251_FRUIT_PLANTATION.in :{BLACK}Puuviljaistanduses
|
||||
STR_0252_RUBBER_PLANTATION :{BLACK}Kummipuuistandus
|
||||
STR_0252_RUBBER_PLANTATION.in :{BLACK}Kummipuuistanduses
|
||||
STR_0253_WATER_SUPPLY :{BLACK}Veepumbad
|
||||
STR_0253_WATER_SUPPLY.in :{BLACK}Veepumpades
|
||||
STR_0254_WATER_TOWER :{BLACK}Veetorn
|
||||
STR_0254_WATER_TOWER.in :{BLACK}Veetornis
|
||||
STR_0255_DIAMOND_MINE :{BLACK}Teemantikaevandus
|
||||
STR_0255_DIAMOND_MINE.in :{BLACK}Teemantikaevanduses
|
||||
STR_0256_COPPER_ORE_MINE :{BLACK}Vasemaagikaevandus
|
||||
STR_0256_COPPER_ORE_MINE.in :{BLACK}Vasemaagikaevanduses
|
||||
STR_0257_COTTON_CANDY_FOREST :{BLACK}Suhkruvatimets
|
||||
STR_0257_COTTON_CANDY_FOREST.in :{BLACK}Suhkruvatimetsas
|
||||
STR_0258_CANDY_FACTORY :{BLACK}Maiustuste tehas
|
||||
STR_0258_CANDY_FACTORY.in :{BLACK}Maiustuste tehases
|
||||
STR_0259_BATTERY_FARM :{BLACK}Patareitalu
|
||||
STR_0259_BATTERY_FARM.in :{BLACK}Patareitalus
|
||||
STR_025A_COLA_WELLS :{BLACK}Koolapumbad
|
||||
STR_025A_COLA_WELLS.in :{BLACK}Koolapumpades
|
||||
STR_025B_TOY_SHOP :{BLACK}Mänguasjapood
|
||||
STR_025B_TOY_SHOP.in :{BLACK}Mänguasjapoes
|
||||
STR_025C_TOY_FACTORY :{BLACK}Mänguasjatehas
|
||||
STR_025C_TOY_FACTORY.in :{BLACK}Mänguasjatehases
|
||||
STR_025D_PLASTIC_FOUNTAINS :{BLACK}Plastmassiallikad
|
||||
STR_025D_PLASTIC_FOUNTAINS.in :{BLACK}Plastmassiallikates
|
||||
STR_025E_FIZZY_DRINK_FACTORY :{BLACK}Kihisevate jookide tehas
|
||||
STR_025E_FIZZY_DRINK_FACTORY.in :{BLACK}Kihisevate jookide tehases
|
||||
STR_025F_BUBBLE_GENERATOR :{BLACK}Mulligeneraator
|
||||
STR_025F_BUBBLE_GENERATOR.in :{BLACK}Mulligeneraatoris
|
||||
STR_0260_TOFFEE_QUARRY :{BLACK}Iirisekaevandus
|
||||
STR_0260_TOFFEE_QUARRY.in :{BLACK}Iirisekaevanduses
|
||||
STR_0261_SUGAR_MINE :{BLACK}Suhkrukaevandus
|
||||
STR_0261_SUGAR_MINE.in :{BLACK}Suhkrukaevanduses
|
||||
STR_0262_CONSTRUCT_COAL_MINE :{BLACK}Ehita kivisöekaevandus
|
||||
STR_0263_CONSTRUCT_POWER_STATION :{BLACK}Ehita elektrijaam
|
||||
STR_0264_CONSTRUCT_SAWMILL :{BLACK}Ehita saeveski
|
||||
@@ -1894,7 +1861,6 @@ STR_205C_PIGGY_BANK :Krossu pank
|
||||
STR_INDUSTRY :{INDUSTRY}
|
||||
STR_TOWN :{TOWN}
|
||||
STR_INDUSTRY_FORMAT :{TOWN} {STRING}
|
||||
STR_INDUSTRY_FORMAT.in :{TOWN} {STRING.in}
|
||||
STR_STATION :{STATION}
|
||||
|
||||
##id 0x2800
|
||||
@@ -3217,6 +3183,7 @@ STR_NEWGRF_NOT_FOUND_WARNING :{WHITE}Mängu l
|
||||
STR_NEWGRF_UNPAUSE_WARNING_TITLE :{YELLOW}Puuduolevad GRF failid
|
||||
STR_NEWGRF_UNPAUSE_WARNING :{WHITE}Pausi lõpetamine võib põhjustada OpenTTD krahhi. Ära teavita järgnevatest krahhidest.{}Oled sa tõepoolest veendunud, et sa soovid pausi lõpetada?
|
||||
|
||||
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Depoost väljas asudes muudab sõiduki '{1:ENGINE}' pikkust.
|
||||
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Mäng salvestati trammide toetuseta versioonis. Kõik trammid eemaldati.
|
||||
STR_CURRENCY_WINDOW :{WHITE}Isiklik valuuta
|
||||
STR_CURRENCY_EXCHANGE_RATE :{LTBLUE}Vahetuskurss: {ORANGE}{CURRENCY} = £ {COMMA}
|
||||
|
||||
@@ -3131,6 +3131,8 @@ STR_NEWGRF_NOT_FOUND_WARNING :{WHITE}Fichier(
|
||||
STR_NEWGRF_UNPAUSE_WARNING_TITLE :{YELLOW}Fichier(s) GRF manquant(s)
|
||||
STR_NEWGRF_UNPAUSE_WARNING :{WHITE}Retirer la pause peut faire planter OpenTTD. Ne créez pas de rapport de bug pour ceux-ci.{}Voulez-vous vraiment retirer la pause?
|
||||
|
||||
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Il modifie la longueur de vehicule pour '{1:ENGINE}' en dehors du dépot.
|
||||
STR_BROKEN_VEHICLE_LENGTH :{WHITE}Le train '{VEHICLE}' appartenant à '{COMPANY}' a une longueur invalide. Celà est probablement dû à des problèmes avec des NewGRFs. Le jeu peut avoir des erreurs de synchronisation ou planter.
|
||||
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Partie sauvegardée avec une version sans support des tramways. Tous les tramways ont été supprimés.
|
||||
STR_CURRENCY_WINDOW :{WHITE}Devise personnalisée
|
||||
STR_CURRENCY_EXCHANGE_RATE :{LTBLUE}Taux de change : {ORANGE}{CURRENCY} = £ {COMMA}
|
||||
|
||||
@@ -3132,6 +3132,8 @@ STR_NEWGRF_NOT_FOUND_WARNING :{WHITE}Mancano
|
||||
STR_NEWGRF_UNPAUSE_WARNING_TITLE :{YELLOW}File GRF mancanti
|
||||
STR_NEWGRF_UNPAUSE_WARNING :{WHITE}Uscire dalla pausa può causare un crash: nel caso, si prega di non inviare segnalazioni bug al riguardo.{}Uscire dalla pausa?
|
||||
|
||||
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}La lunghezza dei veicoli '{1:ENGINE}' può cambiare al di fuori dei depositi.
|
||||
STR_BROKEN_VEHICLE_LENGTH :{WHITE}Il treno '{VEHICLE}' della '{COMPANY}' ha una lunghezza non valida, probabilmente a causa di problemi con un NewGRF. È possibile che si verifichino errori di sincronizzazione o crash.
|
||||
STR_LOADGAME_REMOVED_TRAMS :{WHITE}La partita è stata salvata in una versione senza il supporto per i tram. Tutte le tranvie sono state rimosse.
|
||||
STR_CURRENCY_WINDOW :{WHITE}Valuta personalizzata
|
||||
STR_CURRENCY_EXCHANGE_RATE :{LTBLUE}Cambio: {ORANGE}{CURRENCY} = £ {COMMA}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
STR_NULL :
|
||||
STR_0001_OFF_EDGE_OF_MAP :{WHITE}超过地图边界
|
||||
STR_0002_TOO_CLOSE_TO_EDGE_OF_MAP :{WHITE}距离地图边界过近
|
||||
STR_0003_NOT_ENOUGH_CASH_REQUIRES :{WHITE}没有足够的现金 - 需要 {CURRENCY}
|
||||
STR_0003_NOT_ENOUGH_CASH_REQUIRES :{WHITE}没有足够的资金 - 需要 {CURRENCY}
|
||||
STR_0004 :{WHITE}{CURRENCY}
|
||||
STR_EMPTY :
|
||||
STR_0007_FLAT_LAND_REQUIRED :{WHITE}需要平坦的地面
|
||||
@@ -36,7 +36,7 @@ STR_001D_DIAMONDS :钻石
|
||||
STR_001E_FOOD :食品
|
||||
STR_001F_PAPER :纸张
|
||||
STR_0020_GOLD :金子
|
||||
STR_0021_WATER :水
|
||||
STR_0021_WATER :矿泉水
|
||||
STR_0022_WHEAT :小麦
|
||||
STR_0023_RUBBER :橡胶
|
||||
STR_0024_SUGAR :蔗糖
|
||||
@@ -47,7 +47,7 @@ STR_0028_COTTON_CANDY :棉花糖
|
||||
STR_0029_BUBBLES :泡泡
|
||||
STR_002A_TOFFEE :太妃糖
|
||||
STR_002B_BATTERIES :电池
|
||||
STR_002C_PLASTIC :塑料
|
||||
STR_002C_PLASTIC :塑料块
|
||||
STR_002D_FIZZY_DRINKS :跳跳水
|
||||
STR_002E :
|
||||
STR_002F_PASSENGER :旅客
|
||||
@@ -238,7 +238,7 @@ STR_010E_WATER_TOWER :{BLACK}{TINYFON
|
||||
STR_010F_LUMBER_MILL :{BLACK}{TINYFONT}木材厂
|
||||
STR_0110_COTTON_CANDY_FOREST :{BLACK}{TINYFONT}棉花糖森林
|
||||
STR_0111_CANDY_FACTORY :{BLACK}{TINYFONT}糖果厂
|
||||
STR_0112_BATTERY_FARM :{BLACK}{TINYFONT}滇池农场
|
||||
STR_0112_BATTERY_FARM :{BLACK}{TINYFONT}电池农场
|
||||
STR_0113_COLA_WELLS :{BLACK}{TINYFONT}可乐泉
|
||||
STR_0114_TOY_SHOP :{BLACK}{TINYFONT}玩具店
|
||||
STR_0115_TOY_FACTORY :{BLACK}{TINYFONT}玩具工厂
|
||||
@@ -310,13 +310,13 @@ STR_UNITS_IMPERIAL :英制
|
||||
STR_UNITS_METRIC :度量
|
||||
STR_UNITS_SI :国际单位制
|
||||
|
||||
STR_UNITS_VELOCITY_IMPERIAL :{COMMA} 英里/小时
|
||||
STR_UNITS_VELOCITY_IMPERIAL :{COMMA} 英里/时
|
||||
STR_UNITS_VELOCITY_METRIC :{COMMA} 千米/小时
|
||||
STR_UNITS_VELOCITY_SI :{COMMA} 米/秒
|
||||
|
||||
STR_UNITS_POWER_IMPERIAL :{COMMA}马力
|
||||
STR_UNITS_POWER_METRIC :{COMMA}马力
|
||||
STR_UNITS_POWER_SI :{COMMA}前往
|
||||
STR_UNITS_POWER_SI :{COMMA}千瓦
|
||||
|
||||
STR_UNITS_WEIGHT_SHORT_IMPERIAL :{COMMA}英吨
|
||||
STR_UNITS_WEIGHT_SHORT_METRIC :{COMMA}吨
|
||||
@@ -549,8 +549,8 @@ STR_01E4_0 :{DKGREEN}{TINYF
|
||||
STR_01E5 :{DKGREEN}{TINYFONT}{COMMA}
|
||||
STR_01E6 :{DKGREEN}{TINYFONT}------
|
||||
STR_01E7 :{DKGREEN}{TINYFONT}"{STRING}"
|
||||
STR_01E8_TRACK_XTITLE :{BLACK}{TINYFONT}轨道{SETX 88}题目
|
||||
STR_01E9_SHUFFLE :{TINYFONT}随即播放
|
||||
STR_01E8_TRACK_XTITLE :{BLACK}{TINYFONT}音轨{SETX 88}标题
|
||||
STR_01E9_SHUFFLE :{TINYFONT}随机播放
|
||||
STR_01EA_PROGRAM :{TINYFONT}{BLACK}列表播放
|
||||
STR_01EB_MUSIC_PROGRAM_SELECTION :{WHITE}音乐选单
|
||||
STR_01EC_0 :{TINYFONT}{LTBLUE}0{COMMA} "{STRING}"
|
||||
@@ -586,6 +586,9 @@ STR_0208_ACCIDENTS_DISASTERS :{YELLOW}事故/
|
||||
STR_0209_COMPANY_INFORMATION :{YELLOW}公司信息
|
||||
STR_NEWS_OPEN_CLOSE :{YELLOW}开启/关闭工业设施
|
||||
STR_020A_ECONOMY_CHANGES :{YELLOW}经济变化
|
||||
STR_INDUSTRY_CHANGES_SERVED_BY_PLAYER :{YELLOW}对玩家有利的工业产量变化
|
||||
STR_INDUSTRY_CHANGES_SERVED_BY_OTHER :{YELLOW}对对手有利的工业产量变化
|
||||
STR_OTHER_INDUSTRY_PRODUCTION_CHANGES :{YELLOW}其他工业产量变化
|
||||
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}玩家车辆的状况报告
|
||||
STR_020C_NEW_VEHICLES :{YELLOW}新的车辆类型
|
||||
STR_020D_CHANGES_OF_CARGO_ACCEPTANCE :{YELLOW}货物接受情况变更
|
||||
@@ -721,6 +724,7 @@ STR_028D_PLACE_LIGHTHOUSE :{BLACK}放置
|
||||
STR_028E_PLACE_TRANSMITTER :{BLACK}放置转播塔
|
||||
STR_028F_DEFINE_DESERT_AREA :{BLACK}定义沙漠区域。{}摁住 CTRL 可以去掉沙漠区域。
|
||||
STR_CREATE_LAKE :{BLACK}定义水域。{}修建运河,仅在CTRL被按下的情况下不会在海平面淹没周围的区域。
|
||||
STR_CREATE_RIVER :{BLACK}放置河流
|
||||
STR_0290_DELETE :{BLACK}删除
|
||||
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}完全删除这座城镇
|
||||
STR_0292_SAVE_SCENARIO :保存场景
|
||||
@@ -736,7 +740,7 @@ STR_029A_PLAY_SCENARIO :{BLACK}以场
|
||||
STR_PLAY_HEIGHTMAP :{BLACK}以高度图开始游戏
|
||||
STR_PLAY_HEIGHTMAP_HINT :{BLACK}以高度图决定的地形开始一个新游戏。
|
||||
STR_QUIT_SCENARIO_QUERY :{YELLOW}你确定要退出当前场景吗?
|
||||
STR_029C_QUIT_EDITOR :{WHITE}推出编辑器
|
||||
STR_029C_QUIT_EDITOR :{WHITE}退出编辑器
|
||||
STR_029D_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}只能在人口超过 1200 的城镇建造……
|
||||
STR_029E_MOVE_THE_STARTING_DATE :{BLACK}将开始年份向前调整 1 年
|
||||
STR_029F_MOVE_THE_STARTING_DATE :{BLACK}将开始年份向后调整 1 年
|
||||
@@ -852,6 +856,7 @@ STR_0313_FUND_NEW_INDUSTRY :新的工业设
|
||||
|
||||
STR_0314_FUND_NEW_INDUSTRY :{WHITE}建设新的工业设施
|
||||
STR_JUST_STRING :{STRING}
|
||||
STR_JUST_INT :{NUM}
|
||||
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}只能在城镇中建设……
|
||||
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}只能在雨林中建设……
|
||||
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}只能在沙漠中建设……
|
||||
@@ -875,14 +880,14 @@ STR_TOWNNAME_FRENCH :法国
|
||||
STR_TOWNNAME_GERMAN :德国
|
||||
STR_TOWNNAME_ADDITIONAL_ENGLISH :英国 (增强的)
|
||||
STR_TOWNNAME_LATIN_AMERICAN :美式拉丁
|
||||
STR_TOWNNAME_SILLY :愚蠢的
|
||||
STR_TOWNNAME_SILLY :搞笑地名
|
||||
STR_TOWNNAME_SWEDISH :瑞典
|
||||
STR_TOWNNAME_DUTCH :荷兰
|
||||
STR_TOWNNAME_FINNISH :芬兰
|
||||
STR_TOWNNAME_POLISH :波兰
|
||||
STR_TOWNNAME_SLOVAKISH :斯洛伐克
|
||||
STR_TOWNNAME_NORWEGIAN :挪威
|
||||
STR_TOWNNAME_HUNGARIAN :雄拉利
|
||||
STR_TOWNNAME_HUNGARIAN :匈牙利
|
||||
STR_TOWNNAME_AUSTRIAN :澳大利亚
|
||||
STR_TOWNNAME_ROMANIAN :罗马尼亚
|
||||
STR_TOWNNAME_CZECH :捷克
|
||||
@@ -929,6 +934,7 @@ STR_OPTIONS_LANG_TIP :{BLACK}选择
|
||||
|
||||
STR_OPTIONS_FULLSCREEN :{BLACK}全屏幕
|
||||
STR_OPTIONS_FULLSCREEN_TIP :{BLACK}选择此项可以在全屏幕模式下进行 OpenTTD 游戏
|
||||
STR_FULLSCREEN_FAILED :{WHITE}无法切换到全屏模式
|
||||
|
||||
STR_OPTIONS_RES :{BLACK}屏幕分辨率
|
||||
STR_OPTIONS_RES_CBO :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
|
||||
@@ -1025,6 +1031,10 @@ STR_CONFIG_PATCHES_INFLATION :{LTBLUE}通货
|
||||
STR_CONFIG_PATCHES_SELECTGOODS :{LTBLUE}仅在车站接受此货物时卸货:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_LONGBRIDGES :{LTBLUE}允许建造超长桥梁:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_GOTODEPOT :{LTBLUE}允许前往车库的计划任务:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_RAW_INDUSTRY_CONSTRUCTION_METHOD :{LTBLUE}原料工业建设方式: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_RAW_INDUSTRY_CONSTRUCTION_METHOD_NONE :无
|
||||
STR_CONFIG_PATCHES_RAW_INDUSTRY_CONSTRUCTION_METHOD_NORMAL :同其他工业
|
||||
STR_CONFIG_PATCHES_RAW_INDUSTRY_CONSTRUCTION_METHOD_PROSPECTING :探矿式
|
||||
STR_CONFIG_PATCHES_MULTIPINDTOWN :{LTBLUE}允许在一个城镇中建设多个同类工业设施:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_SAMEINDCLOSE :{LTBLUE}工业设施可以相邻:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_LONGDATE :{LTBLUE}永远在状态栏中显示长日期:{ORANGE}{STRING}
|
||||
@@ -1034,9 +1044,13 @@ STR_CONFIG_PATCHES_NEW_NONSTOP :{LTBLUE}TTDPatc
|
||||
STR_CONFIG_PATCHES_ROADVEH_QUEUE :{LTBLUE}汽车自动排队 (有量子效应): {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_AUTOSCROLL :{LTBLUE}当鼠标移动到屏幕边缘时移动屏幕:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_BRIBE :{LTBLUE}允许贿赂地方政府:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_ALLOW_EXCLUSIVE :{LTBLUE}允许买断经营权: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_ALLOW_GIVE_MONEY :{LTBLUE}允许向其他公司转移资金: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_NONUNIFORM_STATIONS :{LTBLUE}允许异形站台:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_FREIGHT_TRAINS :{LTBLUE}根据装载货物的数量模拟超重列车:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_PLANE_SPEED :{LTBLUE}飞机速度因数: {ORANGE}1 / {STRING}
|
||||
STR_CONFIG_PATCHES_STOP_ON_TOWN_ROAD :{LTBLUE}允许在城镇所有的道路上穿过禁行标志 {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_ADJACENT_STATIONS :{LTBLUE}允许建设临近站台: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_PATCHES_SMALL_AIRPORTS :{LTBLUE}总允许建设小型机场:{ORANGE}{STRING}
|
||||
|
||||
@@ -1077,6 +1091,7 @@ STR_CONFIG_PATCHES_STATION_SPREAD :{LTBLUE}站台
|
||||
STR_CONFIG_PATCHES_SERVICEATHELIPAD :{LTBLUE}直升机在降落平台自动保养:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_LINK_TERRAFORM_TOOLBAR :{LTBLUE}将景观美化工具栏与铁路/公路/船只/机场工具栏连接:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_REVERSE_SCROLLING :{LTBLUE}拖动方向与屏幕移动方向相反:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_SMOOTH_SCROLLING :{LTBLUE}平滑视角滚动: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_MEASURE_TOOLTIP :{LTBLUE}建设时显示测量数据:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_LIVERIES :{LTBLUE}显示公司特别外观:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_LIVERIES_NONE :不显示
|
||||
@@ -1089,6 +1104,27 @@ STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :滚动地图
|
||||
STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :关闭
|
||||
STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}地图滚动速度:{ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_PATCHES_RIGHT_MOUSE_BTN_EMU_OFF :关闭
|
||||
STR_CONFIG_PATCHES_PAUSE_ON_NEW_GAME :{LTBLUE}开始新游戏时自动暂停: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_ADVANCED_VEHICLE_LISTS :{LTBLUE}使用高级车辆列表: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_ADVANCED_VEHICLE_LISTS_OFF :关闭
|
||||
STR_CONFIG_PATCHES_ADVANCED_VEHICLE_LISTS_OWN :玩家公司
|
||||
STR_CONFIG_PATCHES_ADVANCED_VEHICLE_LISTS_ALL :全体公司
|
||||
STR_CONFIG_PATCHES_LOADING_INDICATORS :{LTBLUE}使用装货进度指示: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_LOADING_INDICATORS_OFF :关闭
|
||||
STR_CONFIG_PATCHES_LOADING_INDICATORS_OWN :玩家公司
|
||||
STR_CONFIG_PATCHES_LOADING_INDICATORS_ALL :全体公司
|
||||
STR_CONFIG_PATCHES_TIMETABLE_ALLOW :{LTBLUE}允许使用时间表: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_TIMETABLE_IN_TICKS :{LTBLUE}使用ticks而不是天为单位: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE :{LTBLUE}默认铁路类型 (新建/读取游戏后): {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE_RAIL :普通铁轨
|
||||
STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE_ELRAIL :电气化铁路
|
||||
STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE_MONORAIL :单轨铁路
|
||||
STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE_MAGLEV :磁悬浮
|
||||
STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE_FIRST :第一个可用的
|
||||
STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE_LAST :第后一个可用的
|
||||
STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE_MOST_USED :最常用的
|
||||
STR_CONFIG_PATCHES_ALWAYS_BUILD_INFRASTRUCTURE :{LTBLUE}当没有合适的运输工具时显示建设工具: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}每位玩家最大火车数量:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}每位玩家最大汽车数量:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_MAX_AIRCRAFT :{LTBLUE}每位玩家最大飞机数量:{ORANGE}{STRING}
|
||||
@@ -1121,7 +1157,9 @@ STR_CONFIG_PATCHES_SMOOTH_ECONOMY :{LTBLUE}启用
|
||||
STR_CONFIG_PATCHES_ALLOW_SHARES :{LTBLUE}允许购买其他公司的股份
|
||||
STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY :{LTBLUE}当拖动的时候每 {ORANGE}{STRING} 个地块放置一个信号灯
|
||||
STR_CONFIG_PATCHES_SEMAPHORE_BUILD_BEFORE_DATE :{LTBLUE}在 {ORANGE}{STRING} 前自动设置旗帜信号
|
||||
STR_CONFIG_PATCHES_ENABLE_SIGNAL_GUI :{LTBLUE}使用信号GUI: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_PATCHES_TOWN_LAYOUT_DEFAULT :默认
|
||||
|
||||
STR_CONFIG_PATCHES_TOOLBAR_POS :{LTBLUE}主工具栏位置:{ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT :左侧
|
||||
@@ -1153,6 +1191,17 @@ STR_CONFIG_PATCHES_CURRENCY :{CURRENCY}
|
||||
STR_CONFIG_PATCHES_QUERY_CAPT :{WHITE}改变设置值
|
||||
STR_CONFIG_PATCHES_SERVICE_INTERVAL_INCOMPATIBLE :{WHITE}下面一个或多个保养周期的值设置不对,应当在 0%-90% 或 30-800 天之内。
|
||||
|
||||
STR_CONFIG_PATCHES_PATHFINDER_FOR_TRAINS_NTP :NTP {RED}(不推荐)
|
||||
STR_CONFIG_PATCHES_PATHFINDER_FOR_TRAINS_NPF :NPF
|
||||
STR_CONFIG_PATCHES_PATHFINDER_FOR_TRAINS_YAPF :YAPF {BLUE}(推荐)
|
||||
STR_CONFIG_PATCHES_PATHFINDER_FOR_ROADVEH :{LTBLUE}汽车寻路: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_PATHFINDER_FOR_ROADVEH_OPF :原始的 {RED}(不推荐)
|
||||
STR_CONFIG_PATCHES_PATHFINDER_FOR_ROADVEH_NPF :NPF
|
||||
STR_CONFIG_PATCHES_PATHFINDER_FOR_ROADVEH_YAPF :YAPF {BLUE}(推荐)
|
||||
STR_CONFIG_PATCHES_PATHFINDER_FOR_SHIPS :{LTBLUE}船只寻路: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_PATHFINDER_FOR_SHIPS_OPF :原始 {BLUE}(推荐)
|
||||
STR_CONFIG_PATCHES_PATHFINDER_FOR_SHIPS_NPF :NPF
|
||||
STR_CONFIG_PATCHES_PATHFINDER_FOR_SHIPS_YAPF :YAPF {RED}(不推荐)
|
||||
STR_TEMPERATE_LANDSCAPE :温带景观
|
||||
STR_SUB_ARCTIC_LANDSCAPE :寒带景观
|
||||
STR_SUB_TROPICAL_LANDSCAPE :沙漠景观
|
||||
@@ -1333,6 +1382,7 @@ STR_NETWORK_SET_PASSWORD :{BLACK}设置
|
||||
STR_NETWORK_PASSWORD_TIP :{BLACK}如果不希望你的游戏被外人加入,请设置一个密码
|
||||
STR_NETWORK_SELECT_MAP :{BLACK}选择地图:
|
||||
STR_NETWORK_SELECT_MAP_TIP :{BLACK}选择你要玩的地图
|
||||
STR_NETWORK_LAN_INTERNET_COMBO :{BLACK}{SKIP}{STRING}
|
||||
STR_NETWORK_LAN :局域网
|
||||
STR_NETWORK_INTERNET :Internet
|
||||
STR_NETWORK_LAN_INTERNET :局域网 / Internet
|
||||
@@ -1345,6 +1395,7 @@ STR_NETWORK_NUMBER_OF_SPECTATORS :{BLACK}旁观
|
||||
STR_NETWORK_NUMBER_OF_SPECTATORS_TIP :{BLACK}限制服务器上旁观者的数量
|
||||
STR_NETWORK_LANGUAGE_SPOKEN :{BLACK}语言选项:
|
||||
STR_NETWORK_LANGUAGE_TIP :{BLACK}其他玩家可以知道服务器的官方语言
|
||||
STR_NETWORK_LANGUAGE_COMBO :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
|
||||
STR_NETWORK_START_GAME :{BLACK}开始游戏
|
||||
STR_NETWORK_START_GAME_TIP :{BLACK}以指定场景或随机地图开始游戏
|
||||
STR_NETWORK_LOAD_GAME :{BLACK}读取游戏
|
||||
@@ -1355,6 +1406,31 @@ STR_NETWORK_LANG_ANY :任意
|
||||
STR_NETWORK_LANG_ENGLISH :英语
|
||||
STR_NETWORK_LANG_GERMAN :德语
|
||||
STR_NETWORK_LANG_FRENCH :法语
|
||||
STR_NETWORK_LANG_BRAZILIAN :巴西语
|
||||
STR_NETWORK_LANG_BULGARIAN :保加利亚语
|
||||
STR_NETWORK_LANG_CHINESE :中文
|
||||
STR_NETWORK_LANG_CZECH :捷克语
|
||||
STR_NETWORK_LANG_DANISH :丹麦语
|
||||
STR_NETWORK_LANG_DUTCH :荷兰语
|
||||
STR_NETWORK_LANG_ESPERANTO :世界语
|
||||
STR_NETWORK_LANG_FINNISH :芬兰语
|
||||
STR_NETWORK_LANG_HUNGARIAN :匈牙利语
|
||||
STR_NETWORK_LANG_ICELANDIC :冰岛语
|
||||
STR_NETWORK_LANG_ITALIAN :意大利语
|
||||
STR_NETWORK_LANG_JAPANESE :日语
|
||||
STR_NETWORK_LANG_KOREAN :韩文
|
||||
STR_NETWORK_LANG_LITHUANIAN :立陶宛语
|
||||
STR_NETWORK_LANG_NORWEGIAN :挪威语
|
||||
STR_NETWORK_LANG_POLISH :波兰语
|
||||
STR_NETWORK_LANG_PORTUGUESE :葡萄牙语
|
||||
STR_NETWORK_LANG_ROMANIAN :罗马尼亚语
|
||||
STR_NETWORK_LANG_RUSSIAN :俄语
|
||||
STR_NETWORK_LANG_SLOVAK :斯洛伐克语
|
||||
STR_NETWORK_LANG_SLOVENIAN :斯洛文尼亚语
|
||||
STR_NETWORK_LANG_SPANISH :西班牙语
|
||||
STR_NETWORK_LANG_SWEDISH :瑞典语
|
||||
STR_NETWORK_LANG_TURKISH :土耳其语
|
||||
STR_NETWORK_LANG_UKRAINIAN :乌克兰语
|
||||
############ End of leave-in-this-order
|
||||
|
||||
STR_NETWORK_GAME_LOBBY :{WHITE}多用户通道
|
||||
@@ -1516,6 +1592,7 @@ STR_1004_TOO_HIGH :{WHITE}太高
|
||||
STR_1005_NO_SUITABLE_RAILROAD_TRACK :{WHITE}没有合适的铁轨
|
||||
STR_1007_ALREADY_BUILT :{WHITE}已经建好了……
|
||||
STR_1008_MUST_REMOVE_RAILROAD_TRACK :{WHITE}必须先拆除铁轨
|
||||
STR_ERR_CROSSING_ON_ONEWAY_ROAD :{WHITE}这是单行道或堵死了
|
||||
STR_100A_RAILROAD_CONSTRUCTION :{WHITE}铁路建设
|
||||
STR_TITLE_ELRAIL_CONSTRUCTION :{WHITE}电气化铁路建设
|
||||
STR_100B_MONORAIL_CONSTRUCTION :{WHITE}单轨铁路建设
|
||||
@@ -1546,7 +1623,9 @@ STR_1023_RAILROAD_TRAIN_DEPOT :列车车库
|
||||
STR_1024_AREA_IS_OWNED_BY_ANOTHER :{WHITE}此区域由另一公司所有……
|
||||
STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :带有普通信号的铁路
|
||||
STR_RAILROAD_TRACK_WITH_PRESIGNALS :带有入口信号的铁路
|
||||
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :带有出口新乡的铁路
|
||||
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :带有出口信号的铁路
|
||||
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :双向信号灯的铁路
|
||||
STR_RAILROAD_TRACK_WITH_NORMAL_PRESIGNALS :单信号灯的铁路
|
||||
|
||||
|
||||
|
||||
@@ -1595,7 +1674,7 @@ STR_200A_TOWN_NAMES_CLICK_ON_NAME :{BLACK}城镇
|
||||
STR_200B_CENTER_THE_MAIN_VIEW_ON :{BLACK}将屏幕中心移动到城镇所在的位置
|
||||
STR_200C_CHANGE_TOWN_NAME :{BLACK}城镇改名
|
||||
STR_200D_PASSENGERS_LAST_MONTH_MAX :{BLACK}上月旅客数量:{ORANGE}{COMMA}{BLACK} 最大值:{ORANGE}{COMMA}
|
||||
STR_200E_MAIL_LAST_MONTH_MAX :{BLACK}上月有报数量:{ORANGE}{COMMA}{BLACK} 最大值:{ORANGE}{COMMA}
|
||||
STR_200E_MAIL_LAST_MONTH_MAX :{BLACK}上月邮包数量:{ORANGE}{COMMA}{BLACK} 最大值:{ORANGE}{COMMA}
|
||||
STR_200F_TALL_OFFICE_BLOCK :高层写字楼
|
||||
STR_2010_OFFICE_BLOCK :写字楼
|
||||
STR_2011_SMALL_BLOCK_OF_FLATS :底层住宅
|
||||
@@ -1715,7 +1794,7 @@ STR_3009_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}距离
|
||||
STR_300A_0 :{WHITE}{STATION} {STATIONFEATURES}
|
||||
STR_300B_MUST_DEMOLISH_RAILROAD :{WHITE}必须先拆除火车站
|
||||
STR_300D_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}距离另一机场过近
|
||||
STR_300E_MUST_DEMOLISH_AIRPORT_FIRST :{WHITE}必须先拆出机场
|
||||
STR_300E_MUST_DEMOLISH_AIRPORT_FIRST :{WHITE}您必须先拆除机场
|
||||
|
||||
STR_3030_RENAME_STATION_LOADING :重命名车站
|
||||
STR_3031_CAN_T_RENAME_STATION :{WHITE}不能重命名车站
|
||||
@@ -2264,8 +2343,8 @@ STR_8032_TOY_VAN :玩具篷车
|
||||
STR_8033_BATTERY_TRUCK :电池挂车
|
||||
STR_8034_FIZZY_DRINK_TRUCK :跳跳汁挂车
|
||||
STR_8035_PLASTIC_TRUCK :塑料挂车
|
||||
STR_8036_X2001_ELECTRIC :'X2001' (Electric)
|
||||
STR_8037_MILLENNIUM_Z1_ELECTRIC :'Millennium Z1' (Electric)
|
||||
STR_8036_X2001_ELECTRIC :'X2001' (电力)
|
||||
STR_8037_MILLENNIUM_Z1_ELECTRIC :'Millennium Z1' (电力)
|
||||
STR_8038_WIZZOWOW_Z99 :Wizzowow Z99
|
||||
STR_8039_PASSENGER_CAR :旅客车厢
|
||||
STR_803A_MAIL_VAN :邮政车厢
|
||||
@@ -2336,7 +2415,7 @@ STR_807A_PLODDYPHUT_MKIII_BUS :Ploddyphut MkII
|
||||
STR_807B_BALOGH_COAL_TRUCK :Balogh 煤炭卡车
|
||||
STR_807C_UHL_COAL_TRUCK :Uhl 煤炭卡车
|
||||
STR_807D_DW_COAL_TRUCK :DW 煤炭卡车
|
||||
STR_807E_MPS_MAIL_TRUCK :MPS 煤炭卡车
|
||||
STR_807E_MPS_MAIL_TRUCK :MPS 邮政卡车
|
||||
STR_807F_REYNARD_MAIL_TRUCK :Reynard 邮政卡车
|
||||
STR_8080_PERRY_MAIL_TRUCK :Perry 邮政卡车
|
||||
STR_8081_MIGHTYMOVER_MAIL_TRUCK :MightyMover 邮政卡车
|
||||
|
||||
@@ -3193,6 +3193,7 @@ STR_NEWGRF_NOT_FOUND_WARNING :{WHITE}Cýbajú
|
||||
STR_NEWGRF_UNPAUSE_WARNING_TITLE :{YELLOW}Chýba(jú) GRF súbor(y)
|
||||
STR_NEWGRF_UNPAUSE_WARNING :{WHITE}Odpauzovanie môže spôsobit pád OpenTTD. Nezaznamenávajte nasledujúce chyby.{}Naozaj chcete odpauzovat?
|
||||
|
||||
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Hra bola uložená vo verzii bez elektriciek. Vsetky elektricky boli odstránené.
|
||||
STR_CURRENCY_WINDOW :{WHITE}Vlastná mena
|
||||
STR_CURRENCY_EXCHANGE_RATE :{LTBLUE}Kurz meny: {ORANGE}{CURRENCY} = £ {COMMA}
|
||||
STR_CURRENCY_SEPARATOR :{LTBLUE}Oddelovac:
|
||||
|
||||
@@ -34,8 +34,8 @@ STR_0012_OIL :нафта
|
||||
STR_0012_OIL.r :нафти
|
||||
STR_0012_OIL.z :нафту
|
||||
STR_0013_LIVESTOCK :худоба
|
||||
STR_0013_LIVESTOCK.z :худобу
|
||||
STR_0013_LIVESTOCK.r :худоби
|
||||
STR_0013_LIVESTOCK.z :худобу
|
||||
STR_0014_GOODS :товари
|
||||
STR_0014_GOODS.r :товарів
|
||||
STR_0014_GOODS.z :товари
|
||||
@@ -127,8 +127,8 @@ STR_0032_OIL :нафта
|
||||
STR_0032_OIL.r :нафти
|
||||
STR_0032_OIL.z :нафту
|
||||
STR_0033_LIVESTOCK :худоба
|
||||
STR_0033_LIVESTOCK.z :худобу
|
||||
STR_0033_LIVESTOCK.r :худоби
|
||||
STR_0033_LIVESTOCK.z :худобу
|
||||
STR_0034_GOODS :товари
|
||||
STR_0034_GOODS.r :товарів
|
||||
STR_0034_GOODS.z :товари
|
||||
|
||||
+4
-8
@@ -225,14 +225,12 @@ static bool IsUniqueCompanyName(const char *name)
|
||||
*/
|
||||
CommandCost CmdChangeCompanyName(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
{
|
||||
Player *p;
|
||||
|
||||
if (StrEmpty(_cmd_text)) return CMD_ERROR;
|
||||
if (StrEmpty(_cmd_text) || strlen(_cmd_text) > MAX_LENGTH_COMPANY_NAME) return CMD_ERROR;
|
||||
|
||||
if (!IsUniqueCompanyName(_cmd_text)) return_cmd_error(STR_NAME_MUST_BE_UNIQUE);
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
p = GetPlayer(_current_player);
|
||||
Player *p = GetPlayer(_current_player);
|
||||
free(p->name);
|
||||
p->name = strdup(_cmd_text);
|
||||
MarkWholeScreenDirty();
|
||||
@@ -264,14 +262,12 @@ static bool IsUniquePresidentName(const char *name)
|
||||
*/
|
||||
CommandCost CmdChangePresidentName(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
{
|
||||
Player *p;
|
||||
|
||||
if (StrEmpty(_cmd_text)) return CMD_ERROR;
|
||||
if (StrEmpty(_cmd_text) || strlen(_cmd_text) > MAX_LENGTH_PRESIDENT_NAME) return CMD_ERROR;
|
||||
|
||||
if (!IsUniquePresidentName(_cmd_text)) return_cmd_error(STR_NAME_MUST_BE_UNIQUE);
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
p = GetPlayer(_current_player);
|
||||
Player *p = GetPlayer(_current_player);
|
||||
free(p->president_name);
|
||||
p->president_name = strdup(_cmd_text);
|
||||
|
||||
|
||||
@@ -22,10 +22,11 @@ enum {
|
||||
SEND_MTU = 1460, ///< Number of bytes we can pack in a single packet
|
||||
|
||||
NETWORK_GAME_INFO_VERSION = 4, ///< What version of game-info do we use?
|
||||
NETWORK_COMPANY_INFO_VERSION = 4, ///< What version of company info is this?
|
||||
NETWORK_COMPANY_INFO_VERSION = 5, ///< What version of company info is this?
|
||||
NETWORK_MASTER_SERVER_VERSION = 1, ///< What version of master-server-protocol do we use?
|
||||
|
||||
NETWORK_NAME_LENGTH = 80, ///< The maximum length of the server name and map name, in bytes including '\0'
|
||||
NETWORK_COMPANY_NAME_LENGTH = 32, ///< The maximum length of the company name, in bytes including '\0'
|
||||
NETWORK_HOSTNAME_LENGTH = 80, ///< The maximum length of the host name, in bytes including '\0'
|
||||
NETWORK_UNIQUE_ID_LENGTH = 33, ///< The maximum length of the unique id of the clients, in bytes including '\0'
|
||||
NETWORK_REVISION_LENGTH = 15, ///< The maximum length of the revision, in bytes including '\0'
|
||||
|
||||
@@ -45,6 +45,7 @@ bool _network_advertise; ///< is the server advertising to the master server?
|
||||
|
||||
/* Check whether NETWORK_NUM_LANDSCAPES is still in sync with NUM_LANDSCAPE */
|
||||
assert_compile((int)NETWORK_NUM_LANDSCAPES == (int)NUM_LANDSCAPE);
|
||||
assert_compile((int)NETWORK_COMPANY_NAME_LENGTH == MAX_LENGTH_COMPANY_NAME + 1);
|
||||
|
||||
// global variables (declared in network_data.h)
|
||||
CommandPacket *_local_command_queue;
|
||||
|
||||
@@ -397,10 +397,8 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CLIENT_INFO)
|
||||
uint16 index = p->Recv_uint16();
|
||||
PlayerID playas = (Owner)p->Recv_uint8();
|
||||
char name[NETWORK_NAME_LENGTH];
|
||||
char unique_id[NETWORK_UNIQUE_ID_LENGTH];
|
||||
|
||||
p->Recv_string(name, sizeof(name));
|
||||
p->Recv_string(unique_id, sizeof(unique_id));
|
||||
|
||||
if (MY_CLIENT->has_quit) return NETWORK_RECV_STATUS_CONN_LOST;
|
||||
|
||||
@@ -432,7 +430,6 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CLIENT_INFO)
|
||||
ci->client_playas = playas;
|
||||
|
||||
ttd_strlcpy(ci->client_name, name, sizeof(ci->client_name));
|
||||
ttd_strlcpy(ci->unique_id, unique_id, sizeof(ci->unique_id));
|
||||
|
||||
InvalidateWindow(WC_CLIENT_LIST, 0);
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_CLIENT_INFO)(NetworkTCPSocketHandler
|
||||
// uint16: The index of the client (always unique on a server. 1 = server)
|
||||
// uint8: As which player the client is playing
|
||||
// String: The name of the client
|
||||
// String: The unique id of the client
|
||||
//
|
||||
|
||||
if (ci->client_index != NETWORK_EMPTY_INDEX) {
|
||||
@@ -55,7 +54,6 @@ DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_CLIENT_INFO)(NetworkTCPSocketHandler
|
||||
p->Send_uint16(ci->client_index);
|
||||
p->Send_uint8 (ci->client_playas);
|
||||
p->Send_string(ci->client_name);
|
||||
p->Send_string(ci->unique_id);
|
||||
|
||||
cs->Send_Packet(p);
|
||||
}
|
||||
@@ -646,14 +644,12 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_JOIN)
|
||||
|
||||
p->Recv_string(client_revision, sizeof(client_revision));
|
||||
|
||||
#if defined(WITH_REV) || defined(WITH_REV_HACK)
|
||||
// Check if the client has revision control enabled
|
||||
if (!IsNetworkCompatibleVersion(client_revision)) {
|
||||
// Different revisions!!
|
||||
SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_WRONG_REVISION);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
p->Recv_string(name, sizeof(name));
|
||||
playas = (Owner)p->Recv_uint8();
|
||||
@@ -901,7 +897,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND)
|
||||
* to match the player in the packet. If it doesn't, the client has done
|
||||
* something pretty naughty (or a bug), and will be kicked
|
||||
*/
|
||||
if (!(cp->cmd == CMD_PLAYER_CTRL && cp->p1 == 0) && ci->client_playas != cp->player) {
|
||||
if (!(cp->cmd == CMD_PLAYER_CTRL && cp->p1 == 0 && ci->client_playas == PLAYER_NEW_COMPANY) && ci->client_playas != cp->player) {
|
||||
IConsolePrintF(_icolour_err, "WARNING: player %d (IP: %s) tried to execute a command as player %d, kicking...",
|
||||
ci->client_playas + 1, GetPlayerIP(ci), cp->player + 1);
|
||||
SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_PLAYER_MISMATCH);
|
||||
@@ -1168,7 +1164,21 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_CHAT)
|
||||
|
||||
p->Recv_string(msg, MAX_TEXT_MSG_LEN);
|
||||
|
||||
NetworkServer_HandleChat(action, desttype, dest, msg, cs->index);
|
||||
const NetworkClientInfo *ci = DEREF_CLIENT_INFO(cs);
|
||||
switch (action) {
|
||||
case NETWORK_ACTION_GIVE_MONEY:
|
||||
if (!IsValidPlayer(ci->client_playas)) break;
|
||||
/* Fall-through */
|
||||
case NETWORK_ACTION_CHAT:
|
||||
case NETWORK_ACTION_CHAT_CLIENT:
|
||||
case NETWORK_ACTION_CHAT_COMPANY:
|
||||
NetworkServer_HandleChat(action, desttype, dest, msg, cs->index);
|
||||
break;
|
||||
default:
|
||||
IConsolePrintF(_icolour_err, "WARNING: invalid chat action from client %d (IP: %s).", ci->client_index, GetPlayerIP(ci));
|
||||
SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_NOT_EXPECTED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_SET_PASSWORD)
|
||||
|
||||
@@ -92,12 +92,6 @@ DEF_UDP_RECEIVE_COMMAND(Server, PACKET_UDP_CLIENT_FIND_SERVER)
|
||||
|
||||
DEF_UDP_RECEIVE_COMMAND(Server, PACKET_UDP_CLIENT_DETAIL_INFO)
|
||||
{
|
||||
NetworkTCPSocketHandler *cs;
|
||||
NetworkClientInfo *ci;
|
||||
Player *player;
|
||||
byte current = 0;
|
||||
int i;
|
||||
|
||||
// Just a fail-safe.. should never happen
|
||||
if (!_network_udp_server) return;
|
||||
|
||||
@@ -110,6 +104,8 @@ DEF_UDP_RECEIVE_COMMAND(Server, PACKET_UDP_CLIENT_DETAIL_INFO)
|
||||
/* Fetch the latest version of everything */
|
||||
NetworkPopulateCompanyInfo();
|
||||
|
||||
Player *player;
|
||||
byte current = 0;
|
||||
/* Go through all the players */
|
||||
FOR_ALL_PLAYERS(player) {
|
||||
/* Skip non-active players */
|
||||
@@ -130,58 +126,15 @@ DEF_UDP_RECEIVE_COMMAND(Server, PACKET_UDP_CLIENT_DETAIL_INFO)
|
||||
/* Send 1 if there is a passord for the company else send 0 */
|
||||
packet.Send_bool (!StrEmpty(_network_player_info[player->index].password));
|
||||
|
||||
for (i = 0; i < NETWORK_VEHICLE_TYPES; i++)
|
||||
for (int i = 0; i < NETWORK_VEHICLE_TYPES; i++) {
|
||||
packet.Send_uint16(_network_player_info[player->index].num_vehicle[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < NETWORK_STATION_TYPES; i++)
|
||||
for (int i = 0; i < NETWORK_STATION_TYPES; i++) {
|
||||
packet.Send_uint16(_network_player_info[player->index].num_station[i]);
|
||||
|
||||
/* Find the clients that are connected to this player */
|
||||
FOR_ALL_CLIENTS(cs) {
|
||||
ci = DEREF_CLIENT_INFO(cs);
|
||||
if (ci->client_playas == player->index) {
|
||||
packet.Send_bool (true);
|
||||
packet.Send_string(ci->client_name);
|
||||
packet.Send_string(ci->unique_id);
|
||||
packet.Send_uint32(ci->join_date);
|
||||
}
|
||||
}
|
||||
/* Also check for the server itself */
|
||||
ci = NetworkFindClientInfoFromIndex(NETWORK_SERVER_INDEX);
|
||||
if (ci->client_playas == player->index) {
|
||||
packet.Send_bool (true);
|
||||
packet.Send_string(ci->client_name);
|
||||
packet.Send_string(ci->unique_id);
|
||||
packet.Send_uint32(ci->join_date);
|
||||
}
|
||||
|
||||
/* Indicates end of client list */
|
||||
packet.Send_bool(false);
|
||||
}
|
||||
|
||||
/* And check if we have any spectators */
|
||||
FOR_ALL_CLIENTS(cs) {
|
||||
ci = DEREF_CLIENT_INFO(cs);
|
||||
if (!IsValidPlayer(ci->client_playas)) {
|
||||
packet.Send_bool (true);
|
||||
packet.Send_string(ci->client_name);
|
||||
packet.Send_string(ci->unique_id);
|
||||
packet.Send_uint32(ci->join_date);
|
||||
}
|
||||
}
|
||||
|
||||
/* Also check for the server itself */
|
||||
ci = NetworkFindClientInfoFromIndex(NETWORK_SERVER_INDEX);
|
||||
if (!IsValidPlayer(ci->client_playas)) {
|
||||
packet.Send_bool (true);
|
||||
packet.Send_string(ci->client_name);
|
||||
packet.Send_string(ci->unique_id);
|
||||
packet.Send_uint32(ci->join_date);
|
||||
}
|
||||
|
||||
/* Indicates end of client list */
|
||||
packet.Send_bool(false);
|
||||
|
||||
this->SendPacket(&packet, client_addr);
|
||||
}
|
||||
|
||||
|
||||
+12
-5
@@ -26,7 +26,13 @@ enum GRFStatus {
|
||||
GCS_ACTIVATED ///< GRF file has been activated
|
||||
};
|
||||
|
||||
enum GRFListCompatibility{
|
||||
/** Encountered GRF bugs */
|
||||
enum GRFBugs {
|
||||
GBUG_VEH_LENGTH, ///< Length of rail vehicle changes when not inside a depot
|
||||
};
|
||||
|
||||
/** Status of post-gameload GRF compatibility check */
|
||||
enum GRFListCompatibility {
|
||||
GLC_ALL_GOOD,
|
||||
GLC_COMPATIBLE,
|
||||
GLC_NOT_FOUND
|
||||
@@ -52,10 +58,11 @@ struct GRFConfig : public GRFIdentifier {
|
||||
char *info;
|
||||
GRFError *error;
|
||||
|
||||
uint8 flags;
|
||||
GRFStatus status;
|
||||
uint32 param[0x80];
|
||||
uint8 num_params;
|
||||
uint8 flags; ///< NOSAVE: GCF_Flags, bitset
|
||||
GRFStatus status; ///< NOSAVE: GRFStatus, enum
|
||||
uint32 grf_bugs; ///< NOSAVE: bugs in this GRF in this run, @see enum GRFBugs
|
||||
uint32 param[0x80]; ///< GRF parameters
|
||||
uint8 num_params; ///< Number of used parameters
|
||||
|
||||
struct GRFConfig *next;
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ void UnloadWagonOverrides()
|
||||
|
||||
/* Space for NUM_CARGO real cargos and 2 pseudo cargos, CT_DEFAULT and CT_PURCHASE */
|
||||
static const SpriteGroup *_engine_custom_sprites[TOTAL_NUM_ENGINES][NUM_CARGO + 2];
|
||||
static const GRFFile *_engine_grf[TOTAL_NUM_ENGINES];
|
||||
const GRFFile *_engine_grf[TOTAL_NUM_ENGINES];
|
||||
|
||||
void SetCustomEngineSprites(EngineID engine, byte cargo, const SpriteGroup *group)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,7 @@ static BuildingCounts _building_counts;
|
||||
static HouseClassMapping _class_mapping[HOUSE_CLASS_MAX];
|
||||
|
||||
HouseOverrideManager _house_mngr(NEW_HOUSE_OFFSET, HOUSE_MAX, INVALID_HOUSE_ID);
|
||||
extern TileIndex GetHouseNorthPart(HouseID &house);
|
||||
|
||||
/**
|
||||
* Check and update town and house values.
|
||||
@@ -67,12 +68,8 @@ void UpdateHousesAndTowns()
|
||||
IncreaseBuildingCount(town, house_id);
|
||||
if (IsHouseCompleted(t)) town->population += GetHouseSpecs(house_id)->population;
|
||||
|
||||
/* Increase the number of houses for every house tile which
|
||||
* has a size bit set. Multi tile buildings have got only
|
||||
* one tile with such a bit set, so there is no problem. */
|
||||
if (GetHouseSpecs(GetHouseType(t))->building_flags & BUILDING_HAS_1_TILE) {
|
||||
town->num_houses++;
|
||||
}
|
||||
/* Increase the number of houses for every house, but only once. */
|
||||
if (GetHouseNorthPart(house_id) == 0) town->num_houses++;
|
||||
}
|
||||
|
||||
/* Update the population and num_house dependant values */
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "gfx_func.h"
|
||||
#include "date_func.h"
|
||||
#include "player_func.h"
|
||||
#include "tunnelbridge_map.h"
|
||||
|
||||
#include "table/sprites.h"
|
||||
#include "table/strings.h"
|
||||
@@ -291,11 +292,18 @@ static uint32 GetRailContinuationInfo(TileIndex tile)
|
||||
uint i;
|
||||
|
||||
for (i = 0; i < lengthof(x_dir); i++, dir++, diagdir++) {
|
||||
TrackBits trackbits = TrackStatusToTrackBits(GetTileTrackStatus(tile + TileOffsByDir(*dir), TRANSPORT_RAIL, 0));
|
||||
TileIndex neighbour_tile = tile + TileOffsByDir(*dir);
|
||||
TrackBits trackbits = TrackStatusToTrackBits(GetTileTrackStatus(neighbour_tile, TRANSPORT_RAIL, 0));
|
||||
if (trackbits != TRACK_BIT_NONE) {
|
||||
/* If there is any track on the tile, set the bit in the second byte */
|
||||
SetBit(res, i + 8);
|
||||
|
||||
/* With tunnels and bridges the tile has tracks, but they are not necessarily connected
|
||||
* with the next tile because the ramp is not going in the right direction. */
|
||||
if (IsTileType(neighbour_tile, MP_TUNNELBRIDGE) && GetTunnelBridgeDirection(neighbour_tile) != *diagdir) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If any track reaches our exit direction, set the bit in the lower byte */
|
||||
if (trackbits & DiagdirReachesTracks(*diagdir)) SetBit(res, i);
|
||||
}
|
||||
|
||||
+4
-1
@@ -1331,6 +1331,8 @@ static bool InitializeWindowsAndCaches()
|
||||
players[v->owner]->num_engines[v->engine_type]++;
|
||||
}
|
||||
|
||||
CheckTrainsLengths();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1812,7 +1814,7 @@ bool AfterLoadGame()
|
||||
}
|
||||
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->type == VEH_TRAIN && (IsFrontEngine(v) || IsFreeWagon(v))) TrainConsistChanged(v);
|
||||
if (v->type == VEH_TRAIN && (IsFrontEngine(v) || IsFreeWagon(v))) TrainConsistChanged(v, true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2482,4 +2484,5 @@ void ReloadNewGRFData()
|
||||
UpdateHousesAndTowns();
|
||||
/* redraw the whole screen */
|
||||
MarkWholeScreenDirty();
|
||||
CheckTrainsLengths();
|
||||
}
|
||||
|
||||
+4
-4
@@ -66,8 +66,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,6,0,@@REVISION@@
|
||||
PRODUCTVERSION 0,6,0,@@REVISION@@
|
||||
FILEVERSION 0,6,2,13829
|
||||
PRODUCTVERSION 0,6,2,13829
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -85,14 +85,14 @@ BEGIN
|
||||
VALUE "Comments", "This program is licensed under the GNU General Public License.\0"
|
||||
VALUE "CompanyName", "OpenTTD Development Team\0"
|
||||
VALUE "FileDescription", "OpenTTD\0"
|
||||
VALUE "FileVersion", "Development @@VERSION@@\0"
|
||||
VALUE "FileVersion", "0.6.2-RC2\0"
|
||||
VALUE "InternalName", "openttd\0"
|
||||
VALUE "LegalCopyright", "Copyright © OpenTTD Developers 2002-2008. All Rights Reserved.\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "openttd.exe\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "OpenTTD\0"
|
||||
VALUE "ProductVersion", "Development @@VERSION@@\0"
|
||||
VALUE "ProductVersion", "0.6.2-RC2\0"
|
||||
VALUE "SpecialBuild", "-\0"
|
||||
END
|
||||
END
|
||||
|
||||
+2
-2
@@ -1181,7 +1181,7 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
|
||||
const Player *p = GetPlayer((PlayerID)w->window_number);
|
||||
WP(w, def_d).byte_1 = 0;
|
||||
SetDParam(0, p->index);
|
||||
ShowQueryString(STR_PLAYER_NAME, STR_700B_PRESIDENT_S_NAME, 31, 94, w, CS_ALPHANUMERAL);
|
||||
ShowQueryString(STR_PLAYER_NAME, STR_700B_PRESIDENT_S_NAME, MAX_LENGTH_PRESIDENT_NAME, 94, w, CS_ALPHANUMERAL);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1189,7 +1189,7 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
|
||||
Player *p = GetPlayer((PlayerID)w->window_number);
|
||||
WP(w, def_d).byte_1 = 1;
|
||||
SetDParam(0, p->index);
|
||||
ShowQueryString(STR_COMPANY_NAME, STR_700A_COMPANY_NAME, 31, 150, w, CS_ALPHANUMERAL);
|
||||
ShowQueryString(STR_COMPANY_NAME, STR_700A_COMPANY_NAME, MAX_LENGTH_PRESIDENT_NAME, 150, w, CS_ALPHANUMERAL);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,11 @@ enum Owner {
|
||||
};
|
||||
DECLARE_POSTFIX_INCREMENT(Owner);
|
||||
|
||||
enum {
|
||||
MAX_LENGTH_PRESIDENT_NAME = 31, ///< The maximum length for a president's name
|
||||
MAX_LENGTH_COMPANY_NAME = 31, ///< The maximum length for a company's name
|
||||
};
|
||||
|
||||
/** Define basic enum properties */
|
||||
template <> struct EnumPropsT<Owner> : MakeEnumPropsT<Owner, byte, OWNER_BEGIN, OWNER_END, INVALID_OWNER> {};
|
||||
typedef TinyEnumT<Owner> OwnerByte;
|
||||
|
||||
+12
-9
@@ -841,18 +841,21 @@ CommandCost CmdPlayerCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
NetworkChangeCompanyPassword(1, &password);
|
||||
}
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
_current_player = _local_player;
|
||||
|
||||
/* Now that we have a new player, broadcast our autorenew settings to
|
||||
* all clients so everything is in sync */
|
||||
NetworkSend_Command(0,
|
||||
(_patches_newgame.autorenew << 15 ) | (_patches_newgame.autorenew_months << 16) | 4,
|
||||
_patches_newgame.autorenew_money,
|
||||
CMD_SET_AUTOREPLACE,
|
||||
NULL
|
||||
);
|
||||
|
||||
MarkWholeScreenDirty();
|
||||
}
|
||||
|
||||
/* Now that we have a new player, broadcast its autorenew settings to
|
||||
* all clients so everything is in sync */
|
||||
DoCommand(0,
|
||||
(_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4,
|
||||
_patches.autorenew_money,
|
||||
DC_EXEC,
|
||||
CMD_SET_AUTOREPLACE
|
||||
);
|
||||
|
||||
#ifdef ENABLE_NETWORK
|
||||
if (_network_server) {
|
||||
/* XXX - UGLY! p2 (pid) is mis-used to fetch the client-id, done at
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@
|
||||
* norev000 is for non-releases that are made on systems without
|
||||
* subversion or sources that are not a checkout of subversion.
|
||||
*/
|
||||
extern const char _openttd_revision[] = "@@VERSION@@";
|
||||
extern const char _openttd_revision[] = "0.6.2-RC2";
|
||||
|
||||
/**
|
||||
* The NewGRF revision of OTTD:
|
||||
@@ -34,11 +34,11 @@ extern const char _openttd_revision[] = "@@VERSION@@";
|
||||
* final release will always have a lower version number than the released
|
||||
* version, thus making comparisions on specific revisions easy.
|
||||
*/
|
||||
uint32 _openttd_newgrf_version = 0 << 28 | 6 << 24 | 2 << 20 | 0 << 19 | (@@REVISION@@ & ((1 << 19) - 1));
|
||||
uint32 _openttd_newgrf_version = 0 << 28 | 6 << 24 | 2 << 20 | 0 << 19 | (13829 & ((1 << 19) - 1));
|
||||
|
||||
#ifdef __MORPHOS__
|
||||
/**
|
||||
* Variable used by MorphOS to show the version.
|
||||
*/
|
||||
extern const char morphos_versions_tag[] = "\\0$VER: OpenTTD @@VERSION@@ (@@DATE@@) OpenTTD Team [MorphOS, PowerPC]";
|
||||
extern const char morphos_versions_tag[] = "\\0$VER: OpenTTD 0.6.2-RC2 (@@DATE@@) OpenTTD Team [MorphOS, PowerPC]";
|
||||
#endif
|
||||
|
||||
+6
-1
@@ -519,7 +519,12 @@ CommandCost CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
}
|
||||
|
||||
case MP_STATION:
|
||||
if (!IsDriveThroughStopTile(tile)) return CMD_ERROR;
|
||||
if (!IsRoadStop(tile)) goto do_clear;
|
||||
if (IsDriveThroughStopTile(tile)) {
|
||||
if (pieces & ~AxisToRoadBits(DiagDirToAxis(GetRoadStopDir(tile)))) goto do_clear;
|
||||
} else {
|
||||
if (pieces & ~DiagDirToRoadBits(GetRoadStopDir(tile))) goto do_clear;
|
||||
}
|
||||
if (HasTileRoadType(tile, rt)) return_cmd_error(STR_1007_ALREADY_BUILT);
|
||||
break;
|
||||
|
||||
|
||||
+1
-1
@@ -1154,7 +1154,7 @@ static int32 UpdateConsists(int32 p1)
|
||||
Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
/* Update the consist of all trains so the maximum speed is set correctly. */
|
||||
if (v->type == VEH_TRAIN && (IsFrontEngine(v) || IsFreeWagon(v))) TrainConsistChanged(v);
|
||||
if (v->type == VEH_TRAIN && (IsFrontEngine(v) || IsFreeWagon(v))) TrainConsistChanged(v, true);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -347,13 +347,11 @@ static inline Corner GetRailFoundationCorner(Foundation f)
|
||||
* Returns the foundation needed to flatten a slope.
|
||||
* The returned foundation is either FOUNDATION_NONE if the tile was already flat, or FOUNDATION_LEVELED.
|
||||
*
|
||||
* @pre The slope must not be steep.
|
||||
* @param s The current #Slope.
|
||||
* @return The needed #Foundation.
|
||||
*/
|
||||
static inline Foundation FlatteningFoundation(Slope s)
|
||||
{
|
||||
assert(!IsSteepSlope(s));
|
||||
return (s == SLOPE_FLAT ? FOUNDATION_NONE : FOUNDATION_LEVELED);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1983,7 +1983,7 @@ static void DoClearTownHouseHelper(TileIndex tile, Town *t, HouseID house)
|
||||
* @param house Is changed to the HouseID of the north tile of the same house
|
||||
* @return TileDiff from the tile of the given HouseID to the north tile
|
||||
*/
|
||||
static TileIndex GetHouseNorthPart(HouseID &house)
|
||||
TileIndex GetHouseNorthPart(HouseID &house)
|
||||
{
|
||||
if (house >= 3) { // house id 0,1,2 MUST be single tile houses, or this code breaks.
|
||||
if (GetHouseSpecs(house - 1)->building_flags & TILE_SIZE_2x1) {
|
||||
|
||||
@@ -275,6 +275,7 @@ byte FreightWagonMult(CargoID cargo);
|
||||
int CheckTrainInDepot(const Vehicle *v, bool needs_to_be_stopped);
|
||||
int CheckTrainStoppedInDepot(const Vehicle *v);
|
||||
void UpdateTrainAcceleration(Vehicle* v);
|
||||
void CheckTrainsLengths();
|
||||
|
||||
/**
|
||||
* This class 'wraps' Vehicle; you do not actually instantiate this class.
|
||||
|
||||
+86
-20
@@ -47,6 +47,7 @@
|
||||
#include "autoreplace_gui.h"
|
||||
#include "gfx_func.h"
|
||||
#include "settings_type.h"
|
||||
#include "network/network.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/train_cmd.h"
|
||||
@@ -177,13 +178,70 @@ static void TrainCargoChanged(Vehicle* v)
|
||||
}
|
||||
|
||||
|
||||
/** Logs a bug in GRF and shows a warning message if this
|
||||
* is for the first time this happened.
|
||||
* @param u first vehicle of chain
|
||||
*/
|
||||
static void RailVehicleLengthChanged(const Vehicle *u)
|
||||
{
|
||||
extern const GRFFile *_engine_grf[TOTAL_NUM_ENGINES];
|
||||
if (_engine_grf[u->engine_type] == NULL) return;
|
||||
|
||||
uint32 grfid = _engine_grf[u->engine_type]->grfid;
|
||||
GRFConfig *grfconfig = GetGRFConfig(grfid);
|
||||
if (!HasBit(grfconfig->grf_bugs, GBUG_VEH_LENGTH)) {
|
||||
SetBit(grfconfig->grf_bugs, GBUG_VEH_LENGTH);
|
||||
SetDParamStr(0, grfconfig->name);
|
||||
SetDParam(1, u->engine_type);
|
||||
ShowErrorMessage(STR_NEWGRF_BROKEN_VEHICLE_LENGTH, STR_NEWGRF_BROKEN, 0, 0);
|
||||
|
||||
/* debug output */
|
||||
char buffer[512];
|
||||
|
||||
SetDParamStr(0, grfconfig->name);
|
||||
GetString(buffer, STR_NEWGRF_BROKEN, lastof(buffer));
|
||||
DEBUG(grf, 0, "%s", buffer + 3);
|
||||
|
||||
SetDParam(1, u->engine_type);
|
||||
GetString(buffer, STR_NEWGRF_BROKEN_VEHICLE_LENGTH, lastof(buffer));
|
||||
DEBUG(grf, 0, "%s", buffer + 3);
|
||||
|
||||
if (!_networking) _pause_game = -1;
|
||||
}
|
||||
}
|
||||
|
||||
/** Checks if lengths of all rail vehicles are valid. If not, shows an error message. */
|
||||
void CheckTrainsLengths()
|
||||
{
|
||||
const Vehicle *v;
|
||||
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->type == VEH_TRAIN && v->First() == v && !(v->vehstatus & VS_CRASHED)) {
|
||||
for (const Vehicle *u = v, *w = v->Next(); w != NULL; u = w, w = w->Next()) {
|
||||
if (u->u.rail.track != TRACK_BIT_DEPOT) {
|
||||
if ((w->u.rail.track != TRACK_BIT_DEPOT &&
|
||||
max(abs(u->x_pos - w->x_pos), abs(u->y_pos - w->y_pos)) != u->u.rail.cached_veh_length) ||
|
||||
(w->u.rail.track == TRACK_BIT_DEPOT && TicksToLeaveDepot(u) <= 0)) {
|
||||
SetDParam(0, v->index);
|
||||
SetDParam(1, v->owner);
|
||||
ShowErrorMessage(INVALID_STRING_ID, STR_BROKEN_VEHICLE_LENGTH, 0, 0);
|
||||
|
||||
if (!_networking) _pause_game = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recalculates the cached stuff of a train. Should be called each time a vehicle is added
|
||||
* to/removed from the chain, and when the game is loaded.
|
||||
* Note: this needs to be called too for 'wagon chains' (in the depot, without an engine)
|
||||
* @param v First vehicle of the chain.
|
||||
* @param same_length should length of vehicles stay the same?
|
||||
*/
|
||||
void TrainConsistChanged(Vehicle* v)
|
||||
void TrainConsistChanged(Vehicle *v, bool same_length)
|
||||
{
|
||||
uint16 max_speed = 0xFFFF;
|
||||
|
||||
@@ -291,8 +349,14 @@ void TrainConsistChanged(Vehicle* v)
|
||||
veh_len = GetVehicleCallback(CBID_VEHICLE_LENGTH, 0, 0, u->engine_type, u);
|
||||
}
|
||||
if (veh_len == CALLBACK_FAILED) veh_len = rvi_u->shorten_factor;
|
||||
veh_len = Clamp(veh_len, 0, u->Next() == NULL ? 7 : 5); // the clamp on vehicles not the last in chain is stricter, as too short wagons can break the 'follow next vehicle' code
|
||||
u->u.rail.cached_veh_length = 8 - veh_len;
|
||||
veh_len = 8 - Clamp(veh_len, 0, u->Next() == NULL ? 7 : 5); // the clamp on vehicles not the last in chain is stricter, as too short wagons can break the 'follow next vehicle' code
|
||||
|
||||
/* verify length hasn't changed */
|
||||
if (same_length && veh_len != u->u.rail.cached_veh_length) RailVehicleLengthChanged(u);
|
||||
|
||||
/* update vehicle length? */
|
||||
if (!same_length) u->u.rail.cached_veh_length = veh_len;
|
||||
|
||||
v->u.rail.cached_total_length += u->u.rail.cached_veh_length;
|
||||
}
|
||||
|
||||
@@ -630,7 +694,7 @@ static CommandCost CmdBuildRailWagon(EngineID engine, TileIndex tile, uint32 fla
|
||||
_new_vehicle_id = v->index;
|
||||
|
||||
VehiclePositionChanged(v);
|
||||
TrainConsistChanged(v->First());
|
||||
TrainConsistChanged(v->First(), false);
|
||||
UpdateTrainGroupID(v->First());
|
||||
|
||||
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
|
||||
@@ -805,7 +869,7 @@ CommandCost CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32
|
||||
AddArticulatedParts(vl, VEH_TRAIN);
|
||||
}
|
||||
|
||||
TrainConsistChanged(v);
|
||||
TrainConsistChanged(v, false);
|
||||
UpdateTrainGroupID(v);
|
||||
|
||||
if (!HasBit(p2, 1) && !(flags & DC_AUTOREPLACE)) { // check if the cars should be added to the new vehicle
|
||||
@@ -1257,7 +1321,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p
|
||||
|
||||
if (src_head != NULL) {
|
||||
NormaliseTrainConsist(src_head);
|
||||
TrainConsistChanged(src_head);
|
||||
TrainConsistChanged(src_head, false);
|
||||
UpdateTrainGroupID(src_head);
|
||||
if (IsFrontEngine(src_head)) {
|
||||
/* Update the refit button and window */
|
||||
@@ -1270,7 +1334,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p
|
||||
|
||||
if (dst_head != NULL) {
|
||||
NormaliseTrainConsist(dst_head);
|
||||
TrainConsistChanged(dst_head);
|
||||
TrainConsistChanged(dst_head, false);
|
||||
UpdateTrainGroupID(dst_head);
|
||||
if (IsFrontEngine(dst_head)) {
|
||||
/* Update the refit button and window */
|
||||
@@ -1443,7 +1507,7 @@ CommandCost CmdSellRailWagon(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
/* 5. If the train still exists, update its acceleration, window, etc. */
|
||||
if (first != NULL) {
|
||||
NormaliseTrainConsist(first);
|
||||
TrainConsistChanged(first);
|
||||
TrainConsistChanged(first, false);
|
||||
UpdateTrainGroupID(first);
|
||||
if (IsFrontEngine(first)) InvalidateWindow(WC_VEHICLE_REFIT, first->index);
|
||||
}
|
||||
@@ -1509,7 +1573,7 @@ CommandCost CmdSellRailWagon(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
/* 3. If it is still a valid train after selling, update its acceleration and cached values */
|
||||
if (flags & DC_EXEC && first != NULL) {
|
||||
NormaliseTrainConsist(first);
|
||||
TrainConsistChanged(first);
|
||||
TrainConsistChanged(first, false);
|
||||
UpdateTrainGroupID(first);
|
||||
InvalidateWindow(WC_VEHICLE_REFIT, first->index);
|
||||
}
|
||||
@@ -1845,7 +1909,7 @@ static void ReverseTrainDirection(Vehicle *v)
|
||||
ClrBit(v->u.rail.flags, VRF_REVERSING);
|
||||
|
||||
/* recalculate cached data */
|
||||
TrainConsistChanged(v);
|
||||
TrainConsistChanged(v, true);
|
||||
|
||||
/* update all images */
|
||||
for (Vehicle *u = v; u != NULL; u = u->Next()) u->cur_image = u->GetImage(u->direction);
|
||||
@@ -2022,7 +2086,7 @@ CommandCost CmdRefitRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32
|
||||
_returned_refit_capacity = num;
|
||||
|
||||
/* Update the train's cached variables */
|
||||
if (flags & DC_EXEC) TrainConsistChanged(GetVehicle(p1)->First());
|
||||
if (flags & DC_EXEC) TrainConsistChanged(GetVehicle(p1)->First(), false);
|
||||
|
||||
return cost;
|
||||
}
|
||||
@@ -3041,13 +3105,13 @@ static void CheckTrainCollision(Vehicle *v)
|
||||
|
||||
static void *CheckVehicleAtSignal(Vehicle *v, void *data)
|
||||
{
|
||||
Direction dir = *(Direction*)data;
|
||||
DiagDirection exitdir = *(DiagDirection *)data;
|
||||
|
||||
if (v->type == VEH_TRAIN && IsFrontEngine(v)) {
|
||||
DirDiff diff = ChangeDirDiff(DirDifference(v->direction, dir), DIRDIFF_90RIGHT);
|
||||
|
||||
if (diff == DIRDIFF_90RIGHT || (v->cur_speed <= 5 && diff <= DIRDIFF_REVERSE)) return v;
|
||||
/* front engine of a train, not inside wormhole or depot */
|
||||
if (v->type == VEH_TRAIN && IsFrontEngine(v) && (v->u.rail.track & TRACK_BIT_MASK) != 0) {
|
||||
if (v->cur_speed <= 5 && TrainExitDir(v->direction, v->u.rail.track) == exitdir) return v;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -3138,11 +3202,13 @@ static void TrainController(Vehicle *v, Vehicle *nomove, bool update_image)
|
||||
v->subspeed = 0;
|
||||
v->progress = 255 - 10;
|
||||
if (++v->load_unload_time_rem < _patches.wait_twoway_signal * 73) {
|
||||
TileIndex o_tile = gp.new_tile + TileOffsByDiagDir(enterdir);
|
||||
Direction rdir = ReverseDir(dir);
|
||||
DiagDirection exitdir = TrackdirToExitdir(i);
|
||||
TileIndex o_tile = TileAddByDiagDir(gp.new_tile, exitdir);
|
||||
|
||||
exitdir = ReverseDiagDir(exitdir);
|
||||
|
||||
/* check if a train is waiting on the other side */
|
||||
if (VehicleFromPos(o_tile, &rdir, &CheckVehicleAtSignal) == NULL) return;
|
||||
if (VehicleFromPos(o_tile, &exitdir, &CheckVehicleAtSignal) == NULL) return;
|
||||
}
|
||||
}
|
||||
goto reverse_train_direction;
|
||||
@@ -3279,7 +3345,7 @@ static void DeleteLastWagon(Vehicle *v)
|
||||
InvalidateWindow(WC_COMPANY, v->owner);
|
||||
} else {
|
||||
/* Recalculate cached train properties */
|
||||
TrainConsistChanged(first);
|
||||
TrainConsistChanged(first, false);
|
||||
/* Update the depot window if the first vehicle is in depot -
|
||||
* if v == first, then it is updated in PreDestructor() */
|
||||
if (first->u.rail.track == TRACK_BIT_DEPOT) {
|
||||
|
||||
+2
-2
@@ -275,7 +275,7 @@ void AfterLoadVehicles(bool clear_te_id)
|
||||
|
||||
if (v->type == VEH_TRAIN && (IsFrontEngine(v) || IsFreeWagon(v))) {
|
||||
if (IsFrontEngine(v)) v->u.rail.last_speed = v->cur_speed; // update displayed train speed
|
||||
TrainConsistChanged(v);
|
||||
TrainConsistChanged(v, false);
|
||||
} else if (v->type == VEH_ROAD && IsRoadVehFront(v)) {
|
||||
RoadVehUpdateCache(v);
|
||||
}
|
||||
@@ -2206,7 +2206,7 @@ void VehicleEnterDepot(Vehicle *v)
|
||||
v->load_unload_time_rem = 0;
|
||||
/* Reset reversed flag */
|
||||
for (Vehicle *u = v; u != NULL; u = u->Next()) ClrBit(u->u.rail.flags, VRF_TOGGLE_REVERSE);
|
||||
TrainConsistChanged(v);
|
||||
TrainConsistChanged(v, true);
|
||||
break;
|
||||
|
||||
case VEH_ROAD:
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ void MarkSingleVehicleDirty(const Vehicle *v);
|
||||
|
||||
UnitID GetFreeUnitNumber(VehicleType type);
|
||||
|
||||
void TrainConsistChanged(Vehicle *v);
|
||||
void TrainConsistChanged(Vehicle *v, bool same_length);
|
||||
void TrainPowerChanged(Vehicle *v);
|
||||
Money GetTrainRunningCost(const Vehicle *v);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user