mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-13 01:29:10 +00:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4b1858e569 |
@@ -58,7 +58,7 @@ function Regression::TestInit()
|
||||
}
|
||||
|
||||
list = AIList();
|
||||
list.Sort(AIAbstractList.SORT_BY_VALUE, AIAbstractList.SORT_ASCENDING);
|
||||
list.Sort(AIAbstractList.SORT_BY_VALUE, true);
|
||||
print("");
|
||||
print(" Value Ascending");
|
||||
list.AddItem( 5, 10);
|
||||
@@ -93,7 +93,7 @@ function Regression::TestInit()
|
||||
}
|
||||
|
||||
list = AIList();
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_DESCENDING);
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, false);
|
||||
print("");
|
||||
print(" Item Descending");
|
||||
list.AddItem( 5, 10);
|
||||
@@ -128,7 +128,7 @@ function Regression::TestInit()
|
||||
}
|
||||
|
||||
list = AIList();
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_ASCENDING);
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, true);
|
||||
print("");
|
||||
print(" Item Ascending");
|
||||
list.AddItem( 5, 10);
|
||||
@@ -213,11 +213,10 @@ function Regression::Airport()
|
||||
print(" GetAirportType(): " + AIAirport.GetAirportType(32116));
|
||||
|
||||
for (local i = -1; i < 10; i++) {
|
||||
print(" IsAirportInformationAvailable(" + i + "): " + AIAirport.IsAirportInformationAvailable(i));
|
||||
print(" IsValidAirportType(" + i + "): " + AIAirport.IsValidAirportType(i));
|
||||
print(" GetAirportWidth(" + i + "): " + AIAirport.GetAirportWidth(i));
|
||||
print(" GetAirportHeight(" + i + "): " + AIAirport.GetAirportHeight(i));
|
||||
print(" GetAirportCoverageRadius(" + i + "): " + AIAirport.GetAirportCoverageRadius(i));
|
||||
print(" IsValidAirportType(" + i + "): " + AIAirport.IsValidAirportType(i));
|
||||
print(" GetAirportWidth(" + i + "): " + AIAirport.GetAirportWidth(i));
|
||||
print(" GetAirportHeight(" + i + "): " + AIAirport.GetAirportHeight(i));
|
||||
print(" GetAirportCoverageRadius(" + i + "): " + AIAirport.GetAirportCoverageRadius(i));
|
||||
}
|
||||
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
@@ -546,7 +545,7 @@ function Regression::Industry()
|
||||
print("--Industry--");
|
||||
print(" GetIndustryCount(): " + AIIndustry.GetIndustryCount());
|
||||
local list = AIIndustryList();
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_ASCENDING);
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, true);
|
||||
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
|
||||
if (AIIndustry.IsValidIndustry(i)) j++;
|
||||
print(" Industry " + i);
|
||||
@@ -668,7 +667,7 @@ function Regression::List()
|
||||
print(" HasItem(1050): " + list.HasItem(1050));
|
||||
print(" HasItem(1051): " + list.HasItem(1051));
|
||||
print(" IsEmpty(): " + list.IsEmpty());
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_ASCENDING);
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, true);
|
||||
print(" List Dump:");
|
||||
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
|
||||
print(" " + i + " => " + list.GetValue(i));
|
||||
@@ -1079,7 +1078,7 @@ function Regression::Sign()
|
||||
print(" RemoveSign(" + sign_id + "): " + AISign.RemoveSign(sign_id));
|
||||
print("");
|
||||
local list = AISignList();
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_ASCENDING);
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, true);
|
||||
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
|
||||
j++;
|
||||
print(" Sign " + i);
|
||||
@@ -1348,7 +1347,7 @@ function Regression::Town()
|
||||
print("--Town--");
|
||||
print(" GetTownCount(): " + AITown.GetTownCount());
|
||||
local list = AITownList();
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_ASCENDING);
|
||||
list.Sort(AIAbstractList.SORT_BY_ITEM, true);
|
||||
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
|
||||
if (AITown.IsValidTown(i)) j++;
|
||||
print(" Town " + i);
|
||||
|
@@ -575,61 +575,50 @@
|
||||
IsAirportTile(): false
|
||||
GetHangarOfAirport(): -1
|
||||
GetAirportType(): 255
|
||||
IsAirportInformationAvailable(-1): false
|
||||
IsValidAirportType(-1): false
|
||||
GetAirportWidth(-1): -1
|
||||
GetAirportHeight(-1): -1
|
||||
GetAirportCoverageRadius(-1): -1
|
||||
IsAirportInformationAvailable(0): true
|
||||
IsValidAirportType(0): true
|
||||
GetAirportWidth(0): 4
|
||||
GetAirportHeight(0): 3
|
||||
GetAirportCoverageRadius(0): 4
|
||||
IsAirportInformationAvailable(1): true
|
||||
IsValidAirportType(1): false
|
||||
GetAirportWidth(1): 6
|
||||
GetAirportHeight(1): 6
|
||||
GetAirportCoverageRadius(1): 5
|
||||
IsAirportInformationAvailable(2): true
|
||||
IsValidAirportType(2): false
|
||||
GetAirportWidth(2): 1
|
||||
GetAirportHeight(2): 1
|
||||
GetAirportCoverageRadius(2): 4
|
||||
IsAirportInformationAvailable(3): true
|
||||
IsValidAirportType(3): false
|
||||
GetAirportWidth(3): 6
|
||||
GetAirportHeight(3): 6
|
||||
GetAirportCoverageRadius(3): 6
|
||||
IsAirportInformationAvailable(4): true
|
||||
IsValidAirportType(4): false
|
||||
GetAirportWidth(4): 7
|
||||
GetAirportHeight(4): 7
|
||||
GetAirportCoverageRadius(4): 8
|
||||
IsAirportInformationAvailable(5): true
|
||||
IsValidAirportType(5): false
|
||||
GetAirportWidth(5): 5
|
||||
GetAirportHeight(5): 4
|
||||
GetAirportCoverageRadius(5): 4
|
||||
IsAirportInformationAvailable(6): true
|
||||
IsValidAirportType(6): false
|
||||
GetAirportWidth(6): 2
|
||||
GetAirportHeight(6): 2
|
||||
GetAirportCoverageRadius(6): 4
|
||||
IsAirportInformationAvailable(7): true
|
||||
IsValidAirportType(7): false
|
||||
GetAirportWidth(7): 9
|
||||
GetAirportHeight(7): 11
|
||||
GetAirportCoverageRadius(7): 10
|
||||
IsAirportInformationAvailable(8): true
|
||||
IsValidAirportType(8): false
|
||||
GetAirportWidth(8): 4
|
||||
GetAirportHeight(8): 2
|
||||
GetAirportCoverageRadius(8): 4
|
||||
IsAirportInformationAvailable(9): false
|
||||
IsValidAirportType(9): false
|
||||
GetAirportWidth(9): -1
|
||||
GetAirportHeight(9): -1
|
||||
GetAirportCoverageRadius(9): -1
|
||||
IsValidAirportType(-1): false
|
||||
GetAirportWidth(-1): -1
|
||||
GetAirportHeight(-1): -1
|
||||
GetAirportCoverageRadius(-1): -1
|
||||
IsValidAirportType(0): true
|
||||
GetAirportWidth(0): 4
|
||||
GetAirportHeight(0): 3
|
||||
GetAirportCoverageRadius(0): 4
|
||||
IsValidAirportType(1): false
|
||||
GetAirportWidth(1): -1
|
||||
GetAirportHeight(1): -1
|
||||
GetAirportCoverageRadius(1): -1
|
||||
IsValidAirportType(2): false
|
||||
GetAirportWidth(2): -1
|
||||
GetAirportHeight(2): -1
|
||||
GetAirportCoverageRadius(2): -1
|
||||
IsValidAirportType(3): false
|
||||
GetAirportWidth(3): -1
|
||||
GetAirportHeight(3): -1
|
||||
GetAirportCoverageRadius(3): -1
|
||||
IsValidAirportType(4): false
|
||||
GetAirportWidth(4): -1
|
||||
GetAirportHeight(4): -1
|
||||
GetAirportCoverageRadius(4): -1
|
||||
IsValidAirportType(5): false
|
||||
GetAirportWidth(5): -1
|
||||
GetAirportHeight(5): -1
|
||||
GetAirportCoverageRadius(5): -1
|
||||
IsValidAirportType(6): false
|
||||
GetAirportWidth(6): -1
|
||||
GetAirportHeight(6): -1
|
||||
GetAirportCoverageRadius(6): -1
|
||||
IsValidAirportType(7): false
|
||||
GetAirportWidth(7): -1
|
||||
GetAirportHeight(7): -1
|
||||
GetAirportCoverageRadius(7): -1
|
||||
IsValidAirportType(8): false
|
||||
GetAirportWidth(8): -1
|
||||
GetAirportHeight(8): -1
|
||||
GetAirportCoverageRadius(8): -1
|
||||
IsValidAirportType(9): false
|
||||
GetAirportWidth(9): -1
|
||||
GetAirportHeight(9): -1
|
||||
GetAirportCoverageRadius(9): -1
|
||||
GetBankBalance(): 100000
|
||||
GetPrice(): 84
|
||||
BuildAirport(): true
|
||||
@@ -659,70 +648,70 @@
|
||||
IsValidBridge(): true
|
||||
GetName(): Wooden rail bridge
|
||||
GetMaxSpeed(): 32
|
||||
GetPrice(): 15
|
||||
GetPrice(): 10
|
||||
GetMaxLength(): 102
|
||||
GetMinLength(): 2
|
||||
Bridge 1
|
||||
IsValidBridge(): true
|
||||
GetName(): Concrete rail bridge
|
||||
GetMaxSpeed(): 48
|
||||
GetPrice(): 21
|
||||
GetPrice(): 15
|
||||
GetMaxLength(): 4
|
||||
GetMinLength(): 2
|
||||
Bridge 2
|
||||
IsValidBridge(): true
|
||||
GetName(): Steel girder rail bridge
|
||||
GetMaxSpeed(): 64
|
||||
GetPrice(): 27
|
||||
GetPrice(): 19
|
||||
GetMaxLength(): 7
|
||||
GetMinLength(): 2
|
||||
Bridge 3
|
||||
IsValidBridge(): true
|
||||
GetName(): Reinforced concrete suspension rail bridge
|
||||
GetMaxSpeed(): 80
|
||||
GetPrice(): 32
|
||||
GetPrice(): 22
|
||||
GetMaxLength(): 12
|
||||
GetMinLength(): 4
|
||||
Bridge 4
|
||||
IsValidBridge(): true
|
||||
GetName(): Steel suspension rail bridge
|
||||
GetMaxSpeed(): 96
|
||||
GetPrice(): 35
|
||||
GetPrice(): 25
|
||||
GetMaxLength(): 102
|
||||
GetMinLength(): 5
|
||||
Bridge 5
|
||||
IsValidBridge(): true
|
||||
GetName(): Steel suspension rail bridge
|
||||
GetMaxSpeed(): 112
|
||||
GetPrice(): 36
|
||||
GetPrice(): 26
|
||||
GetMaxLength(): 102
|
||||
GetMinLength(): 5
|
||||
Bridge 6
|
||||
IsValidBridge(): true
|
||||
GetName(): Steel cantilever rail bridge
|
||||
GetMaxSpeed(): 160
|
||||
GetPrice(): 42
|
||||
GetPrice(): 30
|
||||
GetMaxLength(): 9
|
||||
GetMinLength(): 5
|
||||
Bridge 7
|
||||
IsValidBridge(): true
|
||||
GetName(): Steel cantilever rail bridge
|
||||
GetMaxSpeed(): 208
|
||||
GetPrice(): 44
|
||||
GetPrice(): 31
|
||||
GetMaxLength(): 10
|
||||
GetMinLength(): 5
|
||||
Bridge 8
|
||||
IsValidBridge(): true
|
||||
GetName(): Steel cantilever rail bridge
|
||||
GetMaxSpeed(): 240
|
||||
GetPrice(): 47
|
||||
GetPrice(): 33
|
||||
GetMaxLength(): 11
|
||||
GetMinLength(): 5
|
||||
Bridge 9
|
||||
IsValidBridge(): true
|
||||
GetName(): Steel girder rail bridge
|
||||
GetMaxSpeed(): 256
|
||||
GetPrice(): 45
|
||||
GetPrice(): 32
|
||||
GetMaxLength(): 4
|
||||
GetMinLength(): 2
|
||||
Bridge 10
|
||||
@@ -784,16 +773,16 @@
|
||||
1 => 48
|
||||
0 => 32
|
||||
Price ListDump:
|
||||
8 => 47
|
||||
9 => 45
|
||||
7 => 44
|
||||
6 => 42
|
||||
5 => 36
|
||||
4 => 35
|
||||
3 => 32
|
||||
2 => 27
|
||||
1 => 21
|
||||
0 => 15
|
||||
8 => 33
|
||||
9 => 32
|
||||
7 => 31
|
||||
6 => 30
|
||||
5 => 26
|
||||
4 => 25
|
||||
3 => 22
|
||||
2 => 19
|
||||
1 => 15
|
||||
0 => 10
|
||||
MaxLength ListDump:
|
||||
5 => 102
|
||||
4 => 102
|
||||
@@ -824,9 +813,9 @@
|
||||
4 => 96
|
||||
0 => 32
|
||||
Price ListDump:
|
||||
5 => 220
|
||||
4 => 212
|
||||
0 => 91
|
||||
5 => 73
|
||||
4 => 70
|
||||
0 => 30
|
||||
|
||||
--AICargo--
|
||||
Cargo -1
|
||||
|
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
; $Id$
|
||||
;
|
||||
; This represents the original graphics as on the Transport
|
||||
; Tycoon Deluxe for Windows CD.
|
||||
; Tycoon Deluxe for Windows.
|
||||
;
|
||||
[metadata]
|
||||
name = original_windows
|
||||
|
308
changelog.txt
308
changelog.txt
@@ -1,113 +1,3 @@
|
||||
0.7.3 (2009-10-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: [NewGRF] Crash when trying to build an industry that has no industry layout defined [FS#3233] (r17638, r17633)
|
||||
|
||||
|
||||
0.7.3-RC2 (2009-09-24)
|
||||
------------------------------------------------------------------------
|
||||
- Update: Documentation about bug reporting and known bugs (r17554)
|
||||
- Fix: When a command did not fail in test run and failed in execution run, error message was not set. Affects only few commands (r17607)
|
||||
- Fix: [NewGRF] Crash when defining the same tile in a tile layout twice [FS#3218] (r17605)
|
||||
- Fix: Vehicle image was not always updated when needed (r17594)
|
||||
- Fix: [NoAI] Could not query the size of small airports when they could not be build anymore [FS#3212] (r17591)
|
||||
- Fix: Erroneous message about changing the difficulty level [FS#3220] (r17588)
|
||||
- Fix: Assertion triggered when the second vehicle in a 101+ (or 11+ if mammoth trains is disabled) vehicle free wagon chain is an engine and the first vehicle is moved to another chain [FS#3208] (r17576)
|
||||
- Fix: [NewGRF] Memory leak when viewing the NewGRF settings of a server (r17563)
|
||||
- Fix: [NewGRF] The NewGRF settings of (remote) network games did not get properly updated when the NewGRFs were rescanned causing reading of freed data [FS#2972] (r17562)
|
||||
- Fix: [NewGRF] Close the "Add NewGRF" window when you close the "NewGRF Settings" window. The add window has a pointer to the settings which means that not deleting it would cause dereferencing an already freed pointer [FS#3206] (r17559)
|
||||
- Fix: Vehicles waiting for their time table did not load anymore after their initial load was completed [FS#3201] (r17551)
|
||||
- Fix: Aircraft were given an unfair advantage in station rating calculations (r17550)
|
||||
- Fix: [NewGRF] Sign extending of profit calculation did not work (r17546)
|
||||
- Fix: [NoAI] AIs had "infinite" time when running code from the global scope [FS#3202] (r17545)
|
||||
- Fix: [NoAI] Crash when doing commands in the "global" scope [FS#3202] (r17544)
|
||||
|
||||
|
||||
0.7.3-RC1 (2009-09-13)
|
||||
------------------------------------------------------------------------
|
||||
- Add: [NoAI] AITown::GetLastMonthTransportedPercentage and AIIndustry::GetLastMonthTransportedPercentage (r17294)
|
||||
- Add: [NoAI] AICompany::Get/Set PresidentGender (r17016)
|
||||
- Add: [NoAI] AIEngine::GetDesignDate (r17014)
|
||||
- Add: [NoAI] AIStation::GetConstructionDate (r17012)
|
||||
- Add: [NoAI] AIAbstractList::SORT_ASCENDING / SORT_DESCENDING (r17005)
|
||||
- Change: [NoAI] AITown::GetLastMonthProduction now returns the same value as AITown::GetMaxProduction (r17293)
|
||||
- Change: Mention the MD5 checksum of the original NewGRF in the 'saveload failed horribly'-error message and make it more clear that the filename is of the current NewGRF [FS#3139] (r17267)
|
||||
- Change: Make overbuilding the front tile of a road station/depot with road consistent with overbuilding the front tile of tunnels/bridges [FS#2802] (r17239)
|
||||
- Change: Improve error output on missing or corrupt files (r17238)
|
||||
- Change: [Unix] Only use colorized error output on interactive terminals (r17227)
|
||||
- Change: [NoAI] Crash an AI when it uses a DoCommand / Sleep instead of just printing an error message in the AI Debug Window [FS#2980] (r17223)
|
||||
- Change: [NoAI] When the API requests a string as parameter allow every squirrel type and convert to a string [FS#3101] (r17221)
|
||||
- Change: Make strgen warn if the translation uses STRINGn or RAW_STRING instead of STRING (r17137, r17129)
|
||||
- Change: [NoAI] Load the API before compiling an AI script so AIs can subclass API classes and use API constants as part of their own constants (r17043)
|
||||
- Change: Add notion of Ctrl+Click in the tooltip for Loan borrow/repay buttons [FS#3066] (r16979)
|
||||
- Change: [MSVC] Make all language files depend on english.txt (r16975)
|
||||
- Change: There is no point in not randomising engine introduction-date before 1922. Instead disable the randomisation for the first two years after game-start, so you do not have to wait for the first engine (r16929)
|
||||
- Fix: [Squirrel] In some cases the call stack would not be cleaned up properly during crash handling. Occasionally this causes asserts to be triggered or crashes [FS#3189] (r17515)
|
||||
- Fix: When loading GRFConfigs from ini file, validate them wrt. duplicate GRF IDs [FS#3197] (r17510)
|
||||
- Fix: When building a part fails during cloning, sell what was already cloned instead of leaving it 'for free'. Also make cloning multiheaded trains possible with with 'max - 1' vehicles existing [FS#3196] (r17509)
|
||||
- Fix: [NoAI] The wrong value was restored to SetAllowDoCommand possible resulting in an AI that was not allowed to do any actions (r17500)
|
||||
- Fix: Road vehicles could get lost when the prelimiary destination (for the pathfinder heuristics) is unreachable [FS#3188] (r17491)
|
||||
- Fix: When building roads is not allowed for town, then do not build the initial piece either [FS#3173] (r17444)
|
||||
- Fix: Destruction of depots did not remove any vehicle lists related to the depot, causing windows pointing to deleted depots and (thus) crashes [FS#3180] (r17442)
|
||||
- Fix: Economy recession would never end when economy is set to Steady while in recession (r17426)
|
||||
- Fix: The index of orders loaded from old savegames was owerwritten with an unitialized value (r17419)
|
||||
- Fix: Incomplete check on validity of industry type when building industries (r17413)
|
||||
- Fix: [Squirrel] Guard against Squirrel stack overflows (r17403)
|
||||
- Fix: [NoAI] During every save a few slots on the Squirrel stack were leaked (r17402)
|
||||
- Fix: [NoAI] Several AITile::* functions did not check whether their parameters were valid (r17378)
|
||||
- Fix: Memory leak when trying to bankrupt the local company, other minor improvements of bankruptcy (r17342, r17341, r17340)
|
||||
- Fix: Not all non-ASCII characters were entered with escapes in the About window (r17309)
|
||||
- Fix: [NoAI] AIRail::RemoveRailTrack returned ERR_PRECONDITION_ERROR for road/rail-crossings (r17307)
|
||||
- Fix: [NoAI] Reloading an AI started a new AI in the first available company slot causing other AIs to be started [FS#3153] (r17298)
|
||||
- Fix: [NoAI] AITown::GetLastMonthTransported did not work as documented at all, make it return what AITown::GetLastMonthProduction did (r17293)
|
||||
- Fix: Crash after upgrading base graphics set when opening the game options menu and you were using the upgraded set [FS#3147] (r17291)
|
||||
- Fix: [Squirrel] Stack was not always cleared properly with tail recursion (r17284)
|
||||
- Fix: [Squirrel] Calling a function that has default parameters with not enough parameters can cause a crash (r17273)
|
||||
- Fix: Other tunnel end not shown if building rail tunnels and the first railtype is not available yet [FS#3141] (r17251)
|
||||
- Fix: [NoAI] AIs that crashed during Save() were not killed as they should [FS#3134] (r17231)
|
||||
- Fix: [NoAI] Do not assert when an AI uses AI*Mode objects incorrectly but crash the AI instead (r17230)
|
||||
- Fix: Remove the (deprecated since 2006) Encoding entry from the openttd.desktop file (r17226)
|
||||
- Fix: With time tables vehicles would stay in the 'loading' state after they have finished loading [FS#3129, FS#3130] (r17222)
|
||||
- Fix: Do not ignore white space changes (e.g. alignment fixes) in the exporter (r17220)
|
||||
- Fix: [NoAI] IsRoadTypeAvailable(GetCurrentRoadType()) was not a precondition for several AIRoad::* functions (r17203)
|
||||
- Fix: [NoAI] Do not say you are building a depot when you are actually building a station (API docs typo) (r17201)
|
||||
- Fix: Accept monthly production values in the scenario editor [FS#2406] (r17198)
|
||||
- Fix: [Squirrel] FPE when an AI tried to do '% 0' (r17195)
|
||||
- Fix: [NoAI] Guard the valuator against 'external' modifications of the valuated list which could cause it to go into an infinite loop [FS#3124] (r17193)
|
||||
- Fix: Do not return exit value of rm, but of the actual configure run (r17163)
|
||||
- Fix: A stuck train could free the reservation of another train if it was reversed or did crash (r17152)
|
||||
- Fix: A train entering a PBS section through a block signal could cause a train crash if another reservation ending at a safe tile was already present in the section [FS#3104] (r17151)
|
||||
- Fix: Update vehicle position cache when the vehicle sprite changes [FS#3060] (r17121)
|
||||
- Fix: Mark industry tiles dirty when trigger are triggered (r17118)
|
||||
- Fix: Squirrel_export.sh failed for some locales (r17109)
|
||||
- Fix: Make restart command work again and make the help show how it works and how it does not work [FS#3092] (r17097)
|
||||
- Fix: News message about ordered refits failing was not very clear [FS#3091] (r17096)
|
||||
- Fix: Crash when renaming some stations [FS#3082] (r17078)
|
||||
- Fix: RPM spec file failed for CentOS; apparantly their rpmbuild is pickier or so [FS#3024] (r17077)
|
||||
- Fix: [NewGRF] Mark house tiles dirty when triggers were triggered (r17047)
|
||||
- Fix: [NewGRF] Trigger house trigger 02 only for the north tile [FS#3085] (r17046)
|
||||
- Fix: Graphical glitch with graph key [FS#3083] (r17041)
|
||||
- Fix: '[bd]ash'-ism in configure [FS#3076] (r17026)
|
||||
- Fix: Infinite recursion in content dependency checking [FS#3075] (r17015)
|
||||
- Fix: Concatenating strings in Squirrel when non-ASCII strings were received from OpenTTD failed [FS#3074] (r17013)
|
||||
- Fix: [NoAI] Documentation of AITile::LevelTiles was wrong (r17049)
|
||||
- Fix: [NoAI] AIBridge::GetPrice returned incorrect values (r16986)
|
||||
- Fix: Make it so that failing to generate many random towns in scenario editor returns a failing message [FS#3059] (r16977)
|
||||
- Fix: The last manually added server would not be saved [FS#3062] (r16981)
|
||||
|
||||
|
||||
0.7.2 (2009-08-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Vehicles would wait 'very long' when they had nothing to unload and gradual loading was disabled [FS#3054] (r16933)
|
||||
|
||||
|
||||
0.7.2-RC2 (2009-07-21)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: When marking trains stuck do not reset the unload/stuck counter when the vehicle is unloading. It will be automatically reset once the vehicle wants to leave the station [FS#3038] (r16901)
|
||||
- Fix: [NoAI]: Small errors in the API documentation [FS#3037] (r16865)
|
||||
- Fix: Savegames from before 0.4 would get their waypoint 'index' messed up (r16854)
|
||||
- Fix: Cargo payments were not destroyed when a vehicle was destructed. This only happened when you crashed a vehicle while it was unloading [FS#3032, FS#3046] (r16801)
|
||||
|
||||
|
||||
0.7.2-RC1 (2009-07-15)
|
||||
------------------------------------------------------------------------
|
||||
- Add: Plural 'rule' for Korean (r16811)
|
||||
@@ -121,7 +11,7 @@
|
||||
- Fix: Do not use the same error message for turning around road vehicles and flipping parts of trains in the depot [FS#3019] (r16772)
|
||||
- Fix: The win32 and win64 binary packages would not get their readme converted to DOS line endings (r16769)
|
||||
- Fix: [NoAI] AITile::GetCargoProduction/Acceptance did not accept a radius of 0 anymore (r16767)
|
||||
- Fix: In the refit window the 'Select cargo type to carry' line always showed the ship refit tooltip [FS#3018] (r16757)
|
||||
- Fix: In the refit window the "Select cargo type to carry" line always showed the ship refit tooltip [FS#3018] (r16757)
|
||||
- Fix: When loading a savegame Engine::grffile might be left NULL in certain cases (dynamic_engines enabled, articulated vehicle with only wagon-override action3s) (r16737)
|
||||
- Fix: Show Close instead of Cancel when there is nothing to canel in the content downloading window [FS#2991] (r16732)
|
||||
- Fix: [NoAI] AIDepotList contained wrong tiles for hangars when st->xy != st->airport_tile (r16731)
|
||||
@@ -214,7 +104,7 @@
|
||||
- Add: [NoAI] AIAirport::GetPrice, returning the building cost of an airport (r16252)
|
||||
- Add: [NoAI] Two new error codes to AITile: ERR_AREA_ALREADY_FLAT and ERR_EXCAVATION_WOULD_DAMAGE (r16171)
|
||||
- Add: [NoAI] AITile::Get(Min|Max|Corner)Height (r16166)
|
||||
- Add: [NoAI] Several functions to AIOrder to check the what kind of order an order is and AIVehicle.SendVehicleToDepotForServicing [FS#2801] (r16165)
|
||||
- Add: [NoAI] Several functions to AIOrder to check the what kind of order an order is [FS#2801] (r16165)
|
||||
- Add: [NoAI] UseAsRandomAI as function in info.nut. When an AI returns false, it will never be chosen as random AI (r16113)
|
||||
- Add: [NoAI] AIOF_STOP_IN_DEPOT to the orderflags in AIOrder to allow stop-in-depot orders (r16107)
|
||||
- Add: [NoAI] GetURL() as possible function to info.nut. If AIs implement it, that url is shown when the AI crashes and also in the AI selection window [FS#2808] (r16093)
|
||||
@@ -244,7 +134,7 @@
|
||||
- Fix: Road was removed when both the Remove button was active and Ctrl was pressed [FS#2582] (r16119)
|
||||
- Fix: [NoAI] Make sure AIOrder::GetDestination always returns a tile belonging to the station (16109)
|
||||
- Fix: [NoAI] When giving an aircraft a goto-hangar order do not let it be a normal goto-station order (r16108)
|
||||
- Fix: [NoAI] AIOrder::SetOrderFlags always removed 'Service if needed' from goto-depot orders (r16106)
|
||||
- Fix: [NoAI] AIOrder::SetOrderFlags always removed "Service if needed" from goto-depot orders (r16106)
|
||||
- Fix: Connect tried to validate too much of the company ID with too little information on hand [FS#2849] (r16096)
|
||||
- Fix: [NoAI] AIDebug window profiled the blitters by invalidating itself unconditionally on repaint. On the other hand it was not invalidated in other cases when needed (r16094)
|
||||
- Fix: The language is called Slovak, not Slovakish (r16090)
|
||||
@@ -256,12 +146,12 @@
|
||||
- Fix: Do not warn that crashed vehicles are getting old; upgrading them is impossible [FS#2740] (r16048)
|
||||
- Fix: The currency abbreviation for the Romanian Leu is now RON [FS#774] (r16041)
|
||||
- Fix: Dash was not able to run iconv detection (r16035)
|
||||
- Fix: [NewGRF] Do not give '... Mines' as name to the station of oil rigs, or more general: do not add '... Mines' when the all of the cargoes are part of the liquid, passenger or mail classes [FS#2785] (r16029)
|
||||
- Fix: Storing/loading some currencies failed due to inconsistent settings 'tables' [FS#2826] (r16028)
|
||||
- Fix: [NewGRF] Do not give "... Mines" as name to the station of oil rigs, or more general: do not add "... Mines" when the all of the cargoes are part of the liquid, passenger or mail classes [FS#2785] (r16029)
|
||||
- Fix: Storing/loading some currencies failed due to inconsistent settings "tables" [FS#2826] (r16028)
|
||||
- Fix: Usage of uninitialised memory when trying to build a random new industry, but there are no industrytypes to choose from (i.e. all appearance probabilities are zero) (r16027)
|
||||
- Fix: 'Build separate station' in the station picker would reuse deleted stations [FS#2818] (r16025)
|
||||
- Fix: "Build separate station" in the station picker would reuse deleted stations [FS#2818] (r16025)
|
||||
- Fix: 32 bpp sprites in tars would also be shown in the list of heightmaps [FS#2817] (r16023)
|
||||
- Fix: Sometimes the unregister 'query' thread could be delayed so much that the network stuff was already closed and the packet would never reach the master server causing the server to appear online longer than necessary (r16022)
|
||||
- Fix: Sometimes the unregister "query" thread could be delayed so much that the network stuff was already closed and the packet would never reach the master server causing the server to appear online longer than necessary (r16022)
|
||||
- Fix: Chance16() did not work for b = 1. Also transform the formula to not use divisions (r16006)
|
||||
- Fix: Inconsistency between using NETWORK_NAME_LENGTH and NETWORK_CLIENT_NAME_LENGTH for the length of client names (r15988)
|
||||
- Fix: [NewGRF] Abort production callback after 0x10000 iterations and show a messagebox blaming the NewGRF [FS#2787] (r15958)
|
||||
@@ -318,7 +208,7 @@
|
||||
- Fix: Blame NewGRFs returning inconsistent information in purchase-list/after building before users have a chance to blame OpenTTD for incorrectly autorenewing/-replacing [FS#2595] (r15701)
|
||||
- Fix: Just sell the old engines after autorenew/replace. Do not bother about trains exceeding the trainlimit, which will be sold anyway [FS#2721] (r15692)
|
||||
- Fix: Do not crash when the generate map does not contain a suitable location for a town [FS#2720] (r15689)
|
||||
- Fix: Do not crash when someone substitutes the 'map generation' sprites with garbage [FS#2720] (r15685)
|
||||
- Fix: Do not crash when someone substitutes the "map generation" sprites with garbage [FS#2720] (r15685)
|
||||
- Fix: Vehicle images would be determined during the process of moving the vehicle which means that only the (orientation) data for the vehicles in front of it is valid. Now the data for the vehicles behind the vehicle are valid too [FS#2546] (r15677)
|
||||
- Fix: It was possible to remove rail tunnels/bridges and aqueducts build by rival companies [FS#2718] (r15667)
|
||||
- Fix: Sorting of engines in the purchase list did not use the same numbers as the GUI showed, e.g. articulated parts were not taken into accound when ordering by capacity [FS#2689] (r15666)
|
||||
@@ -422,7 +312,7 @@
|
||||
- Feature: [NewGRF] Add Variational Action 2 Variable 0x47 for houses, Coordinates of the house tile (r14294)
|
||||
- Feature: Allow overriding the palette of the base GRFs. This way you can play with NewGRFs made for the Windows palette with the DOS palettes base GRFs (and vice versa). Note that for this to work correctly ALL NewGRFs must use the same palette; mix and match is not yet supported (r14229)
|
||||
- Feature: Double click to join selected server/company (r14209)
|
||||
- Feature: Allow both the German as well as non-German toyland graphics as 'correct' and official graphics (r14197)
|
||||
- Feature: Allow both the German as well as non-German toyland graphics as "correct" and official graphics (r14197)
|
||||
- Feature: Allow people to create their own base graphics easily and without requiring code changes (r14197)
|
||||
- Feature: [NewGRF]: Add support for property 0x13 for Bridges. In other words, one can now specifies a 16 bits cost multiplier (r14172)
|
||||
- Feature: Make it possible to choose between the DOS and Windows graphics packs while retaining the possibility to override the palette (r14151)
|
||||
@@ -449,8 +339,8 @@
|
||||
- Feature: Conditional 'skip/jump' orders (r12667)
|
||||
- Feature: Ability to send a vehicle (using default orders) to the nearest depot (r12661)
|
||||
- Feature: Ability to force a vehicle to not load or to not unload at a station (r12650)
|
||||
- Feature: Four different non-stop types, individually selectable per order. Replaces 'TTDP compatible order' setting (r12648)
|
||||
- Feature: Three different load type in a single game instead of two. One can choose full load all and full load any instead of full load being governed by the 'full load any' patch setting (r12648)
|
||||
- Feature: Four different non-stop types, individually selectable per order. Replaces "TTDP compatible order" setting (r12648)
|
||||
- Feature: Three different load type in a single game instead of two. One can choose full load all and full load any instead of full load being governed by the "full load any" patch setting (r12648)
|
||||
- Feature: Financial and Player Selection Face windows are now remembering their position when toggling sizes (r12634)
|
||||
- Feature: Show what cargos a station could be supplied with (r12596)
|
||||
- Feature: [NewGRF] Add random action 2 type 84. For vehicles only (r12452)
|
||||
@@ -460,7 +350,7 @@
|
||||
- Feature: On Screen Keyboard for input fields so someone without a keyboard can enter text too [FS#1846] (r12425)
|
||||
- Change: When checking for unique names, compare only with manually set names [FS#1923] (r14958)
|
||||
- Change: Apply the 'warn if train's income is negative' setting to other vehicle types, too (r14835)
|
||||
- Change: When loading games in 'network' mode use the start date of the save game for the server and all clients when loading the NewGRFs instead of the current date. Prevents desyncs caused by action 7/9s skipping parts of the GRF based on the date or some other variables that can differ at NewGRF load time (r14769)
|
||||
- Change: When loading games in "network" mode use the start date of the save game for the server and all clients when loading the NewGRFs instead of the current date. Prevents desyncs caused by action 7/9s skipping parts of the GRF based on the date or some other variables that can differ at NewGRF load time (r14769)
|
||||
- Change: Only say a engine/vehicle is refittable when it can be refitted to at least two cargo type or when it has subcargos (r14683)
|
||||
- Change: [NewGRF] Since our NewGRF handling is better than it used to be, disable a NewGRF if unexpected sprites are reached (r14184)
|
||||
- Fix: A town could build a statue under a bridge [FS#2618] (r15397)
|
||||
@@ -482,13 +372,13 @@
|
||||
- Fix: [NewGRF] Building new station parts did not allocate a new station spec effectively breaking variable 41. This was due to the limited number of station specs that we can have per station. This fix makes newly build station parts create a new spec until one cannot allocate new station specs anymore and it'll revert to the old behaviour (sharing station specs) [FS#1832] (r14956)
|
||||
- Fix: [NewGRF] Station specs did not get deallocated when building a new station part over them (r14955)
|
||||
- Fix: Sharing/cloning/inserting of orders that the/a vehicle (in the shared list) cannot go to (wrong station type etc) [FS#1890] (r14954)
|
||||
- Fix: The 'animation state' of the bubbles was stored in a variable that was not stored in the savegame. Using a variable that gets saved in the savegame solves the desync and makes it a bit clearer [FS#2512] (r14931)
|
||||
- Fix: The "animation state" of the bubbles was stored in a variable that was not stored in the savegame. Using a variable that gets saved in the savegame solves the desync and makes it a bit clearer [FS#2512] (r14931)
|
||||
- Fix: Abort dragging of vehicles in the group window when they are deleted [FS#2500] (r14925)
|
||||
- Fix: Do not unnecessarily reset the cursor, when a different vehicle is dragged (r14924)
|
||||
- Fix: [NewGRF] First create all articulated parts of roadvehicles, then call callback 36 capacity, also call it for all articulated parts (r14903)
|
||||
- Fix: Overflow of number of orders per vehicle [FS#2495] (r14830)
|
||||
- Fix: Off-by-one causing possible out-of-bounds reads (r14811)
|
||||
- Fix: In an MP game in SP mode no company would go bankrupt. Furthermore companies that passed the 'bankrupt' period (4 quarters) would not go bankrupt when loading the game back in MP. Now any company that is in MP or not 'currently controlled by the player' in SP will bankrupt [FS#1993] (r14750)
|
||||
- Fix: In an MP game in SP mode no company would go bankrupt. Furthermore companies that passed the "bankrupt" period (4 quarters) would not go bankrupt when loading the game back in MP. Now any company that is in MP or not "currently controlled by the player" in SP will bankrupt [FS#1993] (r14750)
|
||||
- Fix: Do not let any disaster vehicle (Helicopter or Airplane) target invalid industry (r14746)
|
||||
- Fix: Memory leak in Action 0x0F (new town names) (r14737)
|
||||
- Fix: Writing a single char to the config file caused reading outside a buffer (r14729)
|
||||
@@ -538,11 +428,11 @@
|
||||
- Fix: [Win32] Some keypress combinations could be handled twice [FS#2206] (r14363)
|
||||
- Fix: The ownership of roadtiles was not properly set for very old savegames (including TTD's) making it impossible to remove some pieces of road [FS#2311] (r14359)
|
||||
- Fix: Desync due to randomly ordered vehicle hash by flooding and road vehicle overtake/following (r14356, r14258)
|
||||
- Fix: Signs were not updated on company bankruptcy/sell, and thus could have the colour of invalid player (r14348)
|
||||
- Fix: Signs were not updated on company bankrupcy/sell, and thus could have the colour of invalid player (r14348)
|
||||
- Fix: Delete the RenameSignWindow when 'its' sign is deleted (r14345)
|
||||
- Fix: Signs from old savegames were lost (causing little memory leaks) (r14340)
|
||||
- Fix: When a company was renamed and then manager was renamed before building anything, company name changed (r14328)
|
||||
- Fix: When you rename a town before building something and build something near that town your company would be called '<old townname> Transport' [FS#2251] (r14327)
|
||||
- Fix: When you rename a town before building something and build something near that town your company would be called "<old townname> Transport" [FS#2251] (r14327)
|
||||
- Fix: Free any blocks that a helicopter may have on an oilrig when the helicopter gets forcefully removed (bankruptcy). For other airports this is not needed as they cannot be used by multiple companies [FS#2241] (r14324)
|
||||
- Fix: Possible assert when renaming removed waypoint (r14322)
|
||||
- Fix: Properly delete orders so the pool does not fill up (r14319)
|
||||
@@ -553,8 +443,8 @@
|
||||
- Fix: Default for sound effects and music volume should be in the valid range for that setting [FS#2286] (r14289)
|
||||
- Fix: Make small UFO aware of articulated RVs so they crash the complete vehicle instead of a small part of it (r14270)
|
||||
- Fix: Desyncs after deleting a waypoint because of explicit destructor call instead of using operator delete (r14265)
|
||||
- Fix: Merge keycode for 'normal' 0-9 keys and keypad 0-9 keys so people do not get confused that the keypad does not work as expected [FS#2277] (r14260)
|
||||
- Fix: Clicking on the smallmap did not break the 'follow vehicle in main viewport' [FS#2269] (r14243)
|
||||
- Fix: Merge keycode for "normal" 0-9 keys and keypad 0-9 keys so people do not get confused that the keypad does not work as expected [FS#2277] (r14260)
|
||||
- Fix: Clicking on the smallmap did not break the "follow vehicle in main viewport" [FS#2269] (r14243)
|
||||
- Fix: The engine-purchase-list-sorter doubled running-cost and halfed capacity of double-headed engines [FS#2267] (r14239)
|
||||
- Fix: Feeder share was computed wrong when splitting cargo packet (r14234)
|
||||
- Fix: Signs (town name, station name, ...) could be too long for 8bit width in pixels (r14221)
|
||||
@@ -577,7 +467,7 @@
|
||||
- Fix: Flawed parsing of words (as in 2 bytes) in GRF strings due to sign extension [FS#2228] (r14087)
|
||||
- Fix: Division by 0 in NewAI [FS#2226] (r14062)
|
||||
- Fix: NewGRF callback 23 did not use the NewGRF compatible text stack [FS#2224] (r14058)
|
||||
- Fix: NewGRF text stack's 'push word' did not move the data around properly (r14057)
|
||||
- Fix: NewGRF text stack's "push word" did not move the data around properly (r14057)
|
||||
- Fix: Long strings in the edit box would cause OpenTTD to stop drawing the string. This is especially noticable with low resolutions and the chat input box (r14054)
|
||||
- Fix: [OSX] changed the condition for selecting 8 or 32 bpp blitter by default. Now we will pick 32 bpp if no 8 bpp fullscreen resolutions are available on the main display (the one with the dock) (r14032)
|
||||
- Fix: Crash when the AI tries to find the depot of an airport that does not have a depot [FS#2190] (r13999)
|
||||
@@ -609,7 +499,7 @@
|
||||
- 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: 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)
|
||||
@@ -646,7 +536,7 @@
|
||||
- Fix: Clear the memory for the new AI during the loading of a savegame so it does not try to execute commands generated in a different savegame, which could be resulting in the AI trying to give orders to stations that do not exist (r13505)
|
||||
- Fix: Drawing of zoomed out partial sprites could cause deadlocks or crashes (r13502)
|
||||
- Fix: First determine where to *exactly* build a house before asking a NewGRF whether the location is good instead of possibly moving the house a tile after the NewGRF said the location is good (r13489)
|
||||
- Fix: Track was not removed on company bankrupcty when there was a ship on lower halftile (r13488)
|
||||
- Fix: Track was not removed on company bankrupcy when there was a ship on lower halftile (r13488)
|
||||
- Fix: Let ships also navigate on half-tile sloped watery rail tiles (r13485)
|
||||
- Fix: Division by zero when one would press 'd' (skip order) when there's no order (r13409)
|
||||
- Fix: Do not crash when resolving vehicle sprite groups with zero sprites (r13397)
|
||||
@@ -730,7 +620,7 @@
|
||||
|
||||
0.6.0-RC1 (2008-03-26)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Show whether a town is a 'city' in the town description title bar (r12391)
|
||||
- Feature: Show whether a town is a "city" in the town description title bar (r12391)
|
||||
- Feature: Increase house animation frame number from 32 to 128 (r12347)
|
||||
- Fix: Loading of TTD savegames (r12399, r12401)
|
||||
- Fix: Vehicle lists related to stations not closed when the station is deleted [FS#1872] (r12393)
|
||||
@@ -789,7 +679,7 @@
|
||||
- Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, show running cost of wagons if available (r12209)
|
||||
- Fix: When loading a savegame fails, do not start creating a new game, just go straight back to the intro screen (r12202)
|
||||
- Fix: Force AI to build rail or road instead of bridges if possible, so it does not build bridges everywhere (r12200)
|
||||
- Fix: 'Transparent buildings' now only toggles buildings, so show tick when buildings are transparent [FS#1789] (r12198)
|
||||
- Fix: "Transparent buildings" now only toggles buildings, so show tick when buildings are transparent [FS#1789] (r12198)
|
||||
- Fix: Show correct last year profit when the train had negative income [FS#1788] (r12197)
|
||||
- Fix: There can be oil rigs at map borders, do not set water class for them [FS#1787] (r12195)
|
||||
- Fix: Do not start overtaking if the RV reaches wrong-way one-way-road in the next tiles (r12191)
|
||||
@@ -994,7 +884,7 @@
|
||||
- Fix: Aircraft sometimes stopped mid-air when the airport got destroyed [FS#1503] (r11562)
|
||||
- Fix: Group list was not updated when removing the last group [FS#1504] (r11561)
|
||||
- Fix: Overflow when drawing graphics with high company values [FS#1505] (r11558)
|
||||
- Fix: If ever the air/heliport is suddenly not available while the 'chopper' is descending, just go back into flying instead of stopping mid air [FS#1496] (r11546)
|
||||
- Fix: If ever the air/heliport is suddenly not available while the "chopper" is descending, just go back into flying instead of stopping mid air [FS#1496] (r11546)
|
||||
- Fix: Cargo translation was sometimes done when it should not be done [FS#1501] (r11544)
|
||||
- Fix: [OSX] Detect statvfs at runtime (based on OSX version) instead of compile time. This should prevent a crash on OSX 10.3 with the precompiled binaries (in the load/save windows) (r11541)
|
||||
- Fix: [OSX] Do not try to compile the quartz video driver on OSX 10.3 as it will fail (r11540)
|
||||
@@ -1024,7 +914,7 @@
|
||||
- Feature: Control-Clicking the Centre Main View button on the vehicle window allows the main viewport to follow the chosen vehicle (r11304)
|
||||
- Feature: User customisable faces (r11269)
|
||||
- Feature: Make more advanced rail types more expensive to build (r11265)
|
||||
- Feature: Implement the 'moreanimation' feature of TTDP, so we can properly support newindustries (r11228)
|
||||
- Feature: Implement the "moreanimation" feature of TTDP, so we can properly support newindustries (r11228)
|
||||
- Feature: [NewGRF] Add support for newindustries (r11204)
|
||||
- Feature: Sort the NewGRFs by name, making searching a specific NewGRF a lot easier (r11175)
|
||||
- Feature: Add possibility to show the bounding boxes of sprites using CTRL-B so one can get a better understanding of the used bounding boxes to fix the glitches that still exist. Note that showing the bounding boxes is not glitch free; it only gives you some knowledge where the bounding boxes are (r11174)
|
||||
@@ -1038,14 +928,14 @@
|
||||
- Feature: [OSX] OpenTTD will now pick the same language as finder is set to if no config file is found (r10851)
|
||||
- Feature: Provide an infrastructure to have resizable windows that are smaller than the default window size. Useful for playing on very low resolution systems (r10704)
|
||||
- Feature: Support for autosave_on_exit in the console, so dedicated servers can use it (r10658)
|
||||
- Feature: Add a soft limit of 4096 'entities' in a station's waiting queue and a hard limit of 32768 so (malicious) people cannot cause a 'denial of service' attack by filling cargo lists (r10555)
|
||||
- Feature: Add a soft limit of 4096 "entities" in a station's waiting queue and a hard limit of 32768 so (malicious) people cannot cause a "denial of service" attack by filling cargo lists (r10555)
|
||||
- Feature: Replace all the windows for Industry building by a more flexible one (r10496)
|
||||
- Feature: Support for 'prospecting' raw industries, i.e. you pay an amount of money and then it might (with a given chance) build a raw industry somewhere on the map (r10451)
|
||||
- Feature: Support for "prospecting" raw industries, i.e. you pay an amount of money and then it might (with a given chance) build a raw industry somewhere on the map (r10451)
|
||||
- Feature: Automatic signal completion, enabled by pressing CTRL when dragging signals. Signals will continue following track until an existing signal, junction or station are reached. This currently replaces the existing use of CTRL-drag for changing existing signal type (r10437)
|
||||
- Feature: New sign editor features including switching to previous/next sign (r10401)
|
||||
- Feature: Disallow (in the GUI) the building of infrastructure you do not have available vehicles for. This means that the airport building button is disabled till you can actually build aircraft. The game itself will not disallow you to build the infrastructure and this 'new' behaviour can be overridden with a patch setting [FS#669] (r10353)
|
||||
- Feature: Disallow (in the GUI) the building of infrastructure you do not have available vehicles for. This means that the airport building button is disabled till you can actually build aircraft. The game itself will not disallow you to build the infrastructure and this "new" behaviour can be overridden with a patch setting [FS#669] (r10353)
|
||||
- Feature: Add the possibility of automatically filling in timetables based on the times from the first (or subsequent) run-throughs (r10331)
|
||||
- Feature: Option to select the 'default' rail type when you start a new game or load a game. This is done either static, i.e. rail, electrified rail, monorail and maglev, or dynamic which takes either the first or last available railtype or the railtype that is used most on the map [FS#812] (r10329)
|
||||
- Feature: Option to select the "default" rail type when you start a new game or load a game. This is done either static, i.e. rail, electrified rail, monorail and maglev, or dynamic which takes either the first or last available railtype or the railtype that is used most on the map [FS#812] (r10329)
|
||||
- Feature: Give a better explanation why the loading of a savegame failed and do not crash on loading savegames that were altered by patches or branches [FS#917] (r10300)
|
||||
- Feature: A sticky button for the client list window [FS#885] (r10293)
|
||||
- Feature: Allow double-clicking on certain places: add NewGRF window, build-vehicle and town-action (r10265, r10267)
|
||||
@@ -1058,7 +948,7 @@
|
||||
- Feature: Add support for articulated road vehicles (r10097)
|
||||
- Feature: Allow moving of orders instead of removing them and readding them somewhere else [FS#828] (r10071)
|
||||
- Feature: Replace hard coded spritecache size with a configuration option, sprite_cache_size. The default size is 2MB and the value can range from 1 to 64MB. If you experience slow-downs when scrolling the map, try increasing this setting (r10042)
|
||||
- Feature: Skip to the selected order in the order list when clicking on the 'skip' button while pressing CTRL [FS#760] (r10033)
|
||||
- Feature: Skip to the selected order in the order list when clicking on the "skip" button while pressing CTRL [FS#760] (r10033)
|
||||
- Feature: Sort the strings in server language dropdown and the town names dropdown (r10032, r10036)
|
||||
- Feature: Build windows of trains, road vehicles and ships can now be sorted by cargo capacity (planes already had this option) (r10024)
|
||||
- Feature: More languages flags for servers [FS#790] (r10017)
|
||||
@@ -1070,9 +960,9 @@
|
||||
- Feature: Allow building new stations adjacent to existing stations by holding down control (r9905)
|
||||
- Feature: Add one new zoom-out level: 8 times (r9884)
|
||||
- Feature: Advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group (r9874)
|
||||
- Feature: Make 'improved loading' a proper improved loading instead of loading one (semi-)random vehicle at a time. Furthermore fill multiple vehicles at once when there is enough cargo to do so (r9838)
|
||||
- Feature: Make "improved loading" a proper improved loading instead of loading one (semi-)random vehicle at a time. Furthermore fill multiple vehicles at once when there is enough cargo to do so (r9838)
|
||||
- Feature: Add drag and drop removal of station tiles (r9810)
|
||||
- Feature: Support for 'curvature info', Action 2 for train, variable 45 (r9803)
|
||||
- Feature: Support for "curvature info", Action 2 for train, variable 45 (r9803)
|
||||
- Feature: [NewGRF] Add action 1, 2 and 3 support for canals (r9797)
|
||||
- Feature: Add the possibility to choose different road patterns for towns to use (r9779)
|
||||
- Feature: Add an option to automatically pause when starting a new game (r9734)
|
||||
@@ -1142,11 +1032,11 @@
|
||||
- Fix: Crash when having the Finance window opened of the player you are cheating to [FS#1177] (r11028)
|
||||
- Fix: Switching players (using the cheat) crashed on Big Endian machines [FS#1150] (r11023)
|
||||
- Fix: The canal border determination did not take oil rigs into consideration (r11022)
|
||||
- Fix: Do not display income/expenses when they do not belong to a 'valid' tile, like the money cheat/giving money [FS#1175] (r11021)
|
||||
- Fix: Do not display income/expenses when they do not belong to a "valid" tile, like the money cheat/giving money [FS#1175] (r11021)
|
||||
- Fix: One could not give money when (s)he had too much money or rather: when casting the amount of money to an int32 becomes negative [FS#1174] (r11020)
|
||||
- Fix: When determining the gender of a string, do not assume that the gender is in the front of the string when there can be case switching code at that location [FS#1104] (r10792)
|
||||
- Fix: Determining whether there is a tunnel going under the lowered area is only needed in two directions instead of all four, so take the directions (one for each axis) to the nearest border (along the given axis) [FS#1058] (r10686)
|
||||
- Fix: Graphical glitches when the 'link landscape toolbar' patch is turned on when opening one of the construction toolbars [FS#1076] (r10685)
|
||||
- Fix: Graphical glitches when the "link landscape toolbar" patch is turned on when opening one of the construction toolbars [FS#1076] (r10685)
|
||||
- Fix: Trolly AI did not know about steep slopes, and used wrong tileh in some cases [FS#1070] (r10655)
|
||||
- Fix: Be consistent with the space between the company name and the player number, i.e. always put a space between them [FS#1052] (r10627)
|
||||
- Fix: [YAPF] Ships received curve penalty for non-diagonal straight move (r10578)
|
||||
@@ -1203,7 +1093,7 @@
|
||||
- Fix: [Windows] MIDI does not stop when closing openttd [FS#1164] (r11029)
|
||||
- Fix: Do not unconditionally assume that a tile has a depot (r11027)
|
||||
- Fix: Give a more correct error when building some things on tile 0 [FS#1173] (r11024)
|
||||
- Fix: Do not display income/expenses when they do not belong to a 'valid' tile, like the money cheat and giving money [FS#1175] (r11021)
|
||||
- Fix: Do not display income/expenses when they do not belong to a "valid" tile, like the money cheat and giving money [FS#1175] (r11021)
|
||||
- Fix: One could not give money when (s)he had too much money [FS#1174] (r11020)
|
||||
- Fix: Disallow buying/selling shares in your own company or a bankrupt company [FS#1169] (r11018)
|
||||
- Fix: Crash when quiting the game in one of the end score windows [FS#1218] (r11071)
|
||||
@@ -1217,7 +1107,7 @@
|
||||
- Fix: Removing road with the road removal tool would also work with a negative bank account, making the bank account even more negative than it was [FS#1125] (r10890)
|
||||
- Fix: Some isocodes were wrong, resulting in some NewGRF not working properly for the affected languages (r10877)
|
||||
- Fix: [Windows] Do not try to minimise or restore the window when closing OpenTTD [FS#998] (r10835)
|
||||
- Fix: Trains going over bridges would get the 'going down hill' accelerate bonus, which causes trains to go faster on bridges than they would be going on level land [FS#1096] (r10739)
|
||||
- Fix: Trains going over bridges would get the "going down hill" accelerate bonus, which causes trains to go faster on bridges than they would be going on level land [FS#1096] (r10739)
|
||||
- Fix: Trains being split into two pieces when loading an old savegame [FS#1062] (r10735)
|
||||
- Fix: [OS/2] Fix chdir problem with open/save dialog (r10650)
|
||||
- Fix: One could not remove locks that were build in a (very) old version of OpenTTD [FS#1038] (r10593)
|
||||
@@ -1243,11 +1133,11 @@
|
||||
- Fix: Acceleration for trains on slopes is not calculated properly [FS#786] (r10344, r10317)
|
||||
- Fix: The 'old' pathfinders (OPF and NPF) for road vehicles could not find a path when in a tunnel [FS#290] (r10345)
|
||||
- Fix: Only add the autoreplace menu when autoreplace actually knows about the group [FS#880] (r10337)
|
||||
- Fix: Signal state sometimes not properly set when the signal 'pathfinder' reached the end of a line [FS#910] (r10336)
|
||||
- Fix: Signal state sometimes not properly set when the signal "pathfinder" reached the end of a line [FS#910] (r10336)
|
||||
- Fix: News messages were shown over the endgame/highscore windows [FS#943] (r10333)
|
||||
- Fix: Rail could be destroyed when building tunnels (r10306)
|
||||
- Fix: Flush the output of the dedicated server console (r10295)
|
||||
- Fix: The 'pause' key did not work in the scenario editor (r10294)
|
||||
- Fix: The "pause" key did not work in the scenario editor (r10294)
|
||||
- Fix: Age non-front engines too (so when you move engines around in the depot they do not get age 0 when they are much older [FS#202] (r10288)
|
||||
- Fix: Do not make everyone spectator if 1 joining client failed to create new company (r10284)
|
||||
- Fix: Remove invalid characters (for the file system) from savegame names [FS#916, FS#850] (r10272, r10116)
|
||||
@@ -1255,7 +1145,7 @@
|
||||
- Fix: Do not look in every direction for tunnels when building one, one direction is enough (r10258)
|
||||
- Fix: [Windows] Do not mess desktop when using ALT-TAB [FS#876] (r10251, r10186)
|
||||
- Fix: Take the age of the front vehicle for station rating (r10246)
|
||||
- Fix: Terraforming wipes out canals. Now you always have to remove the canal before terraforming, instead of 'just' removing the canal [FS#594] (r10240)
|
||||
- Fix: Terraforming wipes out canals. Now you always have to remove the canal before terraforming, instead of "just" removing the canal [FS#594] (r10240)
|
||||
- Fix: Only 2 trains could crash at one time as collision checking stopped on the first hit. This could technically cause desyncs in network games as the collision hash order is not guaranteed [FS#892] (r10222)
|
||||
- Fix: Land under foundations was terraform when it should not be terraformed [FS#882, FS#890] (r10219)
|
||||
- Fix: Do not make a 270 degree turn on the international airport when a 90 degree turn is enough (r10187)
|
||||
@@ -1268,9 +1158,9 @@
|
||||
- Fix: When you got a sufficiently small resolution, there is a possibility for a division by zero when a sound is played (r10138)
|
||||
- Fix: When removing a dock, a ship will always try to reach the old location of the dock even when it cannot anymore because it the old location of the dock is now land instead of water [FS#810] (r10131)
|
||||
- Fix: SetCurrentGrfLangID returned the wrong language ids for most languages (r10130)
|
||||
- Fix: Some NewGRFs use the same (unused in the 'current' climate) sprite IDs. Normally this gives some artefacts, but when one NewGRF expects it to be a sprite and another NewGRF overwrites it with a non-sprite nasty things happen (drawing a non-sprite crashes OTTD) [FS#838] (r10109)
|
||||
- Fix: Multiple subsequent 'give money' actions could result in duplicate messages that money has been transfered when it only happened once, or tell you paid money when you did not [FS#834, FS#839] (r10087, r10085)
|
||||
- Fix: 'Deactivate Electrified Railways' did not work [FS#836] (10083)
|
||||
- Fix: Some NewGRFs use the same (unused in the "current" climate) sprite IDs. Normally this gives some artefacts, but when one NewGRF expects it to be a sprite and another NewGRF overwrites it with a non-sprite nasty things happen (drawing a non-sprite crashes OTTD) [FS#838] (r10109)
|
||||
- Fix: Multiple subsequent "give money" actions could result in duplicate messages that money has been transfered when it only happened once, or tell you paid money when you did not [FS#834, FS#839] (r10087, r10085)
|
||||
- Fix: "Deactivate Electrified Railways" did not work [FS#836] (10083)
|
||||
- Fix: Memory leaks in the networking code [FS#846, FS#844] (r10082, r10075)
|
||||
- Fix: Coverage area highlight was still show when it was turned off for docks [FS#835] (r10068)
|
||||
- Fix: Do not use override engine type for articulated wagon parts (r10048)
|
||||
@@ -1298,7 +1188,7 @@
|
||||
- Fix: Remove arbitrary limit on length of NewGRF strings (r9775)
|
||||
- Fix: [NewGRF] Ignore axis-bit of station tile layouts [FS#756] (r9758)
|
||||
- Fix: [win32] Dead key and open/close console (r9728)
|
||||
- Fix: When you have closed the 'Load game'/'New game' windows which you started from the 'start server' menu, you should not start a server when starting a new game [SF#1244842] (r9757)
|
||||
- Fix: When you have closed the "Load game"/"New game" windows which you started from the "start server" menu, you should not start a server when starting a new game [SF#1244842] (r9757)
|
||||
- Fix: Trains were lost after autorenewal/autoreplace [FS#732] (r9753)
|
||||
- Fix: Stop flooded towns from building roads on water [FS#598] (r9743)
|
||||
- Fix: Station signs were not resized when the language changed [FS#672] (r9741)
|
||||
@@ -1318,7 +1208,7 @@
|
||||
0.5.1-RC3 (2007-04-17)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Add list_patches to console commands; shows all patches and values (r9565)
|
||||
- Fix: Select 'Custom' in the difficulty settings gui when changing a setting [FS#733] (r9647)
|
||||
- Fix: Select "Custom" in the difficulty settings gui when changing a setting [FS#733] (r9647)
|
||||
- Fix: Building rail on steep slopes ignored build_on_slopes patch setting (r9602)
|
||||
- Fix: Wrong characters in Finnish town names (r9641)
|
||||
- Fix: When checking for no vehicle on ground-tiles, do not take into account vehicles that are in the air (r9542)
|
||||
@@ -1351,7 +1241,7 @@
|
||||
- Fix: Shared orders got messed up when the 'first' trains got removed in the depot [FS#685] (r9277)
|
||||
- Fix: Use a less CPU-intensive algorithm to find a random industry for the AI to prevent it slowing down the game [FS#644] (r9251)
|
||||
- Fix: When loading games, enroute_from was updated in the wrong place, causing issues with TTD savegames/scenarios (r9147)
|
||||
- Fix: 'Train is lost' message is generated incorrectly [FS#676] (r9146)
|
||||
- Fix: "Train is lost" message is generated incorrectly [FS#676] (r9146)
|
||||
- Fix: Difficulty level button was not selected when opening the difficulty window (r9117)
|
||||
- Fix: The wrong catenary wires were drawn for tunnel entrances [FS#612] (r9077)
|
||||
- Fix: The intercontinental airport used 'T-junction' runway sprites when there is no exit in the middle of the runway as in the city airport [FS#529] (r9076)
|
||||
@@ -1363,7 +1253,7 @@
|
||||
- Fix: Desync caused by buffer overflow [FS#664] (r9027)
|
||||
- Fix: When cutting strings into multiple lines also take into consideration whitespace characters of more than 1 byte length (r9012)
|
||||
- Fix: Play the correct engine sound based on the engine type instead of the sprite (r9009)
|
||||
- Fix: New locomotive names were not announced in the news, it said 'new railway locomotive available - railway locomotive' [FS#581] (r9000, r9001)
|
||||
- Fix: New locomotive names were not announced in the news, it said "new railway locomotive available - railway locomotive" [FS#581] (r9000, r9001)
|
||||
- Fix: [NewGRF] Do not select a disabled platform length/number of track count when going out of drag-drop mode [FS#450] (r8999)
|
||||
- Fix: [win] Resolution doubled in cfg file when fullscreen mode used [FS#642] (r8994)
|
||||
- Fix: The industry list should also be (re)set when the number of industries is 0 [FS#656] (r8980)
|
||||
@@ -1376,7 +1266,7 @@
|
||||
0.5.0 (2007-02-27)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Add the ability to load newer TTDP games (the tile information for coasts has changed) (r8738)
|
||||
- Feature: Selecting 'end of orders' and deleting will delete all the vehicle's orders (shared mode unchanged) (r8685)
|
||||
- Feature: Selecting "end of orders" and deleting will delete all the vehicle's orders (shared mode unchanged) (r8685)
|
||||
- Codechange: Call GetFirstVehicleInChain only for trains thus increasing performance in large games (r8744)
|
||||
- Fix: Possible crashes, problems with aircraft and airport removal (r8921)
|
||||
- Fix: Do not show the 'edit sign' window for spectators (r8808)
|
||||
@@ -1416,7 +1306,7 @@
|
||||
- Fix: Network client crashes when a server sends a 0-sized savegame [FS#556] (r8167)
|
||||
- Fix: Several desync fixes (incorrect roadstop update of old games, autoreplace bugs) [FS#551] (r8137, r8147, r8157)
|
||||
- Fix: Some disaster-events fixed: combat chopper shoots from right position, submarine once again moves around (r8140, r8158)
|
||||
- Fix: 'out of sprite memory' warning messages due to incorrect assumption of requested memory for sprites (r8133)
|
||||
- Fix: "out of sprite memory" warning messages due to incorrect assumption of requested memory for sprites (r8133)
|
||||
- Fix: Bouys are now built and numbered 1..9 not 9..1 [FS#538] (r8123)
|
||||
- Fix: Clicking for more news properly cycles through the news history backwards, and does not show the first item doubly if it's already open (r8049)
|
||||
- Fix: Crash when removing a town in the scenario editor while the query window is open for one of the town's tiles (r8030)
|
||||
@@ -1472,7 +1362,7 @@
|
||||
- Feature: Increase the chatbuffer of chat messages, messages longer than the graphical box will be wrapped to a new line (r6956)
|
||||
- Feature: Allow typing longer text than visible for an editbox; it will scroll properly now (r6954)
|
||||
- Feature: Allow spectators to team-speak to eachother (r6933)
|
||||
- Feature: Allow for ' to be in console tokens. Escape them with \. eg \' (r6875)
|
||||
- Feature: Allow for " to be in console tokens. Escape them with \. eg \" (r6875)
|
||||
- Feature: Change the functionality of the chat window. SHIFT+ENTER (SHIFT+T) sends a message to all players, CTRL+ENTER (CTRL+T) sends a message to all team mates and ENTER (T) is customizable (r6824)
|
||||
- Feature: (Train is) lost message is now generated immediately when pathfinder cannot find the path (r6800)
|
||||
- Feature: Add a measurement tool that will show dimensions and height differences of various draggable tools (r6758)
|
||||
@@ -1485,7 +1375,7 @@
|
||||
- Feature: Depot and vehicle list windows reworked a bit with more buttons to include 'Autoreplace all' (instantly), 'Sell all', 'Start all' and 'Stop all' (r6542, r6552, r6515)
|
||||
- Feature: Using goto depot with a different control selection will now alter the service/stopping in depot flag instead of cancelling the goto depot order (r6295)
|
||||
- Feature: When automatically detecting the language try to first match language+territory (e.g. de_CH), then just language (e.g. de) and fall back to en_GB otherwise (r6290)
|
||||
- Feature: Add a 'goto depot' button to various vehicle list windows (r6229, r6246)
|
||||
- Feature: Add a "goto depot" button to various vehicle list windows (r6229, r6246)
|
||||
- Feature: Save max_companies/clients/spectators in the config file (r6170)
|
||||
- Feature: Vehicle status bar will show the heading string in different colours to visually discern the difference between a service and a forced stop (r6165, r6414)
|
||||
- Feature: Control clicking Goto Depot will now make the vehicle service instead of stop in depot (r6165)
|
||||
@@ -1504,12 +1394,12 @@
|
||||
- Feature: Also allow horizontal and vertical rails on steep slopes (r5864)
|
||||
- Feature: Allow building of (certain) rails, roads and bridge ramps on steep sloped tiles (r5833)
|
||||
- Feature: Replacing from a train engine without cargo capacity to one with cargo capacity will now make autoreplace refit the engine to carry the cargo type from the last wagon in the train (r5465)
|
||||
- Feature: [OSX] Macs with touchpads that support two finger scrolling can now use this 'scrollwheel' to scroll up/down (r5460)
|
||||
- Feature: [OSX] Macs with touchpads that support two finger scrolling can now use this "scrollwheel" to scroll up/down (r5460)
|
||||
- Feature: Allow building canals at sea-level, using ctrl to toggle canal or plain water tile. This allows building of non-raisable sea-level water ways (useful in multiplayer) and dikes for low-level areas (r5403)
|
||||
- Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters (r5346)
|
||||
- Feature: Implement smooth horizontal depot and, vehicle list scrolling for trains (r5046)
|
||||
- Feature: Add new pathfinder, YAPF. Has greatly improved performance and better, fully configurable, pathfinding (yapf) (r4987)
|
||||
- Feature: Add a new console command 'players' that lists current players along with basic stats [FS#150] (r4828)
|
||||
- Feature: Add a new console command "players" that lists current players along with basic stats [FS#150] (r4828)
|
||||
- Feature: Station List View can now be sorted and filtered (by waiting cargo type and facilities) (r4822)
|
||||
- Feature: The integer-list parser now accepts a space character as an item seperator next to the comma for openttd.cfg (r4490)
|
||||
- Feature: Add support for electric railways as a seperate tracktype. Electric trains will not run on non-electrfied track unless otherwise controlled by patch option (elrails) (r4150)
|
||||
@@ -1539,7 +1429,7 @@
|
||||
- Codechange: Show more correct capacity of articulated wagons in the train purchase list (r6650)
|
||||
- Codechange: When showing tooltips, properly position the tooltip taking into account window dimensions and cursor (r6405)
|
||||
- Codechange: Speed up the animated cursors a bit so they move once in a while at least (r6367)
|
||||
- Codechange: Remove the 'unsorted' vehicle sorter, because it's plain useless (r6270)
|
||||
- Codechange: Remove the "unsorted" vehicle sorter, because it's plain useless (r6270)
|
||||
- Codechange: Remove MSVC6 support. The compiler was too stupid and too many workarounds were needed. Please switch to mingw or VC2005++ express (r5286)
|
||||
- Codechange: Allow a switch in Makefile.config to disable threads in OpenTTD (r5978)
|
||||
- Codechange: [win32] Add native x64 target to VS2005 project files (r5813)
|
||||
@@ -1551,7 +1441,7 @@
|
||||
- Codechange: Completely remove the deprecated -p parameter (is superseded by -n) (r3508)
|
||||
- Fix: Town ratings were not reset when a company went bankrupt (r7433)
|
||||
- Fix: With realistic acceleration, guarantee a minimum braking force is applied. This ensures trains will stop when going down hill (r7425)
|
||||
- Fix: Changed 'kick off' acceleration resulted in only a small amount of power being applied; this resulted in a perceived delay before trains moved (r7421)
|
||||
- Fix: Changed "kick off" acceleration resulted in only a small amount of power being applied; this resulted in a perceived delay before trains moved (r7421)
|
||||
- Fix: Long delay for message windows to appear. Immediately show a new message if present if no news window is open, or has just been closed instead of waiting for the timer of the current news to time out [FS#255] (r7402)
|
||||
- Fix: Deleting Train in depot with autoreplace fails [FS#418] (r7385)
|
||||
- Fix: Do not update vehicle images when turning a train around. During this procedure the train is split into parts which can result in incorrect images being used (r7378)
|
||||
@@ -1559,16 +1449,16 @@
|
||||
- Fix: Segmentation fault in the SDL video driver when one goes to fullscreen and there are no suitable resolutions (r7332)
|
||||
- Fix: When loading a game from a dedicated server the local player set to 0, theoretically enabling the dedicated server to also play (r7312)
|
||||
- Fix: TTDPatch vars are little endian (r7282)
|
||||
- Fix: Always display the excavation of roadworks even when fully zoomed out or 'full details' are off (r7240)
|
||||
- Fix: Always display the excavation of roadworks even when fully zoomed out or "full details" are off (r7240)
|
||||
- Fix: Window allocation and deletion messed with the actual window pointer, possibly crashing OpenTTD [FS#350, SF#1560913] (r7205)
|
||||
- Fix: Callback not executed for non-player based patch changes in multiplayer for all clients; possible desync issue (r7190)
|
||||
- Fix: Station sign (and base station coordinates) did not move along with station when station moved by walking [FS#388] (r7169)
|
||||
- Fix: MiniMap was misplacing vehicles sometimes [FS#402] (r7166)
|
||||
- Fix: Some mouse events possibly lost under high CPU load, handle mouse input right away instead of waiting for GameLoop [FS#221, SF1168820] (r7157)
|
||||
- Fix: Some keyboard events possibly lost under high CPU load, handle keyboard input in place instead of global variables magic [FS#279] (r7153)
|
||||
- Fix: 'Position of Main Toolbar' option is not honored when starting new game or loading saved [FS#172] (r7130)
|
||||
- Fix: "Position of Main Toolbar" option is not honored when starting new game or loading saved [FS#172] (r7130)
|
||||
- Fix: Synchronize the engine-renew settings of a player when joining a multiplayer game (r7126)
|
||||
- Fix: Several errors/glitches related to multiplayer and bankrupcty (mainly server), and non-updated company-information (r7125)
|
||||
- Fix: Several errors/glitches related to multiplayer and bankrupcy (mainly server), and non-updated company-information (r7125)
|
||||
- Fix: Cloning a vehicle that has been refitted would incur the expense as running costs, not new vehicles [FS#371] (r7115)
|
||||
- Fix: Do not let ships enter partial water tiles under bridges; they will travel up land... (r7110)
|
||||
- Fix: AI tried to build road from the back or side of road stop/depot (r7069)
|
||||
@@ -1639,7 +1529,7 @@
|
||||
- Fix: It was possible to dig into a tunnel if certain rail combinations were ontop of it
|
||||
- Fix: A HQ could only be flooded at its northern tile, the other 3 were immune to water
|
||||
- Fix: Fix several glitches concerning foundations. Houses, property (rail/road/bridge/etc.) and cursor are now aligned properly
|
||||
- Fix: Prohibit altering a road tile while road works are in progress. This fixes some glitches like 'turning' the excavation by adding/removing road bits or removing the road piece
|
||||
- Fix: Prohibit altering a road tile while road works are in progress. This fixes some glitches like "turning" the excavation by adding/removing road bits or removing the road piece
|
||||
- Fix: Only advertise the server to your external IP/network (eg not to 127.0.0.1) and use proper broadcast addresses
|
||||
- Fix: '-f' switch is not valid on windows, so do not show it in help
|
||||
- Fix: [Autoreplace] Autoreplaced trains can leave all wagons in depot under certain circumstances
|
||||
@@ -1652,7 +1542,7 @@
|
||||
- Fix: [AI] The trolly AI used information from the wrong industry when calculating the amount of to be transported goods
|
||||
- Fix: [NTP] Fix NTP over bridges: do not check the rail type when on a bridge
|
||||
- Fix: Truncate text in dropdown lists to stop text overflowing
|
||||
- Fix: 'Erroneous train reversal on waypoints'. When processing the next train order, do not even consider reversing the train if the last order was to a waypoint
|
||||
- Fix: "Erroneous train reversal on waypoints". When processing the next train order, do not even consider reversing the train if the last order was to a waypoint
|
||||
- Fix: Starting a new scenario did not adhere to local difficulty settings but took it from the scenario itself. That mode is for 'play scenario'
|
||||
- Fix: Vehicles on a sloped tile under a bridge were affected by the bridge speed limit
|
||||
- Fix: Issue with train pathfinding over level crossings
|
||||
@@ -1669,14 +1559,14 @@
|
||||
- Fix: Game no longer crashes when the last vehicle servicing a station has been deleted
|
||||
- Fix: Reset the last built railtype when starting a new game
|
||||
- Fix: Cloned vehicles get the same service interval as the original vehicle
|
||||
- Fix: Game no longer errors out when 'Many random towns' is selected in the scenario editor
|
||||
- Fix: Game no longer errors out when "Many random towns" is selected in the scenario editor
|
||||
- Fix: Obscure road dragging bug. The road build command did not return the appropiate error message of invalid-slope when building road
|
||||
- Fix: Temperate bank will no longer appear (during game) in tropic landscape. This bug is from the original game
|
||||
- Fix: Specify the 'stopall' console command as a debug command
|
||||
- Fix: Fixed a problem that caused DeliverGoodsToIndustry to not work as intended
|
||||
- Fix: Ships and aircraft can now be used as feeders as well
|
||||
- Fix: When a multiheaded train is sold the pointers were not updated correctly causing sporadious crashes/disconnects
|
||||
- Fix: New plantations now cause the correct '.. being planted ..' news item
|
||||
- Fix: New plantations now cause the correct ".. being planted .." news item
|
||||
- Fix: Danish town names were saved/loaded as Swiss
|
||||
- Fix: Removing roads on crossings was done without a check for ownership
|
||||
- Fix: [Autoreplace] Fix drawing of train list for outdated engines
|
||||
@@ -1752,12 +1642,12 @@
|
||||
- Feature: [localisation] Support genders (r2594)
|
||||
- Feature: [localisation] Support cases (r2597)
|
||||
- Feature: Add support for truncating strings to a given (pixel) length (r2607)
|
||||
- Feature: Overhaul DirectMusic MIDI backend, remove 'experimental' status (r2712)
|
||||
- Feature: Overhaul DirectMusic MIDI backend, remove "experimental" status (r2712)
|
||||
- Feature: Change the driver probing algorithm: Use the first music/sound/video which succeeds initialising instead of bailing out after the first. No need to specify -snull if no soundcard is present anymore (r2728)
|
||||
- Feature: The Main Toolbar Dropdown Menu can now display disabled items (r2734)
|
||||
- Feature: Clone vehicles (r2764)
|
||||
- Feature: When starting without a config file determine the language on basis of the current locale (r2777)
|
||||
- Feature: [NewGRF] Add support for 'extended bytes' (r2872)
|
||||
- Feature: [NewGRF] Add support for "extended bytes" (r2872)
|
||||
- Feature: [localisation] Major step twoards ISO-8859-15: Implement missing characters (r2879)
|
||||
- Feature: Implement the console command rm to remove savegames (r2941)
|
||||
- Feature: Danish town names (r2957)
|
||||
@@ -1833,7 +1723,7 @@
|
||||
- Fix: Several format string vulnerabilities and buffer overflows in the network code (r2899)
|
||||
- Fix: fixed issue where autorenewed vehicles did not get all stats updated (r2912)
|
||||
- Fix: Exit the child of the extmidi backend with _exit() instead of exit(), because we do not want any atexit handlers - especially flushing output streams - to run, if exec() fails (r2938)
|
||||
- Fix: Server crash with 'say'-command (r2950)
|
||||
- Fix: Server crash with "say"-command (r2950)
|
||||
- Fix: Fix win32 midi volume level control which did not work (r2960)
|
||||
- Fix: [OSX] quitting the game no longer leaves a process behind that eats all the CPU power (r3281)
|
||||
- Fix: Fix for UFO-broken waypoint [SF#1216203] (r2961)
|
||||
@@ -1958,9 +1848,9 @@
|
||||
- Fix: Autosave ignoring settings [SF#1149487]
|
||||
- Fix: Infinite access for A:\ (win32). Patch [1171208]. Only requery drive(s) if the user changes a directory, also surpress the OS error box that pops up on some windows machines [SF#1024703]
|
||||
- Fix: Create Lake and draggable Create Desert tools [SF#1095110]
|
||||
- Fix: Trains 'Go to depot' button: click twice skip to next order [SF#1172878]
|
||||
- Fix: Engine power not updated w/auto replace' autoreplace now forces an update of the cache [SF#1146215]
|
||||
- Fix: Path displaying as 'C:\\' in saveload window win32-only [SF#1173690]
|
||||
- Fix: Trains "Go to depot" button: click twice skip to next order [SF#1172878]
|
||||
- Fix: Engine power not updated w/auto replace" autoreplace now forces an update of the cache [SF#1146215]
|
||||
- Fix: Path displaying as "C:\\" in saveload window win32-only [SF#1173690]
|
||||
- Fix: Click & drag removal of road assertion fail [SF#1179892]
|
||||
- Fix: Max loan always in euros, use _opt_ptr instead of _opt [SF#1174237]
|
||||
- Fix: AI orders its vehicles to a competitor's truck stop [SF#1184201]
|
||||
@@ -2008,7 +1898,7 @@
|
||||
- Feature: [Windows] CTRL+V (Paste) now works on all editboxes. This includes 'Add Server', chat, etc
|
||||
- Feature: [Windows] dedicated server is now functioning correctly
|
||||
- Feature: Addded keyboard shortcuts for the order window
|
||||
- Feature: Aircraft refit options have been restricted to 'sane' values
|
||||
- Feature: Aircraft refit options have been restricted to "sane" values
|
||||
- Feature: allows setting the production values of the rawmaterial producing industries in the editor
|
||||
- Feature: console support for loading maps. Use 'load', 'list_files' and 'goto_dir' to navigate and load games
|
||||
- Feature: Display server port in the multiplayer game info window
|
||||
@@ -2019,7 +1909,7 @@
|
||||
- Feature: New companies receive a 5-year protection period against buying-up
|
||||
- Feature: norwegian townnames
|
||||
- Feature: Order Checking is only execute for ONE vehicle in an order-share system
|
||||
- Feature: Passengers aircraft now ignore the amount of mail for 'full load any' options
|
||||
- Feature: Passengers aircraft now ignore the amount of mail for "full load any" options
|
||||
- Feature: place multiple accepting industies nearby in the editor mode if the appropriate patches are set
|
||||
- Feature: population in label of the town (patch setting)
|
||||
- Feature: scrolling credits list (in alphabetical order)
|
||||
@@ -2053,7 +1943,7 @@
|
||||
- Fix: Crash if generating land while industry window is open. This also happened for towns and the land information window [SF#1101179]
|
||||
- Fix: Configure Patches window text overflow [SF#1101906]
|
||||
- Fix: console in dedicated server [SF#1101963]
|
||||
- Fix: Game crashed when clicking 'new face' or 'company color' twice [SF#1102275]
|
||||
- Fix: Game crashed when clicking "new face" or "company color" twice [SF#1102275]
|
||||
- Fix: Vehicle lists are now redrawn when a vehicle arrives in a depot. Station-specific vehicle lists are now redrawn daily as well (not only the master list) [SF#1099535, SF#1102776]
|
||||
- Fix: font size changing. Dedicated server did not have code filtering, 'tab' could result in bigger fonts [SF#1103113]
|
||||
- Fix: Order Check messages are now validated before displayed [SF#1103187]
|
||||
@@ -2091,7 +1981,7 @@
|
||||
- Fix: finally zooming in/out always works
|
||||
- Fix: fixed chat-bug (that from a certain moment, nobody could talk)
|
||||
- Fix: fixed weight for double-head trains and with that the acceleration (now maglev lvl4 can reach their top speed, and are faster than lvl3)
|
||||
- Fix: Full-Loading trains no longer get 'lost' after a while
|
||||
- Fix: Full-Loading trains no longer get "lost" after a while
|
||||
- Fix: Graphs were not updated correctly when one graph with a certain selection was already open and another graph window was opened
|
||||
- Fix: in multiplayer clientlist can only be opened once
|
||||
- Fix: Loan does not count against the company value
|
||||
@@ -2111,7 +2001,7 @@
|
||||
- Fix: the scrollbar in the network gui (server list) now updates when scrolling
|
||||
- Fix: Train crashes should no longer desync the game
|
||||
- Fix: When deleting an order, the next pointer was not cleared, resulting in some unusual behavoir from time to time
|
||||
- Fix: You can now also delete automatically found servers by pressing 'del'
|
||||
- Fix: You can now also delete automatically found servers by pressing "del"
|
||||
- Fix: You should no longer be able to delete bridges on any type of underground when there is a vehicle on it
|
||||
|
||||
|
||||
@@ -2210,7 +2100,7 @@
|
||||
- Change: Removed patch no_train_service. Instead you can set the default service interval for any vehicle type to 'disabled'
|
||||
- Codechange: Comments added to the code
|
||||
- Codechange: Made bridge building code more readable [SF#996244]
|
||||
- Feature: 'None' as option for number of industries in difficulty settings
|
||||
- Feature: "None" as option for number of industries in difficulty settings
|
||||
- Feature: Add many random industries and towns in scenario editor
|
||||
- Feature: Added Autosignals, just like Autorail. Can copy signal style, convert signal<->semaphore, etc
|
||||
- Feature: Added level land button to scenario editor
|
||||
@@ -2324,8 +2214,8 @@
|
||||
- Fix: Weird two tile bridges on slopes [SF#996065]
|
||||
- Fix: Empty strings in signs [SF#997303]
|
||||
- Fix: Junction after tunnel bug [SF#997703]
|
||||
- Fix: 'autosave' directoy creation (MorphOS/AmigaOS) [SF#999592]
|
||||
- Fix: I lost all wagons. Half-assed fix for lost wagons. But now users can at least fix this problem. Consolecommand 'resetengines' [SF#1001540]
|
||||
- Fix: "autosave" directoy creation (MorphOS/AmigaOS) [SF#999592]
|
||||
- Fix: I lost all wagons. Half-assed fix for lost wagons. But now users can at least fix this problem. Consolecommand "resetengines" [SF#1001540]
|
||||
- Fix: BuildRoadOutsideStation fix [SF#1006530]
|
||||
- Fix: Autorenew issues [SF#1006715]
|
||||
- Fix: Copy orders between bus/truck possible [SF#1007272]
|
||||
@@ -2367,7 +2257,7 @@
|
||||
- Feature: Land info now shows type of signal
|
||||
- Feature: Realistic train reversing
|
||||
- Feature: Added support for 64 bit CPUs
|
||||
- Feature: Added water quantity level 'very low', which is the default for easy mode now
|
||||
- Feature: Added water quantity level "very low", which is the default for easy mode now
|
||||
- Feature: Realistic acceleration turned on, train must first slow down and stop before it can reverse
|
||||
- Feature: [MorphOS]: Various small improvement to make the the game feel more native
|
||||
- Feature: Alt + f now toggles full screen (alt + enter still works)
|
||||
@@ -2382,7 +2272,7 @@
|
||||
- Feature: Initial GRF support.You have to enable it in openttd.cfg using [NewGRF] setting
|
||||
- Feature: Smooth economy changes
|
||||
- Feature: TTDPatch-style gotodepot. Ship depots and aircraft hangars can be inserted in the schedule as well
|
||||
- Feature: Ability to add 'service if needed' orders (the 'full load' button changes to 'service' after selecting a depot order)
|
||||
- Feature: Ability to add "service if needed" orders (the "full load" button changes to "service" after selecting a depot order)
|
||||
- Feature: If a vehicle has depot orders in its schedule, automatic servicing is disabled
|
||||
- Feature: Patch setting so that helicopters get serviced automatically on helipad
|
||||
- Feature: Center toolbar on screen
|
||||
@@ -2444,7 +2334,7 @@
|
||||
- Fix: Inflation was way too high when intrest rate = 0
|
||||
- Fix: Cannot sell anything if money is TOO negative
|
||||
- Fix: Fast forward button resets
|
||||
- Fix: 'Refit train' button remains
|
||||
- Fix: "Refit train" button remains
|
||||
- Fix: Enable up/down scrolling with the mouse
|
||||
- Fix: 1920 all trains
|
||||
- Fix: Wrong heli breakdownspeed
|
||||
@@ -2488,7 +2378,7 @@
|
||||
- Feature: Bemidi support
|
||||
- Feature: Added Icelandic currency
|
||||
- Change: Plant area of trees now allowed for 20x20 area
|
||||
- Change: 'kmh^-1' to 'km/h'
|
||||
- Change: "kmh^-1" to "km/h"
|
||||
- Change: Show original savegame names for oldstyle savegames
|
||||
- Change: Autosave go to autosave/
|
||||
- Fix: Do not allow building railroad stations on airports or bus stations
|
||||
@@ -2541,7 +2431,7 @@
|
||||
- Feature: More realistic train starting and stopping
|
||||
- Change: New directory structure (*.grf+sample.cat in data subdir, *.lng in lang subdir)
|
||||
- Fix: Shift+arrows keys scrolls faster
|
||||
- Fix: 'Monorail in 1985' which allowed you to build monorail/maglev at any year [SF#941880]
|
||||
- Fix: "Monorail in 1985" which allowed you to build monorail/maglev at any year [SF#941880]
|
||||
- Fix: Town ratings when companies are deleted/merged
|
||||
- Fix: Vehicle reliability calculation in third phase
|
||||
- Fix: Random world button in scenario editor does not build cities, industries, trees
|
||||
@@ -2666,27 +2556,27 @@
|
||||
- Feature: Show semaphores on the right side if right-sided traffic
|
||||
- Feature: Patch options configuration window
|
||||
- Feature: Autorail build tool
|
||||
- Feature: 'Show yearly finances window' option
|
||||
- Feature: 'Signals on drive side' patch
|
||||
- Feature: 'Show full date in statusbar' option
|
||||
- Feature: "Show yearly finances window" option
|
||||
- Feature: "Signals on drive side" patch
|
||||
- Feature: "Show full date in statusbar" option
|
||||
- Feature: Italian translation
|
||||
- Feature: Road and rail removal by dragging a selection
|
||||
- Feature: News item for 'train is unprofitable'
|
||||
- Feature: News item for 'train is lost'
|
||||
- Feature: News item for "train is unprofitable"
|
||||
- Feature: News item for "train is lost"
|
||||
- Feature: [Win32] Double size mode (Ctrl-d to toggle)
|
||||
- Feature: 'Multiple similar industries in close proximity' option
|
||||
- Feature: 'Multiple industries per down' option
|
||||
- Feature: 'Crossing tunnels' option
|
||||
- Feature: Order sharing and copying ('goto' on other vehicle to copy, ctrl+'goto' to share)
|
||||
- Feature: "Multiple similar industries in close proximity" option
|
||||
- Feature: "Multiple industries per down" option
|
||||
- Feature: "Crossing tunnels" option
|
||||
- Feature: Order sharing and copying ("goto" on other vehicle to copy, ctrl+"goto" to share)
|
||||
- Feature: Remember last built rail type
|
||||
- Feature: 'Debtmax' faster loan management with ctrl key
|
||||
- Feature: 'Go to depot' orders option
|
||||
- Feature: 'Long bridges' option
|
||||
- Feature: 'Select goods' option
|
||||
- Feature: 'No train service' option
|
||||
- Feature: 'No inflation' option
|
||||
- Feature: "Debtmax" faster loan management with ctrl key
|
||||
- Feature: "Go to depot" orders option
|
||||
- Feature: "Long bridges" option
|
||||
- Feature: "Select goods" option
|
||||
- Feature: "No train service" option
|
||||
- Feature: "No inflation" option
|
||||
- Feature: Automatically detect available resolutions
|
||||
- Feature: 'Full load any' option, as in TTDPatch
|
||||
- Feature: "Full load any" option, as in TTDPatch
|
||||
- Feature: Automatic detection of available language files
|
||||
- Feature: German translation
|
||||
- Feature: Finnish town names
|
||||
@@ -2711,7 +2601,7 @@
|
||||
- Fix: Disallow buoy in north corner
|
||||
- Fix: Shift key now increases game speed only when game window is active
|
||||
- Fix: Ctrl button now works with SDL driver
|
||||
- Fix: Incorrect weight displayed in 'new trains' window
|
||||
- Fix: Incorrect weight displayed in "new trains" window
|
||||
- Fix: Incorrect train running cost in newspaper
|
||||
|
||||
|
||||
@@ -2792,8 +2682,8 @@
|
||||
- Feature: Command line -g flag now optionally takes a game to load
|
||||
- Add: External MIDI driver for Unix version
|
||||
- Add: DirectMusic driver for Win32 version
|
||||
- Add: 'build tracks on slopes' feature
|
||||
- Add: "build tracks on slopes" feature
|
||||
- Fix: Problem where directories were not displayed under Linux
|
||||
- Fix: Colors in map window for routes
|
||||
- Fix: Road drive side
|
||||
- Fix: 'Fund road construction' not clickable when unavailable
|
||||
- Fix: "Fund road construction" not clickable when unavailable
|
||||
|
19
config.lib
19
config.lib
@@ -5,7 +5,7 @@ log() {
|
||||
}
|
||||
|
||||
set_default() {
|
||||
released_version="0.7.3"
|
||||
released_version="0.7.2-RC1"
|
||||
|
||||
ignore_extra_parameters="0"
|
||||
# We set all kinds of defaults for params. Later on the user can override
|
||||
@@ -47,8 +47,8 @@ set_default() {
|
||||
enable_static="1"
|
||||
enable_translator="0"
|
||||
enable_unicode="1"
|
||||
enable_assert="0"
|
||||
enable_strip="1"
|
||||
enable_assert="1"
|
||||
enable_strip="0"
|
||||
enable_universal="1"
|
||||
enable_osx_g5="0"
|
||||
enable_cocoa_quartz="1"
|
||||
@@ -1301,8 +1301,7 @@ make_cflags_and_ldflags() {
|
||||
CFLAGS="$CFLAGS -DWITH_ICU"
|
||||
CFLAGS="$CFLAGS `$icu_config --cppflags | tr '\n\r' ' '`"
|
||||
|
||||
# Some icu-configs have the 'feature' of not adding a space where others do add the space
|
||||
LIBS="$LIBS `$icu_config --ldflags-searchpath` `$icu_config --ldflags-libsonly | tr '\n\r' ' '`"
|
||||
LIBS="$LIBS `$icu_config --ldflags-libsonly | tr '\n\r' ' '`"
|
||||
fi
|
||||
|
||||
|
||||
@@ -1408,9 +1407,7 @@ make_cflags_and_ldflags() {
|
||||
# Also make makedepend aware of compiler's built-in defines.
|
||||
if [ "$with_makedepend" != "0" ]; then
|
||||
cflags_makedep="`echo | $cxx_host -E -x c++ -dM - | sed 's@.define @-D@g;s@ .*@ @g;s@(.*)@@g' | tr -d '\r\n'`"
|
||||
|
||||
# Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations
|
||||
cflags_makedep="$cflags_makedep `echo \"$CFLAGS\" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g'`"
|
||||
cflags_makedep="$cflags_makedep `echo "$CFLAGS" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g'`"
|
||||
else
|
||||
makedepend=""
|
||||
fi
|
||||
@@ -2297,9 +2294,9 @@ detect_icu() {
|
||||
log 2 " returned $version"
|
||||
log 2 " exit code $ret"
|
||||
|
||||
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$shortversion" -lt "22" ]; then
|
||||
if [ -n "$shortversion" ] && [ "$shortversion" -lt "22" ]; then
|
||||
log 1 "checking libicu... needs at least version 2.2.0, icu NOT enabled"
|
||||
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$shortversion" -lt "20" ]; then
|
||||
if [ -n "$shortversion" ] && [ "$shortversion" -lt "20" ]; then
|
||||
log 1 "checking libicu... needs at least version 2.0.0, icu NOT enabled"
|
||||
else
|
||||
log 1 "checking libicu... not found"
|
||||
fi
|
||||
|
21
configure
vendored
21
configure
vendored
@@ -54,9 +54,8 @@ if [ "$1" = "--reconfig" ] || [ "$1" = "--reconfigure" ]; then
|
||||
# Make sure we don't lock config.cache
|
||||
cat config.cache | sed 's@\\ @\\\\ @g' > cache.tmp
|
||||
sh cache.tmp
|
||||
RET=$?
|
||||
rm -f cache.tmp
|
||||
exit $RET
|
||||
exit $?
|
||||
fi
|
||||
|
||||
set_default
|
||||
@@ -86,7 +85,7 @@ if [ ! -f "$LANG_DIR/english.txt" ]; then
|
||||
fi
|
||||
|
||||
# Read the source.list and process it
|
||||
AWKCOMMAND='
|
||||
SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk '
|
||||
{ }
|
||||
/^( *)#end/ { if (deep == skip) { skip -= 1; } deep -= 1; next; }
|
||||
/^( *)#else/ { if (deep == skip) { skip -= 1; } else if (deep - 1 == skip) { skip += 1; } next; }
|
||||
@@ -131,17 +130,13 @@ AWKCOMMAND='
|
||||
print $0;
|
||||
}
|
||||
}
|
||||
'
|
||||
' | $PIPE_SORT`"
|
||||
|
||||
# Read the source.list and process it
|
||||
# Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations
|
||||
SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | $PIPE_SORT`"
|
||||
|
||||
OBJS_C="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.c$/ { gsub(\".c$\", \".o\", $0); print $0; }'`"
|
||||
OBJS_CPP="`echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.cpp$/ { gsub(\".cpp$\", \".o\", $0); print $0; }'`"
|
||||
OBJS_MM="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.mm$/ { gsub(\".mm$\", \".o\", $0); print $0; }'`"
|
||||
OBJS_RC="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.rc$/ { gsub(\".rc$\", \".o\", $0); print $0; }'`"
|
||||
SRCS="` echo \"$SRCS\" | $awk ' { ORS = \" \" } { print $0; }'`"
|
||||
OBJS_C="` echo \"$SRCS\" | $awk ' { ORS = " " } /\.c$/ { gsub(".c$", ".o", $0); print $0; }'`"
|
||||
OBJS_CPP="`echo \"$SRCS\" | $awk ' { ORS = " " } /\.cpp$/ { gsub(".cpp$", ".o", $0); print $0; }'`"
|
||||
OBJS_MM="` echo \"$SRCS\" | $awk ' { ORS = " " } /\.mm$/ { gsub(".mm$", ".o", $0); print $0; }'`"
|
||||
OBJS_RC="` echo \"$SRCS\" | $awk ' { ORS = " " } /\.rc$/ { gsub(".rc$", ".o", $0); print $0; }'`"
|
||||
SRCS="` echo \"$SRCS\" | $awk ' { ORS = " " } { print $0; }'`"
|
||||
|
||||
# In makefiles, we always use -u for sort
|
||||
if [ -z "$sort" ]; then
|
||||
|
@@ -26,7 +26,7 @@
|
||||
[metadata]
|
||||
; the name of the pack, preferably less than 16 characters
|
||||
name = example
|
||||
; the short name (4 characters), used to identify this set
|
||||
; the short name (4 characters), used to identify this set within NewGRFs
|
||||
shortname = XMPL
|
||||
; the version of this graphics set (read as single integer)
|
||||
version = 0
|
||||
@@ -49,8 +49,6 @@ tropical = TRGH.GRF
|
||||
; GRF file with extra toyland sprites
|
||||
toyland = TRGT.GRF
|
||||
; NewGRF file using Actions 5, 7, 9 and A to replace sprites
|
||||
; Must use a GRF ID starting with FF so it cannot be selected from
|
||||
; the in-game NewGRF list and (thus) be loaded twice.
|
||||
extra = OPENTTDD.GRF
|
||||
|
||||
; The md5s section lists the MD5 checksum for the files that replace them.
|
||||
|
112
known-bugs.txt
112
known-bugs.txt
@@ -1,18 +1,5 @@
|
||||
OpenTTD's known bugs
|
||||
Last updated: 2009-10-01
|
||||
Release version: 0.7.3
|
||||
README
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
Table of Contents:
|
||||
------------------
|
||||
1) About
|
||||
2) Known bugs in the this stable release
|
||||
3) Known bugs that will not be solved
|
||||
|
||||
|
||||
1) About:
|
||||
-- ------
|
||||
All bugs listed below are marked as known. Please do not submit any bugs
|
||||
that are the same as these. If you do, do not act surprised, because
|
||||
we WILL flame you!!
|
||||
@@ -21,104 +8,25 @@ Of course if you have more knowledge about any of these bugs, have more
|
||||
specifics, we welcome you to report them. React to the given bug indicated
|
||||
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.
|
||||
|
||||
2) Known bugs in the this stable release:
|
||||
-- --------------------------------------
|
||||
The following bugs are known to exist in this stable release and
|
||||
we intend to fix them. Some bugs are known but are not fixable or
|
||||
fixing them would cause further problems. Those bugs can be found
|
||||
in the "Known bugs that will not be solved" section.
|
||||
Bugs for 0.7.1
|
||||
------------------------------------------------------------------------
|
||||
URL: http://bugs.openttd.org
|
||||
|
||||
The bugs in this section all refer to a ticket in our bug tracking system
|
||||
that you can find at: http://bugs.openttd.org
|
||||
If the bugs are closed but still listed here it means that the bug is fixed
|
||||
and that the nightlies and next major release will not have that bug.
|
||||
|
||||
- 3198 [OSX] "Could not get system colour space" error on some Mac OS X 10.6
|
||||
- 3194 [OSX] Full screen 'strobing' on some Mac OS X 10.6
|
||||
- 3190 [OSX] Compiling fails on some Mac OS X 10.6
|
||||
- 3159 [NewGRF] Autoreplace resets (or does not keep) value of variable F2
|
||||
- 3057 Road vehicle sometimes 'forget' the need for servicing
|
||||
- 3040 Not all alternatives are always shown in the "Join station" list
|
||||
- 2955 With path signals depots are less likely to be visited
|
||||
- 2891 Ignore signal does not keep the train running when in path signalled block till the next signal
|
||||
- 2769 No offer for buying bankrupt AIs
|
||||
- 2616 [NewGRF] Cloning creates vehicles with invalid subcargos
|
||||
- 2613 [NewGRF] House property 15 does not work
|
||||
- 2737 Self-crossing trains ignore "forbid 90 degree turn" setting
|
||||
- 2616 Cloning creates vehicles with invalid subcargos
|
||||
- 2585 [OSX] OS' mouse pointer showing
|
||||
- 2484 [OSX] Cannot enter CJK characters
|
||||
- 2427 Vehicle owner gets paid for whole cargo feeder share
|
||||
- 1944 Road vehicles not picking empty drivethrough platform
|
||||
- 1762 Strange Autoreplace behaviour
|
||||
- 1495 Long vehicles might block multistop drivethrough stations
|
||||
- 1473 Lost trains ignore exit signals
|
||||
- 1140 [OSX] Not smooth moving map with touchpad
|
||||
- 1072 Text overflows in several windows
|
||||
|
||||
|
||||
3) Known bugs that will not be solved:
|
||||
-- -----------------------------------
|
||||
This section lists all known bugs that we do not intend to fix and the
|
||||
reasons why we think that fixing them is infeasible. We might make some
|
||||
minor improvements that reduce the scope of these bugs, but we will not
|
||||
be able to completely fix them.
|
||||
|
||||
Clipping problems
|
||||
In some cases sprites are not drawn as one would expect. Examples of
|
||||
this are aircraft that might be hidden below the runway or trees that
|
||||
in some cases are rendered over vehicles.
|
||||
The primary cause of this problem is that OpenTTD does not have enough
|
||||
data (like a 3D model) to properly determine what needs to be drawn in
|
||||
front of what. OpenTTD has bounding boxes but in lots of cases they
|
||||
are either too big or too small and then cause problems with what
|
||||
needs to be drawn in front of what. Also some visual tricks are used.
|
||||
For example trains at 8 pixels high, the catenary needs to be drawn
|
||||
above that. When you want to draw bridges on top of that, which are
|
||||
only one height level (= 8 pixels) higher, you are getting into some
|
||||
big problems.
|
||||
We can not change the height levels; it would require us to either
|
||||
redraw all vehicle or all landscape graphics. Doing so would mean we
|
||||
leave the Transport Tycoon graphics, which in effect means OpenTTD
|
||||
will not be a Transport Tycoon clone anymore.
|
||||
|
||||
Duplicate (station) names after renaming
|
||||
After renaming stations one can create duplicate station names. This
|
||||
is done giving a station the same custom name as another station with
|
||||
an automatically generated name.
|
||||
The major part of this problem is that station names are translatable.
|
||||
Meaning that a station is called e.g. '<TOWN> Central' in English and
|
||||
'<TOWN> Centraal' in Dutch. This means that in network games the
|
||||
renaming of a town could cause the rename to succeed on some clients
|
||||
and fail at others. This creates an inconsistent game state that will
|
||||
be seen as a 'desync'. Secondly the custom names are intended to fall
|
||||
completely outside of the '<TOWN> <name>' naming of stations, so when
|
||||
you rename a town all station names are updated accordingly.
|
||||
As a result the decision has been made that all custom names are only
|
||||
compared to the other custom names in the same class and not compared
|
||||
to the automatically generated names.
|
||||
|
||||
Forbid 90 degree turns does not work for crossing PBS paths
|
||||
When you run a train through itself on a X junction with PBS turned on
|
||||
the train will not obey the 'forbid 90 degree turns' setting. This is
|
||||
due to the fact that we can not be sure that the setting was turned
|
||||
off when the track was reserved, which means that we assume it was
|
||||
turned on and that the setting does not hold at the time. We made it
|
||||
this way to allow one to change the setting in-game, but it breaks
|
||||
slightly when you are running your train through itself. Running a
|
||||
train through means that your network is broken and is thus a user
|
||||
error which OpenTTD tries to graciously handle.
|
||||
Fixing this bug means that we need to record whether this particular
|
||||
setting was turned on or off at the time the reservation was made. This
|
||||
means adding quite a bit of data to the savegame for solving an issue
|
||||
that is basically an user error. We think it is not worth the effort.
|
||||
|
||||
Lost trains ignore (block) exit signals
|
||||
If trains are lost they ignore block exit signals, blocking junctions
|
||||
with presignals. This is caused because the path finders cannot tell
|
||||
where the train needs to go. As such a random direction is chosen at
|
||||
each junction. This causes the trains to occasionally to make choices
|
||||
that are unwanted from a player's point of view.
|
||||
This will not be fixed because lost trains are in almost all cases a
|
||||
network problem, e.g. a train can never reach a specific place. This
|
||||
makes the impact of fixing the bug enormously small against the
|
||||
amount of work needed to write a system that prevents the lost trains
|
||||
from taking the wrong direction.
|
||||
- 119 Clipping problems with vehicles on slopes
|
||||
|
@@ -1,6 +1,7 @@
|
||||
# $Id$
|
||||
# http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Version=1.1
|
||||
Name=!!MENU_NAME!!
|
||||
|
@@ -1,80 +1,50 @@
|
||||
openttd (0.7.3) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 01 Oct 2009 12:35:47 +0200
|
||||
|
||||
openttd (0.7.3~RC2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 24 Sep 2009 21:30:43 +0200
|
||||
|
||||
openttd (0.7.3~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 13 Sep 2009 10:25:56 +0200
|
||||
|
||||
openttd (0.7.2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sat, 01 Aug 2009 00:19:43 +0200
|
||||
|
||||
openttd (0.7.2~RC2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 21 Jul 2009 20:25:56 +0200
|
||||
|
||||
openttd (0.7.2~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 15 Jul 2009 22:25:56 +0200
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 15 Jul 2008 22:25:56 +0200
|
||||
|
||||
openttd (0.7.1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 09 Jun 2009 01:34:56 +0200
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 09 Jun 2008 01:34:56 +0200
|
||||
|
||||
openttd (0.7.1~RC3) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 03 Jun 2009 15:34:56 +0200
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 03 Jun 2008 15:34:56 +0200
|
||||
|
||||
openttd (0.7.1~RC2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 21 Mar 2009 14:34:56 +0200
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 21 Mar 2008 14:34:56 +0200
|
||||
|
||||
openttd (0.7.1~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 11 Mar 2009 17:34:56 +0200
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 11 Mar 2008 17:34:56 +0200
|
||||
|
||||
openttd (0.7.0) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 01 Apr 2009 13:37:42 +0000
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 01 Apr 2008 13:37:42 +0000
|
||||
|
||||
openttd (0.7.0~RC2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 23 Mar 2009 00:42:00 +0200
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 23 Mar 2008 00:42:00 +0200
|
||||
|
||||
openttd (0.7.0~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 16 Mar 2009 00:07:00 +0200
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 16 Mar 2008 00:07:00 +0200
|
||||
|
||||
openttd (0.7.0~beta2) unstable; urgency=low
|
||||
|
||||
|
@@ -7,13 +7,10 @@
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself
|
||||
#
|
||||
# Note: for (at least) CentOS '#' comments end '\' continue command on new line.
|
||||
# So place all '#' commented parameters of e.g. configure to the end.
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
Name: openttd
|
||||
Version: 0.7.3
|
||||
Version: 0.7.2-RC1
|
||||
Release: 1%{?dist}
|
||||
|
||||
Group: Amusements/Games
|
||||
@@ -21,12 +18,13 @@ License: GPLv2
|
||||
URL: http://www.openttd.org
|
||||
Summary: OpenTTD is an Open Source clone of Chris Sawyer's Transport Tycoon Deluxe
|
||||
|
||||
Source: %{name}-%{version}-source.tar.bz2
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
|
||||
Requires: fontconfig
|
||||
Requires: libicu
|
||||
Requires: libpng
|
||||
Requires: SDL
|
||||
Requires: zlib
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: fontconfig-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libicu-devel
|
||||
@@ -37,32 +35,33 @@ BuildRequires: zlib-devel
|
||||
Requires: freetype
|
||||
BuildRequires: freetype-devel
|
||||
%endif
|
||||
%if %{_vendor}=="MandrakeSoft" || %{_vendor}=="mandriva"
|
||||
Requires: freetype2
|
||||
BuildRequires: libfreetype6-devel
|
||||
%endif
|
||||
%if %{_vendor}=="redhat" || %{_vendor}=="fedora"
|
||||
Requires: freetype
|
||||
BuildRequires: freetype-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
%endif
|
||||
%if %{_vendor}=="suse" || %{_vendor}=="mandriva"
|
||||
%if %{_vendor}=="suse"
|
||||
Requires: freetype2
|
||||
BuildRequires: freetype2-devel
|
||||
%endif
|
||||
%if %{_vendor}=="suse"
|
||||
BuildRequires: update-desktop-files
|
||||
%endif
|
||||
|
||||
# recommends works for suse (not sles9) and mandriva, only
|
||||
%if 0%{?suse_version} > 910 || %{_vendor}=="mandriva"
|
||||
Recommends: opengfx
|
||||
# for 0.8.0
|
||||
#Recommends: opensfx
|
||||
%endif
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
|
||||
%description
|
||||
OpenTTD is a reimplementation of the Microprose game "Transport Tycoon Deluxe"
|
||||
with lots of new features and enhancements. To play the game you need either
|
||||
the original data from the game or install the recommend package OpenGFX.
|
||||
with lots of new features and enhancements. To play the game you need to copy
|
||||
the following 6 data files from your Transport Tycoon Deluxe CD to the game
|
||||
data directory in %{_datadir}/games/%{name}/data:
|
||||
|
||||
From the Windows version of TTD you need:
|
||||
sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf
|
||||
|
||||
Or if you have the DOS version you need:
|
||||
sample.cat TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF
|
||||
|
||||
OpenTTD is licensed under the GNU General Public License version 2.0. For more
|
||||
information, see the file 'COPYING' included with every release and source
|
||||
@@ -72,71 +71,49 @@ download of the game.
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
# suse sle <10 has no support for makedepend
|
||||
%if 0%{?sles_version} == 9 || 0%{?sles_version} == 10
|
||||
%define do_makedepend 0
|
||||
%else
|
||||
%define do_makedepend 1
|
||||
%endif
|
||||
./configure \
|
||||
--revision=%{version} \
|
||||
--prefix-dir="%{_prefix}" \
|
||||
--binary-name="%{name}" \
|
||||
--enable-strip \
|
||||
--binary-dir="bin" \
|
||||
--data-dir="share/%{name}" \
|
||||
--with-makedepend="%{do_makedepend}" \
|
||||
# --revision="%{ver}%{?prever:-%{prever}}" \
|
||||
# --enable-debug=0 \
|
||||
# --with-sdl \
|
||||
# --with-zlib \
|
||||
# --with-png \
|
||||
# --with-freetype \
|
||||
# --with-fontconfig \
|
||||
# --with-icu \
|
||||
# --menu_group="Game;" \
|
||||
--binary-name="%{name}" \
|
||||
# --menu-name="OpenTTD" \
|
||||
# --data-dir="share\games\%{name}" \
|
||||
# --doc-dir="share\doc\%{name}" \
|
||||
# --icon-dir="share/pixmaps" \
|
||||
# --icon-theme-dir="share/icons/hicolor" \
|
||||
# --man-dir="share/man/man6" \
|
||||
# --menu-dir="share/applications"
|
||||
|
||||
# --menu-dir="share/applications" \
|
||||
--enable-debug=0 \
|
||||
# --menu_group="Game;" \
|
||||
--with-sdl \
|
||||
--with-zlib \
|
||||
--with-png \
|
||||
--with-freetype \
|
||||
--with-fontconfig \
|
||||
--with-icu \
|
||||
--enable-strip
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf "%{buildroot}"
|
||||
make install INSTALL_DIR="%{buildroot}"
|
||||
|
||||
# Validate menu entrys (vendor specific)
|
||||
%if %{_vendor} == "redhat" || %{_vendor}=="fedora"
|
||||
desktop-file-install \
|
||||
# --delete-original \
|
||||
--vendor="%{_vendor}" \
|
||||
--remove-key Version \
|
||||
--dir="%{buildroot}/%{_datadir}/applications/" \
|
||||
"%{buildroot}/%{_datadir}/applications/%{name}.desktop" \
|
||||
# --delete-original
|
||||
%endif
|
||||
%if %{_vendor}=="suse"
|
||||
%__cat > %{name}.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=OpenTTD
|
||||
Comment=OpenTTD - A clone of the Microprose game 'Transport Tycoon Deluxe'
|
||||
GenericName=OpenTTD
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Exec=%{name}
|
||||
Icon=%{name}
|
||||
Categories=Game;StrategyGame;
|
||||
EOF
|
||||
%suse_update_desktop_file -i %{name} Game StrategyGame
|
||||
"%{buildroot}/%{_datadir}/applications/%{name}.desktop"
|
||||
%endif
|
||||
|
||||
%clean
|
||||
#rm -rf "%{buildroot}"
|
||||
rm -rf "%{buildroot}"
|
||||
|
||||
%post
|
||||
# Update the icon cache (vendor specific)
|
||||
%if %{_vendor}=="mandriva"
|
||||
%if %{_vendor}=="MandrakeSoft" || %{_vendor}=="mandriva"
|
||||
%update_icon_cache hicolor
|
||||
%endif
|
||||
|
||||
@@ -149,7 +126,7 @@ fi
|
||||
|
||||
%postun
|
||||
# Update the icon cache (vendor specific)
|
||||
%if %{_vendor}=="mandriva"
|
||||
%if %{_vendor}=="MandrakeSoft" || %{_vendor}=="mandriva"
|
||||
%update_icon_cache hicolor
|
||||
%endif
|
||||
|
||||
@@ -163,39 +140,37 @@ fi
|
||||
%files
|
||||
%defattr(-, root, games, -)
|
||||
%dir %{_datadir}/doc/%{name}
|
||||
%dir %{_datadir}/%{name}
|
||||
%dir %{_datadir}/%{name}/lang
|
||||
%dir %{_datadir}/%{name}/data
|
||||
%dir %{_datadir}/%{name}/gm
|
||||
%dir %{_datadir}/%{name}/scripts
|
||||
%dir %{_datadir}/games/%{name}
|
||||
%dir %{_datadir}/games/%{name}/lang
|
||||
%dir %{_datadir}/games/%{name}/data
|
||||
%dir %{_datadir}/games/%{name}/gm
|
||||
%attr(755, root, games) %{_bindir}/%{name}
|
||||
%{_datadir}/doc/%{name}/*
|
||||
%{_datadir}/%{name}/lang/*
|
||||
%{_datadir}/%{name}/data/*
|
||||
%{_datadir}/%{name}/scripts/*
|
||||
%{_datadir}/applications/*%{name}.desktop
|
||||
%{_datadir}/games/%{name}/lang/*
|
||||
%{_datadir}/games/%{name}/data/*
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/pixmaps/*
|
||||
%{_datadir}/icons/*
|
||||
%doc %{_mandir}/man6/%{name}.6.*
|
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.png
|
||||
%doc %{_mandir}/man6/%{name}.6.gz
|
||||
|
||||
%changelog
|
||||
* Sat Sep 26 2009 Marcel Gmür <ammler@openttdcoop.org> - 0.7.2
|
||||
- no subfolder games for datadir
|
||||
- cleanup: no post and postun anymore
|
||||
- Recommends: opengfx (for suse and mandriva)
|
||||
- add SUSE support
|
||||
|
||||
* Mon Oct 20 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||
|
||||
- Added libicu dependency
|
||||
|
||||
* Thu Sep 23 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||
|
||||
- Merged both versions of the spec file
|
||||
|
||||
* Fri Aug 29 2008 Jonathan Coome <maedhros@openttd.org>
|
||||
|
||||
- Rewrite spec file from scratch.
|
||||
|
||||
* Sat Aug 02 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||
|
||||
- Updated spec file
|
||||
|
||||
* Thu Mar 27 2008 Denis Burlaka <burlaka@yandex.ru>
|
||||
|
||||
- Universal spec file
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
!define APPNAME "OpenTTD" ; Define application name
|
||||
!define APPVERSION "0.7.3" ; Define application version
|
||||
!define APPVERSIONINTERNAL "0.7.3.0" ; Define application version in X.X.X.X
|
||||
!define INSTALLERVERSION 68 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
|
||||
!define APPVERSION "0.7.2-RC1" ; Define application version
|
||||
!define APPVERSIONINTERNAL "0.7.2.0" ; Define application version in X.X.X.X
|
||||
!define INSTALLERVERSION 63 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
|
||||
!include ${VERSION_INCLUDE}
|
||||
|
||||
!define APPURLLINK "http://www.openttd.org"
|
||||
@@ -71,6 +71,10 @@ Page custom SelectCDEnter SelectCDExit ": TTD folder"
|
||||
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
;-----------------------------------------------------
|
||||
; New custom page to show UNICODE and MSLU information
|
||||
Page custom ShowWarningsPage
|
||||
|
||||
!define MUI_FINISHPAGE_TITLE_3LINES
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "Run ${APPNAMEANDVERSION} now!"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\openttd.exe"
|
||||
@@ -129,6 +133,7 @@ Section "!OpenTTD" Section1
|
||||
; Delete old files from the main dir. they are now placed in data/ and lang/
|
||||
Delete "$INSTDIR\*.lng"
|
||||
Delete "$INSTDIR\*.grf"
|
||||
Delete "$INSTDIR\*.obg"
|
||||
Delete "$INSTDIR\sample.cat"
|
||||
Delete "$INSTDIR\ttd.exe"
|
||||
|
||||
@@ -367,6 +372,23 @@ WinNT:
|
||||
ClearErrors
|
||||
FunctionEnd
|
||||
|
||||
;----------------------------------------------------------------------------------
|
||||
; Custom page function to show notices for running OpenTTD (only for win32 systems)
|
||||
; We have extracted this custom page as Notice in the .onInit function
|
||||
Function ShowWarningsPage
|
||||
Call GetWindowsVersion
|
||||
Pop $R0
|
||||
; Don't show the UNICODE notice if the installer is run on Win9x systems
|
||||
StrCmp $R0 "win9x" 0 WinNT
|
||||
Abort
|
||||
WinNT:
|
||||
!insertmacro MUI_HEADER_TEXT "Installation Complete" "Important notices for OpenTTD usage."
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "notice.ini" "Notice"
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "Notice"
|
||||
ClearErrors
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW
|
||||
FunctionEnd
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; Determine windows version, returns "win9x" if Win9x/Me or "winnt" on the stack
|
||||
Function GetWindowsVersion
|
||||
|
30
os/win32/installer/notice.ini
Normal file
30
os/win32/installer/notice.ini
Normal file
@@ -0,0 +1,30 @@
|
||||
; Ini file generated by the HM NIS Edit IO designer.
|
||||
[Settings]
|
||||
NumFields=3
|
||||
CancelEnabled=0
|
||||
|
||||
[Field 1]
|
||||
Type=Groupbox
|
||||
Text=UNICODE support
|
||||
Left=8
|
||||
Right=292
|
||||
Top=0
|
||||
Bottom=75
|
||||
|
||||
[Field 2]
|
||||
Type=Label
|
||||
Text=This version of OpenTTD has support for UNICODE, allowing users to use non-ASCII character sets such as Russian or Japanese.\r\nSelecting such a language will result in an unusable and garbled interface. You will need to specify a font that has support for these characters in openttd.cfg, or alternatively use an appropiate grf file.\r\n\r\nFor more information please refer to the readme or the wiki.
|
||||
Left=13
|
||||
Right=284
|
||||
Top=9
|
||||
Bottom=65
|
||||
|
||||
[Field 3]
|
||||
Type=Link
|
||||
Text=OpenTTD wiki
|
||||
Left=238
|
||||
Right=284
|
||||
Top=64
|
||||
Bottom=72
|
||||
State=http://wiki.openttd.org/index.php/Unicode
|
||||
|
@@ -32,7 +32,7 @@ Sub UpdateFiles(version)
|
||||
modified = Mid(version, InStrRev(version, Chr(9)) + 1)
|
||||
version = Mid(version, 1, InStr(version, Chr(9)) - 1)
|
||||
Else
|
||||
version = "0.7.3"
|
||||
version = "0.7.2-RC1"
|
||||
revision = 0
|
||||
modified = 1
|
||||
End If
|
||||
|
@@ -153,7 +153,7 @@ load_lang_data() {
|
||||
Name=\"VCCustomBuildTool\"
|
||||
Description=\"Generating "$i" language file\"
|
||||
CommandLine=\"..\\objs\\strgen\\strgen.exe -s ..\\src\\lang -d ..\\bin\\lang "\$(InputPath)"
\"
|
||||
AdditionalDependencies=\"..\\src\\lang\\english.txt\"
|
||||
AdditionalDependencies=\"\"
|
||||
Outputs=\"..\\bin\\lang\\"$i".lng\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
@@ -203,7 +203,7 @@ Function load_lang_data(dir)
|
||||
& vbCrLf & " Name=" & Chr(34) & "VCCustomBuildTool" & Chr(34) _
|
||||
& vbCrLf & " Description=" & Chr(34) & "Generating " & file & " language file" & Chr(34) _
|
||||
& vbCrLf & " CommandLine=" & Chr(34) & "..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
" & Chr(34) _
|
||||
& vbCrLf & " AdditionalDependencies=" & Chr(34) & "..\src\lang\english.txt" & Chr(34) _
|
||||
& vbCrLf & " AdditionalDependencies=" & Chr(34) & Chr(34) _
|
||||
& vbCrLf & " Outputs=" & Chr(34) & "..\bin\lang\" & file & ".lng" & Chr(34) _
|
||||
& vbCrLf & " />" _
|
||||
& vbCrLf & " </FileConfiguration>" _
|
||||
|
@@ -56,7 +56,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating afrikaans language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\afrikaans.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -71,7 +71,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating arabic_egypt language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\arabic_egypt.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -86,7 +86,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating brazilian_portuguese language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\brazilian_portuguese.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -101,7 +101,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating bulgarian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\bulgarian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -116,7 +116,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating catalan language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\catalan.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -131,7 +131,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating croatian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\croatian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -146,7 +146,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating czech language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\czech.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -161,7 +161,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating danish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\danish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -176,7 +176,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating dutch language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\dutch.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -191,7 +191,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating english language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\english.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -206,7 +206,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating english_US language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\english_US.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -221,7 +221,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating esperanto language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\esperanto.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -236,7 +236,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating estonian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\estonian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -251,7 +251,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating finnish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\finnish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -266,7 +266,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating french language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\french.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -281,7 +281,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating galician language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\galician.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -296,7 +296,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating german language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\german.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -311,7 +311,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating hebrew language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\hebrew.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -326,7 +326,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating hungarian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\hungarian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -341,7 +341,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating icelandic language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\icelandic.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -356,7 +356,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating indonesian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\indonesian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -371,7 +371,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating italian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\italian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -386,7 +386,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating japanese language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\japanese.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -401,7 +401,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating korean language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\korean.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -416,7 +416,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating latvian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\latvian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -431,7 +431,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating lithuanian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\lithuanian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -446,7 +446,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating luxembourgish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\luxembourgish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -461,7 +461,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating norwegian_bokmal language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\norwegian_bokmal.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -476,7 +476,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating norwegian_nynorsk language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\norwegian_nynorsk.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -491,7 +491,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating piglatin language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\piglatin.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -506,7 +506,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating polish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\polish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -521,7 +521,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating portuguese language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\portuguese.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -536,7 +536,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating romanian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\romanian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -551,7 +551,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating russian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\russian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -566,7 +566,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating serbian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\serbian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -581,7 +581,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating simplified_chinese language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\simplified_chinese.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -596,7 +596,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating slovak language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\slovak.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -611,7 +611,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating slovenian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\slovenian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -626,7 +626,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating spanish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\spanish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -641,7 +641,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating swedish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\swedish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -656,7 +656,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating traditional_chinese language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\traditional_chinese.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -671,7 +671,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating turkish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\turkish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -686,7 +686,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating ukrainian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\ukrainian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -701,7 +701,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating welsh language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\welsh.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
@@ -57,7 +57,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating afrikaans language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\afrikaans.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -72,7 +72,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating arabic_egypt language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\arabic_egypt.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -87,7 +87,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating brazilian_portuguese language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\brazilian_portuguese.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -102,7 +102,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating bulgarian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\bulgarian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -117,7 +117,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating catalan language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\catalan.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -132,7 +132,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating croatian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\croatian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -147,7 +147,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating czech language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\czech.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -162,7 +162,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating danish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\danish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -177,7 +177,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating dutch language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\dutch.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -192,7 +192,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating english language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\english.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -207,7 +207,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating english_US language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\english_US.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -222,7 +222,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating esperanto language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\esperanto.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -237,7 +237,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating estonian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\estonian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -252,7 +252,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating finnish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\finnish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -267,7 +267,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating french language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\french.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -282,7 +282,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating galician language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\galician.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -297,7 +297,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating german language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\german.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -312,7 +312,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating hebrew language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\hebrew.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -327,7 +327,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating hungarian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\hungarian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -342,7 +342,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating icelandic language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\icelandic.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -357,7 +357,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating indonesian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\indonesian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -372,7 +372,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating italian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\italian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -387,7 +387,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating japanese language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\japanese.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -402,7 +402,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating korean language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\korean.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -417,7 +417,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating latvian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\latvian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -432,7 +432,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating lithuanian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\lithuanian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -447,7 +447,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating luxembourgish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\luxembourgish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -462,7 +462,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating norwegian_bokmal language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\norwegian_bokmal.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -477,7 +477,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating norwegian_nynorsk language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\norwegian_nynorsk.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -492,7 +492,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating piglatin language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\piglatin.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -507,7 +507,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating polish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\polish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -522,7 +522,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating portuguese language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\portuguese.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -537,7 +537,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating romanian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\romanian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -552,7 +552,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating russian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\russian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -567,7 +567,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating serbian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\serbian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -582,7 +582,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating simplified_chinese language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\simplified_chinese.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -597,7 +597,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating slovak language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\slovak.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -612,7 +612,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating slovenian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\slovenian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -627,7 +627,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating spanish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\spanish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -642,7 +642,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating swedish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\swedish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -657,7 +657,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating traditional_chinese language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\traditional_chinese.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -672,7 +672,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating turkish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\turkish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -687,7 +687,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating ukrainian language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\ukrainian.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
@@ -702,7 +702,7 @@
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating welsh language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
AdditionalDependencies=""
|
||||
Outputs="..\bin\lang\welsh.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
@@ -60,7 +60,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -273,7 +273,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -2563,10 +2563,6 @@
|
||||
RelativePath=".\..\src\ai\api\ai_cargolist.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\ai\api\ai_changelog.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\ai\api\ai_company.hpp"
|
||||
>
|
||||
@@ -2635,10 +2631,6 @@
|
||||
RelativePath=".\..\src\ai\api\ai_industrytypelist.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\ai\api\ai_info_docs.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\ai\api\ai_list.hpp"
|
||||
>
|
||||
|
@@ -60,7 +60,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -273,7 +273,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
|
@@ -61,7 +61,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -271,7 +271,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -2560,10 +2560,6 @@
|
||||
RelativePath=".\..\src\ai\api\ai_cargolist.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\ai\api\ai_changelog.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\ai\api\ai_company.hpp"
|
||||
>
|
||||
@@ -2632,10 +2628,6 @@
|
||||
RelativePath=".\..\src\ai\api\ai_industrytypelist.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\ai\api\ai_info_docs.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\ai\api\ai_list.hpp"
|
||||
>
|
||||
|
@@ -61,7 +61,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -271,7 +271,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
|
106
readme.txt
106
readme.txt
@@ -1,6 +1,6 @@
|
||||
OpenTTD README
|
||||
Last updated: 2009-10-01
|
||||
Release version: 0.7.3
|
||||
Last updated: 2009-06-09
|
||||
Release version: 0.7.1
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ Table of Contents:
|
||||
5.0) OpenTTD features
|
||||
6.0) Configuration File
|
||||
7.0) Compiling
|
||||
* 7.1) Required/optional libraries
|
||||
8.0) Translating
|
||||
* 8.1 Guidelines
|
||||
* 8.2 Translation
|
||||
@@ -49,41 +48,25 @@ http://forum.openttd.org/
|
||||
|
||||
2.1) Reporting Bugs:
|
||||
---- ---------------
|
||||
First of all, check whether the bug is not already known. Do this by looking
|
||||
through the file called 'known-bugs.txt' which is distributed with OpenTTD
|
||||
like this readme.
|
||||
To report a bug, please create a Flyspray account and follow the bugs
|
||||
link from our homepage. Please make sure the bug is reproducible and
|
||||
still occurs in the latest daily build or the current SVN version. Also
|
||||
please look through the existing bug reports briefly to see whether the bug
|
||||
is not already known.
|
||||
|
||||
For tracking our bugs we are using a bug tracker called Flyspray. You can find
|
||||
the tracker at http://bugs.openttd.org/. Before actually reporting take a look
|
||||
through the already reported bugs there to see if the bug is already known.
|
||||
The 'known-bugs.txt' file might be a bit outdated at the moment you are
|
||||
reading it as only bugs known before the release are documented there. Also
|
||||
look through the recently closed bugs.
|
||||
The Flyspray project page URL is: http://bugs.openttd.org/
|
||||
|
||||
When you are sure it is not already reported you should:
|
||||
* Make sure you are running a recent version, i.e. run the latest stable or
|
||||
nightly based on where you found the bug.
|
||||
* Make sure you are not running a non-official binary, like a patch pack.
|
||||
When you are playing with a patch pack you should report any bugs to the
|
||||
forum thread related to that patch pack.
|
||||
* Make it reproducable for the developers. In other words, create a savegame
|
||||
in which you can reproduce the issue once loaded. It is very useful to give
|
||||
us the crash.dmp, crash.sav and crash.log which are created on crashes.
|
||||
* Check whether the bug is already reported on our bug tracker. This includes
|
||||
searching for recently closed bug reports as the bug might already be fixed.
|
||||
|
||||
After you have done all that you can report the bug. Please include the
|
||||
following information in your bug report:
|
||||
* OpenTTD version (PLEASE test the latest SVN/nightly build)
|
||||
* Bug details, including instructions how to reproduce it
|
||||
* Platform (Win32, Linux, FreeBSD, ...) and compiler (including version) if
|
||||
you compiled OpenTTD yourself.
|
||||
* Attach a saved game *and* a screenshot if possible
|
||||
* If this bug only occurred recently please note the last version without
|
||||
the bug and the first version including the bug. That way we can fix it
|
||||
quicker by looking at the changes made.
|
||||
* Attach crash.dmp, crash.log and crash.sav. These files are usually created
|
||||
next to your openttd.cfg. The crash handler will tell you the location.
|
||||
Please include the following information in your bug report:
|
||||
- OpenTTD version (PLEASE test the latest SVN/nightly build)
|
||||
- Bug details, including instructions how to reproduce it
|
||||
- Platform and compiler (Win32, Linux, FreeBSD, ...)
|
||||
- Attach a saved game *and* a screenshot if possible
|
||||
- If this bug only occurred recently please note the last
|
||||
version without the bug and the first version including
|
||||
the bug. That way we can fix it quicker by looking at the
|
||||
changes made.
|
||||
- Attach crash.dmp, crash.log and crash.sav from the data
|
||||
directory if they exist.
|
||||
|
||||
2.2) Reporting Desyncs:
|
||||
---- ------------------
|
||||
@@ -208,19 +191,6 @@ Do NOT copy files included with OpenTTD into "shared" directories (explained in
|
||||
the following sections) as sooner or later you will run into graphical glitches
|
||||
when using other versions of the game.
|
||||
|
||||
If you want AIs use the in-game content downloader. If for some reason that is
|
||||
not possible or you want to use an AI that has not been uploaded to the content
|
||||
download system download the tar file and place it in the ai/ directory. If the
|
||||
AI needs libraries you'll have to download those too and put them in the
|
||||
ai/library/ directory. All AIs and AI Libraries that have been uploaded to
|
||||
the content download system can be found at http://noai.openttd.org/downloads/
|
||||
The AIs and libraries can be found their in the form of .tar.gz packages.
|
||||
OpenTTD can read inside tar files but it does not extract .tar.gz files by
|
||||
itself.
|
||||
To figure out which libraries you need for an AI you have to start the AI and
|
||||
wait for an error message to pop up. The error message will tell you
|
||||
"couldn't find library 'lib-name'". Download that library and try again.
|
||||
|
||||
4.2) OpenTTD directories
|
||||
---- -------------------------------
|
||||
|
||||
@@ -346,12 +316,18 @@ Windows:
|
||||
You can also build it using the Makefile with MSYS/MinGW or Cygwin/MinGW.
|
||||
Please read the Makefile for more information.
|
||||
|
||||
Solaris, FreeBSD, OpenBSD:
|
||||
Use "gmake", but do a "./configure" before the first build.
|
||||
Solaris 10:
|
||||
You need g++ (version 3 or higher), together with SDL. Installation of
|
||||
libpng and zlib is recommended. For the first build it is required
|
||||
to execute "bash configure" first. Note that ./configure does not work
|
||||
yet. It is likely that you don't have a strip binary, so use the
|
||||
--disable-strip option in that case. Fontconfig (>2.3.0) and freetype
|
||||
are optional. "make run" will then run the program.
|
||||
|
||||
Linux/Unix:
|
||||
Unix:
|
||||
OpenTTD can be built with GNU "make". On non-GNU systems it's called "gmake".
|
||||
However, for the first build one has to do a "./configure" first.
|
||||
Note that you need SDL-devel 1.2.5 (or higher) to compile OpenTTD.
|
||||
|
||||
MacOS X:
|
||||
Use "make" or Xcode (which will then call make for you)
|
||||
@@ -363,6 +339,15 @@ MacOS X:
|
||||
BeOS:
|
||||
Use "make", but do a "./configure" before the first build.
|
||||
|
||||
FreeBSD:
|
||||
You need the port devel/sdl12 for a non-dedicated build.
|
||||
graphics/png is optional for screenshots in the PNG format.
|
||||
Use "gmake", but do a "./configure" before the first build.
|
||||
|
||||
OpenBSD:
|
||||
Use "gmake", but do a "./configure" before the first build.
|
||||
Note that you need the port devel/sdl to compile OpenTTD.
|
||||
|
||||
MorphOS:
|
||||
Use "make". However, for the first build one has to do a "./configure" first.
|
||||
Note that you need the MorphOS SDK, latest libnix updates (else C++ parts of
|
||||
@@ -383,8 +368,6 @@ DOS:
|
||||
will be generated that does not need cwsdpmi.exe by adding the cswdstub.exe
|
||||
to the created OpenTTD binary.
|
||||
|
||||
7.1) Required/optional libraries:
|
||||
---- -------------------
|
||||
The following libraries are used by OpenTTD for:
|
||||
- libSDL/liballegro: hardware access (video, sound, mouse)
|
||||
- zlib: (de)compressing of savegames
|
||||
@@ -393,11 +376,6 @@ The following libraries are used by OpenTTD for:
|
||||
- libfontconfig: searching for fonts, resolving font names to actual fonts
|
||||
- libicu: handling of right-to-left scripts (e.g. Arabic and Persian)
|
||||
|
||||
OpenTTD does not require any of the libraries to be present, but without
|
||||
zlib you cannot open most savegames or use the content downloading system.
|
||||
Without libSDL/liballegro on non-Windows and non-MacOS X machines you have
|
||||
no graphical user interface; you would be building a dedicated server.
|
||||
|
||||
8.0) Translating:
|
||||
---- -------------------
|
||||
See http://www.openttd.org/development for up-to-date information.
|
||||
@@ -499,14 +477,14 @@ The OpenTTD team (in alphabetical order):
|
||||
Owen Rudge (orudge) - Forum host, OS/2 port
|
||||
Peter Nelson (peter1138) - Spiritual descendant from newGRF gods
|
||||
Remko Bijker (Rubidium) - Lead coder and way more
|
||||
Zdeněk Sojka (SmatZ) - Bug finder and fixer
|
||||
Zdenek Sojka (SmatZ) - Bug finder and fixer
|
||||
Thijs Marinussen (Yexo) - AI Framework
|
||||
|
||||
Inactive Developers:
|
||||
Tamás Faragó (Darkvater) - Ex-Lead coder
|
||||
Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;)
|
||||
Jonathan Coome (Maedhros) - High priest of the NewGRF Temple
|
||||
Attila Bán (MiHaMiX) - WebTranslator 1 and 2
|
||||
Attila Bán (MiHaMiX) - WebTranslator, Nightlies, Wiki and bugtracker host
|
||||
Christoph Mallon (Tron) - Programmer, code correctness police
|
||||
|
||||
Retired Developers:
|
||||
@@ -514,12 +492,12 @@ Retired Developers:
|
||||
Serge Paquet (vurlix) - Assistant project manager, coder (0.1 - 0.3.3)
|
||||
Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3.0 - 0.3.6)
|
||||
Benedikt Brüggemeier (skidd13) - Bug fixer and code reworker
|
||||
Patric Stout (TrueLight) - Programmer (0.3 - pre0.7), sys op (active)
|
||||
Patric Stout (TrueLight) - Programmer, webhoster (0.3 - pre0.7)
|
||||
|
||||
Thanks to:
|
||||
Josef Drexler - For his great work on TTDPatch.
|
||||
Marcin Grzegorczyk - For his TTDPatch work and documentation of TTD internals and graphics (signals and track foundations)
|
||||
Petr Baudiš (pasky) - Many patches, newgrf support, etc.
|
||||
Petr Baudis (pasky) - Many patches, newgrf support, etc.
|
||||
Simon Sasburg (HackyKid) - For the many bugfixes he has blessed us with
|
||||
Stefan Meißner (sign_de) - For his work on the console
|
||||
Mike Ragsdale - OpenTTD installer
|
||||
@@ -527,8 +505,6 @@ Thanks to:
|
||||
Christian Rosentreter (tokai) - MorphOS / AmigaOS port
|
||||
Richard Kempton (RichK67) - Additional airports, initial TGP implementation
|
||||
Alberto Demichelis - Squirrel scripting language
|
||||
Markus F.X.J. Oberhumer - MiniLZO for loading old savegames
|
||||
L. Peter Deutsch - MD5 implementation
|
||||
Michael Blunck - For revolutionizing TTD with awesome graphics
|
||||
George - Canal graphics
|
||||
David Dallaston (Pikka) - Tram tracks
|
||||
|
@@ -594,7 +594,6 @@ ai/api/ai_bridge.hpp
|
||||
ai/api/ai_bridgelist.hpp
|
||||
ai/api/ai_cargo.hpp
|
||||
ai/api/ai_cargolist.hpp
|
||||
ai/api/ai_changelog.hpp
|
||||
ai/api/ai_company.hpp
|
||||
ai/api/ai_controller.hpp
|
||||
ai/api/ai_date.hpp
|
||||
@@ -612,7 +611,6 @@ ai/api/ai_industry.hpp
|
||||
ai/api/ai_industrylist.hpp
|
||||
ai/api/ai_industrytype.hpp
|
||||
ai/api/ai_industrytypelist.hpp
|
||||
ai/api/ai_info_docs.hpp
|
||||
ai/api/ai_list.hpp
|
||||
ai/api/ai_log.hpp
|
||||
ai/api/ai_map.hpp
|
||||
|
1
src/3rdparty/squirrel/include/squirrel.h
vendored
1
src/3rdparty/squirrel/include/squirrel.h
vendored
@@ -286,7 +286,6 @@ SQUIRREL_API void sq_setprintfunc(HSQUIRRELVM v, SQPRINTFUNCTION printfunc);
|
||||
SQUIRREL_API SQPRINTFUNCTION sq_getprintfunc(HSQUIRRELVM v);
|
||||
SQUIRREL_API SQRESULT sq_suspendvm(HSQUIRRELVM v);
|
||||
SQUIRREL_API bool sq_resumecatch(HSQUIRRELVM v, int suspend = -1);
|
||||
SQUIRREL_API bool sq_resumeerror(HSQUIRRELVM v);
|
||||
SQUIRREL_API SQRESULT sq_wakeupvm(HSQUIRRELVM v,SQBool resumedret,SQBool retval,SQBool raiseerror);
|
||||
SQUIRREL_API SQInteger sq_getvmstate(HSQUIRRELVM v);
|
||||
|
||||
|
8
src/3rdparty/squirrel/squirrel/sqapi.cpp
vendored
8
src/3rdparty/squirrel/squirrel/sqapi.cpp
vendored
@@ -1010,14 +1010,6 @@ bool sq_resumecatch(HSQUIRRELVM v, int suspend)
|
||||
return v->Execute(_null_, v->_top, -1, -1, ret, SQTrue, SQVM::ET_RESUME_OPENTTD);
|
||||
}
|
||||
|
||||
bool sq_resumeerror(HSQUIRRELVM v)
|
||||
{
|
||||
SQObjectPtr ret;
|
||||
v->_can_suspend = true;
|
||||
v->_ops_till_suspend = 1;
|
||||
return v->Execute(_null_, v->_top, -1, -1, ret, SQTrue, SQVM::ET_RESUME_THROW_VM);
|
||||
}
|
||||
|
||||
void sq_setreleasehook(HSQUIRRELVM v,SQInteger idx,SQRELEASEHOOK hook)
|
||||
{
|
||||
if(sq_gettop(v) >= 1){
|
||||
|
12
src/3rdparty/squirrel/squirrel/sqclass.h
vendored
12
src/3rdparty/squirrel/squirrel/sqclass.h
vendored
@@ -128,17 +128,7 @@ public:
|
||||
}
|
||||
void Release() {
|
||||
_uiRef++;
|
||||
try {
|
||||
if (_hook) { _hook(_userpointer,0);}
|
||||
} catch (...) {
|
||||
_uiRef--;
|
||||
if (_uiRef == 0) {
|
||||
SQInteger size = _memsize;
|
||||
this->~SQInstance();
|
||||
SQ_FREE(this, size);
|
||||
}
|
||||
throw;
|
||||
}
|
||||
if (_hook) { _hook(_userpointer,0);}
|
||||
_uiRef--;
|
||||
if(_uiRef > 0) return;
|
||||
SQInteger size = _memsize;
|
||||
|
17
src/3rdparty/squirrel/squirrel/sqcompiler.cpp
vendored
17
src/3rdparty/squirrel/squirrel/sqcompiler.cpp
vendored
@@ -1110,23 +1110,6 @@ public:
|
||||
case TK_STRING_LITERAL:
|
||||
val = _fs->CreateString(_lex._svalue,_lex._longstr.size()-1);
|
||||
break;
|
||||
case '-':
|
||||
Lex();
|
||||
switch(_token)
|
||||
{
|
||||
case TK_INTEGER:
|
||||
val._type = OT_INTEGER;
|
||||
val._unVal.nInteger = -_lex._nvalue;
|
||||
break;
|
||||
case TK_FLOAT:
|
||||
val._type = OT_FLOAT;
|
||||
val._unVal.fFloat = -_lex._fvalue;
|
||||
break;
|
||||
default:
|
||||
Error(_SC("scalar expected : integer,float"));
|
||||
val._type = OT_NULL; // Silent compile-warning
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Error(_SC("scalar expected : integer,float or string"));
|
||||
val._type = OT_NULL; // Silent compile-warning
|
||||
|
2
src/3rdparty/squirrel/squirrel/squtils.h
vendored
2
src/3rdparty/squirrel/squirrel/squtils.h
vendored
@@ -88,7 +88,7 @@ public:
|
||||
}
|
||||
SQUnsignedInteger capacity() { return _allocated; }
|
||||
inline T &back() const { return _vals[_size - 1]; }
|
||||
inline T& operator[](SQUnsignedInteger pos) const{ assert(pos < _allocated); return _vals[pos]; }
|
||||
inline T& operator[](SQUnsignedInteger pos) const{ return _vals[pos]; }
|
||||
T* _vals;
|
||||
private:
|
||||
void _realloc(SQUnsignedInteger newsize)
|
||||
|
32
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
32
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
@@ -50,9 +50,7 @@ bool SQVM::ARITH_OP(SQUnsignedInteger op,SQObjectPtr &trg,const SQObjectPtr &o1,
|
||||
res = i1 / i2;
|
||||
break;
|
||||
case '*': res = i1 * i2; break;
|
||||
case '%': if(i2 == 0) { Raise_Error(_SC("modulo by zero")); return false; }
|
||||
res = i1 % i2;
|
||||
break;
|
||||
case '%': res = i1 % i2; break;
|
||||
default: res = 0xDEADBEEF;
|
||||
}
|
||||
trg = res;
|
||||
@@ -323,10 +321,6 @@ bool SQVM::StartCall(SQClosure *closure,SQInteger target,SQInteger args,SQIntege
|
||||
SQInteger ndef = func->_ndefaultparams;
|
||||
if(ndef && nargs < paramssize) {
|
||||
SQInteger diff = paramssize - nargs;
|
||||
if (diff > ndef) {
|
||||
Raise_Error(_SC("wrong number of parameters"));
|
||||
return false;
|
||||
}
|
||||
for(SQInteger n = ndef - diff; n < ndef; n++) {
|
||||
_stack._vals[stackbase + (nargs++)] = closure->_defaultparams[n];
|
||||
}
|
||||
@@ -688,12 +682,10 @@ bool SQVM::Execute(SQObjectPtr &closure, SQInteger target, SQInteger nargs, SQIn
|
||||
break;
|
||||
case ET_RESUME_GENERATOR: _generator(closure)->Resume(this, target); ci->_root = SQTrue; traps += ci->_etraps; break;
|
||||
case ET_RESUME_VM:
|
||||
case ET_RESUME_THROW_VM:
|
||||
traps = _suspended_traps;
|
||||
ci->_root = _suspended_root;
|
||||
ci->_vargs = _suspend_varargs;
|
||||
_suspended = SQFalse;
|
||||
if(et == ET_RESUME_THROW_VM) { SQ_THROW(); }
|
||||
break;
|
||||
case ET_RESUME_OPENTTD:
|
||||
traps = _suspended_traps;
|
||||
@@ -749,8 +741,9 @@ common_call:
|
||||
_GUARD(gen->Yield(this));
|
||||
Return(1, ct_target, clo);
|
||||
STK(ct_target) = gen;
|
||||
while (last_top >= _top) _stack._vals[last_top--].Null();
|
||||
continue;
|
||||
}
|
||||
while (last_top >= _top) _stack._vals[last_top--].Null();
|
||||
}
|
||||
continue;
|
||||
case OT_NATIVECLOSURE: {
|
||||
@@ -1142,8 +1135,6 @@ bool SQVM::CallNative(SQNativeClosure *nclosure,SQInteger nargs,SQInteger stackb
|
||||
}
|
||||
|
||||
|
||||
/* Store the call stack size, so we can restore that */
|
||||
SQInteger cstksize = _callsstacksize;
|
||||
SQInteger ret;
|
||||
try {
|
||||
SQBool can_suspend = this->_can_suspend;
|
||||
@@ -1154,7 +1145,6 @@ bool SQVM::CallNative(SQNativeClosure *nclosure,SQInteger nargs,SQInteger stackb
|
||||
_nnativecalls--;
|
||||
suspend = false;
|
||||
|
||||
_callsstacksize = cstksize;
|
||||
_stackbase = oldstackbase;
|
||||
_top = oldtop;
|
||||
|
||||
@@ -1164,8 +1154,6 @@ bool SQVM::CallNative(SQNativeClosure *nclosure,SQInteger nargs,SQInteger stackb
|
||||
throw;
|
||||
}
|
||||
|
||||
assert(cstksize == _callsstacksize);
|
||||
|
||||
_nnativecalls--;
|
||||
suspend = false;
|
||||
if( ret == SQ_SUSPEND_FLAG) suspend = true;
|
||||
@@ -1508,19 +1496,7 @@ void SQVM::Pop(SQInteger n) {
|
||||
}
|
||||
}
|
||||
|
||||
void SQVM::Push(const SQObjectPtr &o) {
|
||||
/* Normally the stack shouldn't get this full, sometimes it might. As of now
|
||||
* all cases have been bugs in "our" (OpenTTD) code. Trigger an assert for
|
||||
* all debug builds and for the release builds just increase the stack size.
|
||||
* This way getting a false positive isn't that bad (releases work fine) and
|
||||
* if there is something fishy it can be caught in RCs/nightlies. */
|
||||
#ifdef NDEBUG
|
||||
if (_top >= (int)_stack.capacity()) _stack.resize(2 * _stack.capacity());
|
||||
#else
|
||||
assert(_top < (int)_stack.capacity());
|
||||
#endif
|
||||
_stack[_top++] = o;
|
||||
}
|
||||
void SQVM::Push(const SQObjectPtr &o) { _stack[_top++] = o; }
|
||||
SQObjectPtr &SQVM::Top() { return _stack[_top-1]; }
|
||||
SQObjectPtr &SQVM::PopGet() { return _stack[--_top]; }
|
||||
SQObjectPtr &SQVM::GetUp(SQInteger n) { return _stack[_top+n]; }
|
||||
|
2
src/3rdparty/squirrel/squirrel/sqvm.h
vendored
2
src/3rdparty/squirrel/squirrel/sqvm.h
vendored
@@ -53,7 +53,7 @@ struct SQVM : public CHAINABLE_OBJ
|
||||
|
||||
typedef sqvector<CallInfo> CallInfoVec;
|
||||
public:
|
||||
enum ExecutionType { ET_CALL, ET_RESUME_GENERATOR, ET_RESUME_VM, ET_RESUME_THROW_VM, ET_RESUME_OPENTTD };
|
||||
enum ExecutionType { ET_CALL, ET_RESUME_GENERATOR, ET_RESUME_VM, ET_RESUME_OPENTTD };
|
||||
SQVM(SQSharedState *ss);
|
||||
~SQVM();
|
||||
bool Init(SQVM *friendvm, SQInteger stacksize);
|
||||
|
@@ -742,7 +742,7 @@ struct AIDebugWindow : public Window {
|
||||
if (widget == AID_WIDGET_RELOAD_TOGGLE && !this->IsWidgetDisabled(widget)) {
|
||||
/* First kill the company of the AI, then start a new one. This should start the current AI again */
|
||||
DoCommandP(0, 2, ai_debug_company, CMD_COMPANY_CTRL);
|
||||
DoCommandP(0, 1, ai_debug_company, CMD_COMPANY_CTRL);
|
||||
DoCommandP(0, 1, 0, CMD_COMPANY_CTRL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -119,35 +119,25 @@ AIInstance::AIInstance(AIInfo *info) :
|
||||
/* Register the AIController */
|
||||
SQAIController_Register(this->engine);
|
||||
|
||||
/* Load and execute the script for this AI */
|
||||
const char *main_script = info->GetMainScript();
|
||||
if (strcmp(main_script, "%_dummy") == 0) {
|
||||
extern void AI_CreateAIDummy(HSQUIRRELVM vm);
|
||||
AI_CreateAIDummy(this->engine->GetVM());
|
||||
} else if (!this->engine->LoadScript(main_script)) {
|
||||
this->Died();
|
||||
return;
|
||||
}
|
||||
|
||||
/* Create the main-class */
|
||||
this->instance = MallocT<SQObject>(1);
|
||||
if (!this->engine->CreateClassInstance(info->GetInstanceName(), this->controller, this->instance)) {
|
||||
this->Died();
|
||||
return;
|
||||
}
|
||||
|
||||
/* Register the API functions and classes */
|
||||
this->RegisterAPI();
|
||||
|
||||
try {
|
||||
AIObject::SetAllowDoCommand(false);
|
||||
/* Load and execute the script for this AI */
|
||||
const char *main_script = info->GetMainScript();
|
||||
if (strcmp(main_script, "%_dummy") == 0) {
|
||||
extern void AI_CreateAIDummy(HSQUIRRELVM vm);
|
||||
AI_CreateAIDummy(this->engine->GetVM());
|
||||
} else if (!this->engine->LoadScript(main_script) || this->engine->IsSuspended()) {
|
||||
if (this->engine->IsSuspended()) AILog::Error("This AI took too long to load script. AI is not started.");
|
||||
this->Died();
|
||||
return;
|
||||
}
|
||||
|
||||
/* Create the main-class */
|
||||
this->instance = MallocT<SQObject>(1);
|
||||
if (!this->engine->CreateClassInstance(info->GetInstanceName(), this->controller, this->instance)) {
|
||||
this->Died();
|
||||
return;
|
||||
}
|
||||
AIObject::SetAllowDoCommand(true);
|
||||
} catch (AI_FatalError e) {
|
||||
this->is_dead = true;
|
||||
this->engine->ThrowError(e.GetErrorMessage());
|
||||
this->engine->ResumeError();
|
||||
this->Died();
|
||||
}
|
||||
}
|
||||
|
||||
AIInstance::~AIInstance()
|
||||
@@ -279,7 +269,7 @@ void AIInstance::Died()
|
||||
|
||||
void AIInstance::GameLoop()
|
||||
{
|
||||
if (this->IsDead()) return;
|
||||
if (this->is_dead) return;
|
||||
if (this->engine->HasScriptCrashed()) {
|
||||
/* The script crashed during saving, kill it here. */
|
||||
this->Died();
|
||||
@@ -332,11 +322,6 @@ void AIInstance::GameLoop()
|
||||
} catch (AI_VMSuspend e) {
|
||||
this->suspend = e.GetSuspendTime();
|
||||
this->callback = e.GetSuspendCallback();
|
||||
} catch (AI_FatalError e) {
|
||||
this->is_dead = true;
|
||||
this->engine->ThrowError(e.GetErrorMessage());
|
||||
this->engine->ResumeError();
|
||||
this->Died();
|
||||
}
|
||||
|
||||
this->is_started = true;
|
||||
@@ -353,17 +338,12 @@ void AIInstance::GameLoop()
|
||||
} catch (AI_VMSuspend e) {
|
||||
this->suspend = e.GetSuspendTime();
|
||||
this->callback = e.GetSuspendCallback();
|
||||
} catch (AI_FatalError e) {
|
||||
this->is_dead = true;
|
||||
this->engine->ThrowError(e.GetErrorMessage());
|
||||
this->engine->ResumeError();
|
||||
this->Died();
|
||||
}
|
||||
}
|
||||
|
||||
void AIInstance::CollectGarbage()
|
||||
{
|
||||
if (this->is_started && !this->IsDead()) this->engine->CollectGarbage();
|
||||
if (this->is_started && !this->is_dead) this->engine->CollectGarbage();
|
||||
}
|
||||
|
||||
/* static */ void AIInstance::DoCommandReturn(AIInstance *instance)
|
||||
@@ -582,25 +562,10 @@ void AIInstance::Save()
|
||||
/* We don't want to be interrupted during the save function. */
|
||||
bool backup_allow = AIObject::GetAllowDoCommand();
|
||||
AIObject::SetAllowDoCommand(false);
|
||||
try {
|
||||
if (!this->engine->CallMethod(*this->instance, "Save", &savedata)) {
|
||||
/* The script crashed in the Save function. We can't kill
|
||||
* it here, but do so in the next AI tick. */
|
||||
SaveEmpty();
|
||||
this->engine->CrashOccurred();
|
||||
return;
|
||||
}
|
||||
} catch (AI_FatalError e) {
|
||||
/* If we don't mark the AI as dead here cleaning up the squirrel
|
||||
* stack could throw AI_FatalError again. */
|
||||
this->is_dead = true;
|
||||
this->engine->ThrowError(e.GetErrorMessage());
|
||||
this->engine->ResumeError();
|
||||
if (!this->engine->CallMethod(*this->instance, "Save", &savedata)) {
|
||||
/* The script crashed in the Save function. We can't kill
|
||||
* it here, but do so in the next AI tick. */
|
||||
SaveEmpty();
|
||||
/* We can't kill the AI here, so mark it as crashed (not dead) and
|
||||
* kill it in the next AI tick. */
|
||||
this->is_dead = false;
|
||||
this->engine->CrashOccurred();
|
||||
return;
|
||||
}
|
||||
AIObject::SetAllowDoCommand(backup_allow);
|
||||
|
@@ -18,7 +18,7 @@ public:
|
||||
AI_VMSuspend(int time, AISuspendCallbackProc *callback) :
|
||||
time(time),
|
||||
callback(callback)
|
||||
{}
|
||||
{}
|
||||
|
||||
int GetSuspendTime() { return time; }
|
||||
AISuspendCallbackProc *GetSuspendCallback() { return callback; }
|
||||
@@ -28,21 +28,6 @@ private:
|
||||
AISuspendCallbackProc *callback;
|
||||
};
|
||||
|
||||
/**
|
||||
* A throw-class that is given when the AI made a fatal error.
|
||||
*/
|
||||
class AI_FatalError {
|
||||
public:
|
||||
AI_FatalError(const char *msg) :
|
||||
msg(msg)
|
||||
{}
|
||||
|
||||
const char *GetErrorMessage() { return msg; }
|
||||
|
||||
private:
|
||||
const char *msg;
|
||||
};
|
||||
|
||||
class AIInstance {
|
||||
public:
|
||||
friend class AIObject;
|
||||
@@ -95,11 +80,6 @@ public:
|
||||
*/
|
||||
class AIController *GetController() { return controller; }
|
||||
|
||||
/**
|
||||
* Return the "this AI died" value
|
||||
*/
|
||||
inline bool IsDead() { return this->is_dead; }
|
||||
|
||||
/**
|
||||
* Call the AI Save function and save all data in the savegame.
|
||||
*/
|
||||
|
@@ -375,7 +375,6 @@ AIAbstractList::AIAbstractList()
|
||||
this->sorter_type = SORT_BY_VALUE;
|
||||
this->sort_ascending = false;
|
||||
this->initialized = false;
|
||||
this->modifications = 0;
|
||||
}
|
||||
|
||||
AIAbstractList::~AIAbstractList()
|
||||
@@ -390,8 +389,6 @@ bool AIAbstractList::HasItem(int32 item)
|
||||
|
||||
void AIAbstractList::Clear()
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
this->items.clear();
|
||||
this->buckets.clear();
|
||||
this->sorter->End();
|
||||
@@ -399,8 +396,6 @@ void AIAbstractList::Clear()
|
||||
|
||||
void AIAbstractList::AddItem(int32 item)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
if (this->HasItem(item)) return;
|
||||
|
||||
this->items[item] = 0;
|
||||
@@ -409,8 +404,6 @@ void AIAbstractList::AddItem(int32 item)
|
||||
|
||||
void AIAbstractList::RemoveItem(int32 item)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
if (!this->HasItem(item)) return;
|
||||
|
||||
int32 value = this->GetValue(item);
|
||||
@@ -464,8 +457,6 @@ int32 AIAbstractList::GetValue(int32 item)
|
||||
|
||||
bool AIAbstractList::SetValue(int32 item, int32 value)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
if (!this->HasItem(item)) return false;
|
||||
|
||||
int32 value_old = this->GetValue(item);
|
||||
@@ -481,8 +472,6 @@ bool AIAbstractList::SetValue(int32 item, int32 value)
|
||||
|
||||
void AIAbstractList::Sort(SorterType sorter, bool ascending)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
if (sorter != SORT_BY_VALUE && sorter != SORT_BY_ITEM) return;
|
||||
if (sorter == this->sorter_type && ascending == this->sort_ascending) return;
|
||||
|
||||
@@ -517,8 +506,6 @@ void AIAbstractList::AddList(AIAbstractList *list)
|
||||
|
||||
void AIAbstractList::RemoveAboveValue(int32 value)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
for (AIAbstractListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
|
||||
next_iter = iter; next_iter++;
|
||||
if ((*iter).second > value) this->items.erase(iter);
|
||||
@@ -532,8 +519,6 @@ void AIAbstractList::RemoveAboveValue(int32 value)
|
||||
|
||||
void AIAbstractList::RemoveBelowValue(int32 value)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
for (AIAbstractListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
|
||||
next_iter = iter; next_iter++;
|
||||
if ((*iter).second < value) this->items.erase(iter);
|
||||
@@ -547,8 +532,6 @@ void AIAbstractList::RemoveBelowValue(int32 value)
|
||||
|
||||
void AIAbstractList::RemoveBetweenValue(int32 start, int32 end)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
for (AIAbstractListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
|
||||
next_iter = iter; next_iter++;
|
||||
if ((*iter).second > start && (*iter).second < end) this->items.erase(iter);
|
||||
@@ -562,8 +545,6 @@ void AIAbstractList::RemoveBetweenValue(int32 start, int32 end)
|
||||
|
||||
void AIAbstractList::RemoveValue(int32 value)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
for (AIAbstractListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
|
||||
next_iter = iter; next_iter++;
|
||||
if ((*iter).second == value) this->items.erase(iter);
|
||||
@@ -577,8 +558,6 @@ void AIAbstractList::RemoveValue(int32 value)
|
||||
|
||||
void AIAbstractList::RemoveTop(int32 count)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
if (!this->sort_ascending) {
|
||||
this->Sort(this->sorter_type, !this->sort_ascending);
|
||||
this->RemoveBottom(count);
|
||||
@@ -614,8 +593,6 @@ void AIAbstractList::RemoveTop(int32 count)
|
||||
|
||||
void AIAbstractList::RemoveBottom(int32 count)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
if (!this->sort_ascending) {
|
||||
this->Sort(this->sorter_type, !this->sort_ascending);
|
||||
this->RemoveTop(count);
|
||||
@@ -650,8 +627,6 @@ void AIAbstractList::RemoveBottom(int32 count)
|
||||
|
||||
void AIAbstractList::RemoveList(AIAbstractList *list)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
AIAbstractListMap *list_items = &list->items;
|
||||
for (AIAbstractListMap::iterator iter = list_items->begin(); iter != list_items->end(); iter++) {
|
||||
this->RemoveItem((*iter).first);
|
||||
@@ -660,8 +635,6 @@ void AIAbstractList::RemoveList(AIAbstractList *list)
|
||||
|
||||
void AIAbstractList::KeepAboveValue(int32 value)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
for (AIAbstractListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
|
||||
next_iter = iter; next_iter++;
|
||||
if ((*iter).second <= value) this->items.erase(iter);
|
||||
@@ -675,8 +648,6 @@ void AIAbstractList::KeepAboveValue(int32 value)
|
||||
|
||||
void AIAbstractList::KeepBelowValue(int32 value)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
for (AIAbstractListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
|
||||
next_iter = iter; next_iter++;
|
||||
if ((*iter).second >= value) this->items.erase(iter);
|
||||
@@ -690,8 +661,6 @@ void AIAbstractList::KeepBelowValue(int32 value)
|
||||
|
||||
void AIAbstractList::KeepBetweenValue(int32 start, int32 end)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
for (AIAbstractListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
|
||||
next_iter = iter; next_iter++;
|
||||
if ((*iter).second <= start || (*iter).second >= end) this->items.erase(iter);
|
||||
@@ -705,8 +674,6 @@ void AIAbstractList::KeepBetweenValue(int32 start, int32 end)
|
||||
|
||||
void AIAbstractList::KeepValue(int32 value)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
for (AIAbstractListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
|
||||
next_iter = iter; next_iter++;
|
||||
if ((*iter).second != value) this->items.erase(iter);
|
||||
@@ -720,22 +687,16 @@ void AIAbstractList::KeepValue(int32 value)
|
||||
|
||||
void AIAbstractList::KeepTop(int32 count)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
this->RemoveBottom(this->Count() - count);
|
||||
}
|
||||
|
||||
void AIAbstractList::KeepBottom(int32 count)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
this->RemoveTop(this->Count() - count);
|
||||
}
|
||||
|
||||
void AIAbstractList::KeepList(AIAbstractList *list)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
AIAbstractList tmp;
|
||||
for (AIAbstractListMap::iterator iter = this->items.begin(); iter != this->items.end(); iter++) {
|
||||
tmp.AddItem((*iter).first);
|
||||
@@ -785,8 +746,6 @@ SQInteger AIAbstractList::_nexti(HSQUIRRELVM vm)
|
||||
|
||||
SQInteger AIAbstractList::Valuate(HSQUIRRELVM vm)
|
||||
{
|
||||
this->modifications++;
|
||||
|
||||
/* The first parameter is the instance of AIAbstractList. */
|
||||
int nparam = sq_gettop(vm) - 1;
|
||||
|
||||
@@ -812,10 +771,6 @@ SQInteger AIAbstractList::Valuate(HSQUIRRELVM vm)
|
||||
|
||||
/* Walk all items, and query the result */
|
||||
this->buckets.clear();
|
||||
|
||||
/* Check for changing of items. */
|
||||
int begin_modification_count = this->modifications;
|
||||
|
||||
for (AIAbstractListMap::iterator iter = this->items.begin(); iter != this->items.end(); iter++) {
|
||||
/* Push the root table as instance object, this is what squirrel does for meta-functions. */
|
||||
sq_pushroottable(vm);
|
||||
@@ -853,15 +808,6 @@ SQInteger AIAbstractList::Valuate(HSQUIRRELVM vm)
|
||||
}
|
||||
}
|
||||
|
||||
/* Was something changed? */
|
||||
if (begin_modification_count != this->modifications) {
|
||||
/* See below for explanation. The extra pop is the return value. */
|
||||
sq_pop(vm, nparam + 4);
|
||||
|
||||
AIObject::SetAllowDoCommand(backup_allow);
|
||||
return sq_throwerror(vm, _SC("modifying valuated list outside of valuator function"));
|
||||
}
|
||||
|
||||
(*iter).second = (int32)value;
|
||||
this->buckets[(int32)value].insert((*iter).first);
|
||||
|
||||
|
@@ -25,17 +25,11 @@ public:
|
||||
SORT_BY_ITEM, //!< Sort the list based on the item itself.
|
||||
};
|
||||
|
||||
/** Sort ascending */
|
||||
static const bool SORT_ASCENDING = true;
|
||||
/** Sort descnding */
|
||||
static const bool SORT_DESCENDING = false;
|
||||
|
||||
private:
|
||||
AIAbstractListSorter *sorter; //!< Sorting algorithm
|
||||
SorterType sorter_type; //!< Sorting type
|
||||
bool sort_ascending; //!< Whether to sort ascending or descending
|
||||
bool initialized; //!< Whether an iteration has been started
|
||||
int modifications; //!< Number of modification that has been done. To prevent changing data while valuating.
|
||||
AIAbstractListSorter *sorter;
|
||||
SorterType sorter_type;
|
||||
bool sort_ascending;
|
||||
bool initialized;
|
||||
|
||||
public:
|
||||
typedef std::set<int32> AIItemList; //!< The list of items inside the bucket
|
||||
@@ -129,7 +123,6 @@ public:
|
||||
* @param sorter the type of sorter to use
|
||||
* @param ascending if true, lowest value is on top, else at bottom.
|
||||
* @note the current item stays at the same place.
|
||||
* @see SORT_ASCENDING SORT_DESCENDING
|
||||
*/
|
||||
void Sort(SorterType sorter, bool ascending);
|
||||
|
||||
@@ -252,8 +245,6 @@ public:
|
||||
* @param valuator_function The function which will be doing the valuation.
|
||||
* @param params The params to give to the valuators (minus the first param,
|
||||
* which is always the index-value we are valuating).
|
||||
* @note You may not add, remove or change (setting the value of) items while
|
||||
* valuating. You may also not (re)sort while valuating.
|
||||
* @note You can write your own valuators and use them. Just remember that
|
||||
* the first parameter should be the index-value, and it should return
|
||||
* an integer.
|
||||
|
@@ -24,9 +24,6 @@ void SQAIAbstractList_Register(Squirrel *engine) {
|
||||
SQAIAbstractList.DefSQConst(engine, AIAbstractList::SORT_BY_VALUE, "SORT_BY_VALUE");
|
||||
SQAIAbstractList.DefSQConst(engine, AIAbstractList::SORT_BY_ITEM, "SORT_BY_ITEM");
|
||||
|
||||
SQAIAbstractList.DefSQConst(engine, AIAbstractList::SORT_ASCENDING, "SORT_ASCENDING");
|
||||
SQAIAbstractList.DefSQConst(engine, AIAbstractList::SORT_DESCENDING, "SORT_DESCENDING");
|
||||
|
||||
SQAIAbstractList.DefSQMethod(engine, &AIAbstractList::Clear, "Clear", 1, "x");
|
||||
SQAIAbstractList.DefSQMethod(engine, &AIAbstractList::HasItem, "HasItem", 2, "xi");
|
||||
SQAIAbstractList.DefSQMethod(engine, &AIAbstractList::Begin, "Begin", 1, "x");
|
||||
|
@@ -12,12 +12,7 @@
|
||||
|
||||
/* static */ bool AIAirport::IsValidAirportType(AirportType type)
|
||||
{
|
||||
return IsAirportInformationAvailable(type) && HasBit(::GetValidAirports(), type);
|
||||
}
|
||||
|
||||
/* static */ bool AIAirport::IsAirportInformationAvailable(AirportType type)
|
||||
{
|
||||
return type >= 0 && type <= AT_HELISTATION;
|
||||
return type >= AT_SMALL && type <= AT_HELISTATION && HasBit(::GetValidAirports(), type);
|
||||
}
|
||||
|
||||
/* static */ Money AIAirport::GetPrice(AirportType type)
|
||||
@@ -44,21 +39,21 @@
|
||||
|
||||
/* static */ int32 AIAirport::GetAirportWidth(AirportType type)
|
||||
{
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
if (!IsValidAirportType(type)) return -1;
|
||||
|
||||
return ::GetAirport(type)->size_x;
|
||||
}
|
||||
|
||||
/* static */ int32 AIAirport::GetAirportHeight(AirportType type)
|
||||
{
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
if (!IsValidAirportType(type)) return -1;
|
||||
|
||||
return ::GetAirport(type)->size_y;
|
||||
}
|
||||
|
||||
/* static */ int32 AIAirport::GetAirportCoverageRadius(AirportType type)
|
||||
{
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
if (!IsValidAirportType(type)) return -1;
|
||||
|
||||
return _settings_game.station.modified_catchment ? ::GetAirport(type)->catchment : (uint)CA_UNMODIFIED;
|
||||
}
|
||||
@@ -141,7 +136,7 @@
|
||||
extern Town *AirportGetNearestTown(const AirportFTAClass *afc, TileIndex airport_tile);
|
||||
|
||||
if (!::IsValidTile(tile)) return INVALID_TOWN;
|
||||
if (!IsAirportInformationAvailable(type)) return INVALID_TOWN;
|
||||
if (!IsValidAirportType(type)) return INVALID_TOWN;
|
||||
|
||||
return AirportGetNearestTown(GetAirport(type), tile)->index;
|
||||
}
|
||||
|
@@ -50,24 +50,12 @@ public:
|
||||
* Checks whether the given AirportType is valid and available.
|
||||
* @param type The AirportType to check.
|
||||
* @return True if and only if the AirportType is valid and available.
|
||||
* @post return value == true -> IsAirportInformationAvailable returns true.
|
||||
*/
|
||||
static bool IsValidAirportType(AirportType type);
|
||||
|
||||
/**
|
||||
* Can you get information on this airport type? As opposed to
|
||||
* IsValidAirportType this will return also return true when
|
||||
* an airport type is no longer buildable.
|
||||
* @param type The AirportType to check.
|
||||
* @return True if and only if the AirportType is valid.
|
||||
* @post return value == false -> IsValidAirportType returns false.
|
||||
*/
|
||||
static bool IsAirportInformationAvailable(AirportType type);
|
||||
|
||||
/**
|
||||
* Get the cost to build this AirportType.
|
||||
* @param type The AirportType to check.
|
||||
* @pre AirportAvailable(type).
|
||||
* @return The cost of building this AirportType.
|
||||
*/
|
||||
static Money GetPrice(AirportType type);
|
||||
@@ -91,7 +79,6 @@ public:
|
||||
/**
|
||||
* Get the width of this type of airport.
|
||||
* @param type The type of airport.
|
||||
* @pre IsAirportInformationAvailable(type).
|
||||
* @return The width in tiles.
|
||||
*/
|
||||
static int32 GetAirportWidth(AirportType type);
|
||||
@@ -99,7 +86,6 @@ public:
|
||||
/**
|
||||
* Get the height of this type of airport.
|
||||
* @param type The type of airport.
|
||||
* @pre IsAirportInformationAvailable(type).
|
||||
* @return The height in tiles.
|
||||
*/
|
||||
static int32 GetAirportHeight(AirportType type);
|
||||
@@ -107,7 +93,6 @@ public:
|
||||
/**
|
||||
* Get the coverage radius of this type of airport.
|
||||
* @param type The type of airport.
|
||||
* @pre IsAirportInformationAvailable(type).
|
||||
* @return The radius in tiles.
|
||||
*/
|
||||
static int32 GetAirportCoverageRadius(AirportType type);
|
||||
@@ -144,7 +129,7 @@ public:
|
||||
* @exception AIError::ERR_FLAT_LAND_REQUIRED
|
||||
* @exception AIError::ERR_LOCAL_AUTHORITY_REFUSES
|
||||
* @exception AIStation::ERR_STATION_TOO_LARGE
|
||||
* @exception AIStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION
|
||||
* @exception AIStation::ERR_STATION_TOO_CLOSE_TO_OTHER_STATION
|
||||
* @return Whether the airport has been/can be build or not.
|
||||
*/
|
||||
static bool BuildAirport(TileIndex tile, AirportType type, StationID station_id);
|
||||
@@ -182,7 +167,6 @@ public:
|
||||
* an airport at some tile.
|
||||
* @param tile The tile to check.
|
||||
* @param type The AirportType to check.
|
||||
* @pre IsAirportInformationAvailable(type).
|
||||
* @return The TownID of the town closest to the tile.
|
||||
*/
|
||||
static TownID GetNearestTown(TileIndex tile, AirportType type);
|
||||
|
@@ -38,21 +38,20 @@ void SQAIAirport_Register(Squirrel *engine) {
|
||||
SQAIAirport.DefSQConst(engine, AIAirport::PT_BIG_PLANE, "PT_BIG_PLANE");
|
||||
SQAIAirport.DefSQConst(engine, AIAirport::PT_INVALID, "PT_INVALID");
|
||||
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::IsValidAirportType, "IsValidAirportType", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::IsAirportInformationAvailable, "IsAirportInformationAvailable", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetPrice, "GetPrice", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::IsHangarTile, "IsHangarTile", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::IsAirportTile, "IsAirportTile", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetAirportWidth, "GetAirportWidth", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetAirportHeight, "GetAirportHeight", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetAirportCoverageRadius, "GetAirportCoverageRadius", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetNumHangars, "GetNumHangars", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetHangarOfAirport, "GetHangarOfAirport", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::BuildAirport, "BuildAirport", 4, ".iii");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::RemoveAirport, "RemoveAirport", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetAirportType, "GetAirportType", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetNoiseLevelIncrease, "GetNoiseLevelIncrease", 3, ".ii");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetNearestTown, "GetNearestTown", 3, ".ii");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::IsValidAirportType, "IsValidAirportType", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetPrice, "GetPrice", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::IsHangarTile, "IsHangarTile", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::IsAirportTile, "IsAirportTile", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetAirportWidth, "GetAirportWidth", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetAirportHeight, "GetAirportHeight", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetAirportCoverageRadius, "GetAirportCoverageRadius", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetNumHangars, "GetNumHangars", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetHangarOfAirport, "GetHangarOfAirport", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::BuildAirport, "BuildAirport", 4, ".iii");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::RemoveAirport, "RemoveAirport", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetAirportType, "GetAirportType", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetNoiseLevelIncrease, "GetNoiseLevelIncrease", 3, ".ii");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &AIAirport::GetNearestTown, "GetNearestTown", 3, ".ii");
|
||||
|
||||
SQAIAirport.PostRegister(engine);
|
||||
}
|
||||
|
@@ -139,7 +139,7 @@ static void _DoCommandReturnBuildBridge1(class AIInstance *instance)
|
||||
{
|
||||
if (!IsValidBridge(bridge_id)) return -1;
|
||||
|
||||
return ::CalcBridgeLenCostFactor(length) * _price.build_bridge * ::GetBridgeSpec(bridge_id)->price >> 8;
|
||||
return length * _price.build_bridge * ::GetBridgeSpec(bridge_id)->price >> 8;
|
||||
}
|
||||
|
||||
/* static */ int32 AIBridge::GetMaxLength(BridgeID bridge_id)
|
||||
|
@@ -1,71 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* 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 ai_changelog.hpp Lists all changes / additions to the API.
|
||||
*
|
||||
* Only new / renamed / deleted api functions will be listed here. A list of
|
||||
* bug fixes can be found in the normal changelog. Note that removed API
|
||||
* functions may still be available if you return an older API version
|
||||
* in GetAPIVersion() in info.nut.
|
||||
*
|
||||
* \b 0.7.3
|
||||
*
|
||||
* API additions:
|
||||
* \li AIAbstractList::SORT_ASCENDING
|
||||
* \li AIAbstractList::SORT_DESCENDING
|
||||
* \li AIAirport::IsAirportInformationAvailable
|
||||
* \li AICompany::GetPresidentGender
|
||||
* \li AICompany::SetPresidentGender
|
||||
* \li AIEngine::GetDesignDate
|
||||
* \li AIStation::GetConstructionDate
|
||||
*
|
||||
* Other changes:
|
||||
* \li AIs are now killed when they execute a DoCommand or Sleep at a time
|
||||
* they are not allowed to do so.
|
||||
* \li When the API requests a string as parameter you can give every squirrel
|
||||
* type and it'll be converted to a string
|
||||
* \li AIs can create subclasses of API classes and use API constants as part
|
||||
* of their own constants
|
||||
*
|
||||
* \b 0.7.2
|
||||
*
|
||||
* API additions:
|
||||
* \li AIVehicle::GetReliability
|
||||
*
|
||||
* Other changes:
|
||||
* \li DoCommands and sleeps in call, acall, pcall and valuators are disallowed
|
||||
*
|
||||
* \b 0.7.1
|
||||
*
|
||||
* API additions:
|
||||
* \li AIAirport::GetPrice
|
||||
* \li AIController::GetVersion
|
||||
* \li AIOrder::AIOF_DEPOT_FLAGS
|
||||
* \li AIOrder::AIOF_STOP_IN_DEPOT
|
||||
* \li AIOrder::IsCurrentOrderPartOfOrderList
|
||||
* \li AIOrder::IsGotoDepotOrder
|
||||
* \li AIOrder::IsGotoStationOrder
|
||||
* \li AIOrder::IsGotoWaypointOrder
|
||||
* \li AISignList
|
||||
* \li AITile::CORNER_[WSEN]
|
||||
* \li AITile::ERR_AREA_ALREADY_FLAT
|
||||
* \li AITile::ERR_EXCAVATION_WOULD_DAMAGE
|
||||
* \li AITile::GetCornerHeight
|
||||
* \li AITile::GetMaxHeight
|
||||
* \li AITile::GetMinHeight
|
||||
* \li AIVehicle::SendVehicleToDepotForServicing
|
||||
*
|
||||
* Other changes:
|
||||
* \li GetURL() was added as optional function to info.nut
|
||||
* \li UseAsRandomAI() was added as optional function to info.nut
|
||||
* \li A limit was introduced on the time the AI spends in the constructor and Load function
|
||||
*
|
||||
* \b 0.7.0
|
||||
* \li First stable release with the NoAI framework.
|
||||
*/
|
@@ -8,7 +8,6 @@
|
||||
#include "../../command_func.h"
|
||||
#include "../../company_func.h"
|
||||
#include "../../company_base.h"
|
||||
#include "../../company_manager_face.h"
|
||||
#include "../../economy_func.h"
|
||||
#include "../../strings_func.h"
|
||||
#include "../../tile_map.h"
|
||||
@@ -72,27 +71,6 @@
|
||||
return president_name;
|
||||
}
|
||||
|
||||
/* static */ bool AICompany::SetPresidentGender(Gender gender)
|
||||
{
|
||||
EnforcePrecondition(false, gender == GENDER_MALE || gender == GENDER_FEMALE);
|
||||
EnforcePrecondition(false, GetPresidentGender(AICompany::COMPANY_SELF) != gender);
|
||||
|
||||
CompanyManagerFace cmf;
|
||||
GenderEthnicity ge = (GenderEthnicity)((gender == GENDER_FEMALE ? (1 << ::GENDER_FEMALE) : 0) | (::InteractiveRandom() & (1 << ETHNICITY_BLACK)));
|
||||
RandomCompanyManagerFaceBits(cmf, ge, false);
|
||||
|
||||
return AIObject::DoCommand(0, 0, cmf, CMD_SET_COMPANY_MANAGER_FACE);
|
||||
}
|
||||
|
||||
/* static */ AICompany::Gender AICompany::GetPresidentGender(CompanyID company)
|
||||
{
|
||||
company = ResolveCompanyID(company);
|
||||
if (company == COMPANY_INVALID) return GENDER_INVALID;
|
||||
|
||||
GenderEthnicity ge = (GenderEthnicity)GetCompanyManagerFaceBits(GetCompany(company)->face, CMFV_GEN_ETHN, GE_WM);
|
||||
return HasBit(ge, ::GENDER_FEMALE) ? GENDER_FEMALE : GENDER_MALE;
|
||||
}
|
||||
|
||||
/* static */ Money AICompany::GetCompanyValue(AICompany::CompanyID company)
|
||||
{
|
||||
company = ResolveCompanyID(company);
|
||||
|
@@ -26,13 +26,6 @@ public:
|
||||
COMPANY_SELF = 254, //!< Constant that gets resolved to the correct company index for your company.
|
||||
};
|
||||
|
||||
/** Possible genders for company presidents. */
|
||||
enum Gender {
|
||||
GENDER_MALE, //!< A male person.
|
||||
GENDER_FEMALE, //!< A female person.
|
||||
GENDER_INVALID = -1, //!< An invalid gender.
|
||||
};
|
||||
|
||||
/**
|
||||
* Resolved the given company index to the correct index for the company. If
|
||||
* the company index was COMPANY_SELF it will be resolved to the index of
|
||||
@@ -85,22 +78,6 @@ public:
|
||||
*/
|
||||
static char *GetPresidentName(CompanyID company);
|
||||
|
||||
/**
|
||||
* Set the gender of the president of your company.
|
||||
* @param gender The new gender for your president.
|
||||
* @pre GetPresidentGender(AICompany.COMPANY_SELF) != gender.
|
||||
* @return True if the gender was changed.
|
||||
* @note When succesfull a random face will be created.
|
||||
*/
|
||||
static bool SetPresidentGender(Gender gender);
|
||||
|
||||
/**
|
||||
* Get the gender of the president of the given company.
|
||||
* @param company The company to get the presidents gender off.
|
||||
* @return The gender of the president.
|
||||
*/
|
||||
static Gender GetPresidentGender(CompanyID company);
|
||||
|
||||
/**
|
||||
* Sets the amount to loan.
|
||||
* @param loan The amount to loan (multiplier of GetLoanInterval()).
|
||||
|
@@ -7,8 +7,6 @@ namespace SQConvert {
|
||||
/* Allow enums to be used as Squirrel parameters */
|
||||
template <> AICompany::CompanyID GetParam(ForceType<AICompany::CompanyID>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AICompany::CompanyID)tmp; }
|
||||
template <> int Return<AICompany::CompanyID>(HSQUIRRELVM vm, AICompany::CompanyID res) { sq_pushinteger(vm, (int32)res); return 1; }
|
||||
template <> AICompany::Gender GetParam(ForceType<AICompany::Gender>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AICompany::Gender)tmp; }
|
||||
template <> int Return<AICompany::Gender>(HSQUIRRELVM vm, AICompany::Gender res) { sq_pushinteger(vm, (int32)res); return 1; }
|
||||
|
||||
/* Allow AICompany to be used as Squirrel parameter */
|
||||
template <> AICompany *GetParam(ForceType<AICompany *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AICompany *)instance; }
|
||||
@@ -27,18 +25,13 @@ void SQAICompany_Register(Squirrel *engine) {
|
||||
SQAICompany.DefSQConst(engine, AICompany::COMPANY_FIRST, "COMPANY_FIRST");
|
||||
SQAICompany.DefSQConst(engine, AICompany::COMPANY_LAST, "COMPANY_LAST");
|
||||
SQAICompany.DefSQConst(engine, AICompany::COMPANY_SELF, "COMPANY_SELF");
|
||||
SQAICompany.DefSQConst(engine, AICompany::GENDER_MALE, "GENDER_MALE");
|
||||
SQAICompany.DefSQConst(engine, AICompany::GENDER_FEMALE, "GENDER_FEMALE");
|
||||
SQAICompany.DefSQConst(engine, AICompany::GENDER_INVALID, "GENDER_INVALID");
|
||||
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::ResolveCompanyID, "ResolveCompanyID", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::IsMine, "IsMine", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::SetName, "SetName", 2, "..");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::SetName, "SetName", 2, ".s");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::GetName, "GetName", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::SetPresidentName, "SetPresidentName", 2, "..");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::SetPresidentName, "SetPresidentName", 2, ".s");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::GetPresidentName, "GetPresidentName", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::SetPresidentGender, "SetPresidentGender", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::GetPresidentGender, "GetPresidentGender", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::SetLoanAmount, "SetLoanAmount", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::SetMinimumLoanAmount, "SetMinimumLoanAmount", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &AICompany::GetLoanAmount, "GetLoanAmount", 1, ".");
|
||||
|
@@ -23,8 +23,9 @@
|
||||
|
||||
/* static */ void AIController::Sleep(int ticks)
|
||||
{
|
||||
if (!AIObject::CanSuspend()) {
|
||||
throw AI_FatalError("You are not allowed to call Sleep in your constructor, Save(), Load(), and any valuator.");
|
||||
if (!AIObject::GetAllowDoCommand()) {
|
||||
AILog::Error("You are not allowed to call Sleep in your constructor, Save(), Load(), and any valuator.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ticks <= 0) {
|
||||
|
@@ -152,13 +152,6 @@
|
||||
return ::GetEngine(engine_id)->GetDisplayMaxTractiveEffort();
|
||||
}
|
||||
|
||||
/* static */ int32 AIEngine::GetDesignDate(EngineID engine_id)
|
||||
{
|
||||
if (!IsValidEngine(engine_id)) return -1;
|
||||
|
||||
return ::GetEngine(engine_id)->intro_date;
|
||||
}
|
||||
|
||||
/* static */ AIVehicle::VehicleType AIEngine::GetVehicleType(EngineID engine_id)
|
||||
{
|
||||
if (!IsValidEngine(engine_id)) return AIVehicle::VT_INVALID;
|
||||
|
@@ -152,14 +152,6 @@ public:
|
||||
*/
|
||||
static int32 GetMaxTractiveEffort(EngineID engine_id);
|
||||
|
||||
/**
|
||||
* Get the date this engine was designed.
|
||||
* @param engine_id The engine to get the design date of.
|
||||
* @pre IsValidEngine(engine_id).
|
||||
* @return The date this engine was designed.
|
||||
*/
|
||||
static int32 GetDesignDate(EngineID engine_id);
|
||||
|
||||
/**
|
||||
* Get the type of an engine.
|
||||
* @param engine_id The engine to get the type of.
|
||||
|
@@ -31,7 +31,6 @@ void SQAIEngine_Register(Squirrel *engine) {
|
||||
SQAIEngine.DefSQStaticMethod(engine, &AIEngine::GetPower, "GetPower", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &AIEngine::GetWeight, "GetWeight", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &AIEngine::GetMaxTractiveEffort, "GetMaxTractiveEffort", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &AIEngine::GetDesignDate, "GetDesignDate", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &AIEngine::GetVehicleType, "GetVehicleType", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &AIEngine::IsWagon, "IsWagon", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &AIEngine::CanRunOnRail, "CanRunOnRail", 3, ".ii");
|
||||
|
@@ -4,9 +4,6 @@
|
||||
|
||||
#include "ai_execmode.hpp"
|
||||
#include "../../command_type.h"
|
||||
#include "../../company_base.h"
|
||||
#include "../../company_func.h"
|
||||
#include "../ai_instance.hpp"
|
||||
|
||||
bool AIExecMode::ModeProc(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs)
|
||||
{
|
||||
@@ -24,12 +21,6 @@ AIExecMode::AIExecMode()
|
||||
|
||||
AIExecMode::~AIExecMode()
|
||||
{
|
||||
if (this->GetDoCommandModeInstance() != this) {
|
||||
AIInstance *instance = GetCompany(_current_company)->ai_instance;
|
||||
/* Ignore this error if the AI already died. */
|
||||
if (!instance->IsDead()) {
|
||||
throw AI_FatalError("AIExecMode object was removed while it was not the latest AI*Mode object created.");
|
||||
}
|
||||
}
|
||||
assert(this->GetDoCommandModeInstance() == this);
|
||||
this->SetDoCommandMode(this->last_mode, this->last_instance);
|
||||
}
|
||||
|
@@ -17,8 +17,8 @@ void SQAIGameSettings_Register(Squirrel *engine) {
|
||||
SQAIGameSettings.PreRegister(engine);
|
||||
SQAIGameSettings.AddConstructor<void (AIGameSettings::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIGameSettings.DefSQStaticMethod(engine, &AIGameSettings::IsValid, "IsValid", 2, "..");
|
||||
SQAIGameSettings.DefSQStaticMethod(engine, &AIGameSettings::GetValue, "GetValue", 2, "..");
|
||||
SQAIGameSettings.DefSQStaticMethod(engine, &AIGameSettings::IsValid, "IsValid", 2, ".s");
|
||||
SQAIGameSettings.DefSQStaticMethod(engine, &AIGameSettings::GetValue, "GetValue", 2, ".s");
|
||||
SQAIGameSettings.DefSQStaticMethod(engine, &AIGameSettings::IsDisabledVehicleType, "IsDisabledVehicleType", 2, ".i");
|
||||
|
||||
SQAIGameSettings.PostRegister(engine);
|
||||
|
@@ -29,7 +29,7 @@ void SQAIGroup_Register(Squirrel *engine) {
|
||||
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::CreateGroup, "CreateGroup", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::DeleteGroup, "DeleteGroup", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::GetVehicleType, "GetVehicleType", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::SetName, "SetName", 3, ".i.");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::SetName, "SetName", 3, ".is");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::GetName, "GetName", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::EnableAutoReplaceProtection, "EnableAutoReplaceProtection", 3, ".ib");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::GetAutoReplaceProtection, "GetAutoReplaceProtection", 2, ".i");
|
||||
|
@@ -91,20 +91,6 @@
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* static */ int32 AIIndustry::GetLastMonthTransportedPercentage(IndustryID industry_id, CargoID cargo_id)
|
||||
{
|
||||
if (!IsValidIndustry(industry_id)) return -1;
|
||||
if (!AICargo::IsValidCargo(cargo_id)) return -1;
|
||||
|
||||
const Industry *i = ::GetIndustry(industry_id);
|
||||
|
||||
for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
|
||||
if (i->produced_cargo[j] == cargo_id) return i->last_month_pct_transported[j] * 100 >> 8;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* static */ TileIndex AIIndustry::GetLocation(IndustryID industry_id)
|
||||
{
|
||||
if (!IsValidIndustry(industry_id)) return INVALID_TILE;
|
||||
|
@@ -77,16 +77,6 @@ public:
|
||||
*/
|
||||
static int32 GetLastMonthTransported(IndustryID industry_id, CargoID cargo_id);
|
||||
|
||||
/**
|
||||
* Get the percentage of cargo transported from an industry last month.
|
||||
* @param industry_id The index of the industry.
|
||||
* @param cargo_id The index of the cargo.
|
||||
* @pre IsValidIndustry(industry_id).
|
||||
* @pre AICargo::IsValidCargo(cargo_id).
|
||||
* @return The percentage of given cargo transported from this industry last month.
|
||||
*/
|
||||
static int32 GetLastMonthTransportedPercentage(IndustryID industry_id, CargoID cargo_id);
|
||||
|
||||
/**
|
||||
* Gets the location of the industry.
|
||||
* @param industry_id The index of the industry.
|
||||
|
@@ -17,24 +17,23 @@ void SQAIIndustry_Register(Squirrel *engine) {
|
||||
SQAIIndustry.PreRegister(engine);
|
||||
SQAIIndustry.AddConstructor<void (AIIndustry::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetIndustryCount, "GetIndustryCount", 1, ".");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::IsValidIndustry, "IsValidIndustry", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetName, "GetName", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::IsCargoAccepted, "IsCargoAccepted", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetStockpiledCargo, "GetStockpiledCargo", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetLastMonthTransported, "GetLastMonthTransported", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetLastMonthTransportedPercentage, "GetLastMonthTransportedPercentage", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetAmountOfStationsAround, "GetAmountOfStationsAround", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::HasHeliport, "HasHeliport", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetHeliportLocation, "GetHeliportLocation", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::HasDock, "HasDock", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetDockLocation, "GetDockLocation", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetIndustryType, "GetIndustryType", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetIndustryCount, "GetIndustryCount", 1, ".");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::IsValidIndustry, "IsValidIndustry", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetName, "GetName", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::IsCargoAccepted, "IsCargoAccepted", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetStockpiledCargo, "GetStockpiledCargo", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetLastMonthTransported, "GetLastMonthTransported", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetAmountOfStationsAround, "GetAmountOfStationsAround", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::HasHeliport, "HasHeliport", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetHeliportLocation, "GetHeliportLocation", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::HasDock, "HasDock", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetDockLocation, "GetDockLocation", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetIndustryType, "GetIndustryType", 2, ".i");
|
||||
|
||||
SQAIIndustry.PostRegister(engine);
|
||||
}
|
||||
|
@@ -1,239 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* 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 ai_info_docs.hpp Description of the functions an AI can/must provide in AIInfo. */
|
||||
|
||||
/* This file exists purely for doxygen purposes. */
|
||||
#ifdef DOXYGEN_SKIP
|
||||
/**
|
||||
* 'Abstract' class of the class AIs/AI libraries use to register themselves.
|
||||
*
|
||||
* @note This class is not part of the API. It is purely to document what
|
||||
* AIs must or can implemented to provide information to OpenTTD to
|
||||
* base configuring/starting/loading the AI on.
|
||||
*
|
||||
* @note The required functions are also needed for AI Libraries. As such
|
||||
* the information here can be used for libraries, but the information
|
||||
* will not be shown in the GUI except for error/debug messages.
|
||||
*/
|
||||
class AIInfo {
|
||||
public:
|
||||
/**
|
||||
* Gets the author name to be shown in the 'Available AIs' window.
|
||||
*
|
||||
* @return The author name of the AI.
|
||||
* @note This function is required.
|
||||
*/
|
||||
string GetAuthor();
|
||||
|
||||
/**
|
||||
* Gets the AIs name. This is shown in the 'Available AIs' window
|
||||
* and at all other places where the AI is mentioned, like the debug
|
||||
* window or OpenTTD's help message. The name is used to uniquely
|
||||
* identify an AI within OpenTTD and this name is used in savegames
|
||||
* and the configuration file.
|
||||
*
|
||||
* @return The name of the AI.
|
||||
* @note This function is required.
|
||||
*/
|
||||
string GetName();
|
||||
|
||||
/**
|
||||
* Gets a 4 ASCII character short name of the AI to uniquely
|
||||
* identify it from other AIs. The short name is primarily
|
||||
* used as unique identifier for the content system.
|
||||
* The content system uses besides the short name also the
|
||||
* MD5 checksum of all the source files to uniquely identify
|
||||
* a specific version of the AI.
|
||||
*
|
||||
* The short name must consist of precisely four ASCII
|
||||
* characters, or more precisely four non-zero bytes.
|
||||
*
|
||||
* @return The name of the AI.
|
||||
* @note This function is required.
|
||||
*/
|
||||
string GetShortName();
|
||||
|
||||
/**
|
||||
* Gets the description to be shown in the 'Available AIs' window.
|
||||
*
|
||||
* @return The description for the AI.
|
||||
* @note This function is required.
|
||||
*/
|
||||
string GetDescription();
|
||||
|
||||
/**
|
||||
* Gets the version of the AI. This is a number to (in theory)
|
||||
* uniquely identify the versions of an AI. Generally the
|
||||
* 'instance' of an AI with the highest version is chosen to
|
||||
* be loaded.
|
||||
*
|
||||
* When OpenTTD finds, during starting, a duplicate AI with the
|
||||
* same version number one is randomly chosen. So it is
|
||||
* important that this number is regularly updated/incremented.
|
||||
*
|
||||
* @return The version number of the AI.
|
||||
* @note This function is required.
|
||||
*/
|
||||
int GetVersion();
|
||||
|
||||
/**
|
||||
* Gets the lowest version of the AI that OpenTTD can still load
|
||||
* the savegame of. In other words, from which version until this
|
||||
* version can the AI load the savegames.
|
||||
*
|
||||
* If this function does not exist OpenTTD assumes it can only
|
||||
* load savegames of this version. As such it will not upgrade
|
||||
* to this version upon load.
|
||||
*
|
||||
* @return The lowest version number we load the savegame data.
|
||||
* @note This function is optional.
|
||||
*/
|
||||
int MinVersionToLoad();
|
||||
|
||||
/**
|
||||
* Gets the development/release date of the AI.
|
||||
*
|
||||
* The intention of this is to give the user an idea how old the
|
||||
* AI is and whether there might be a newer version.
|
||||
*
|
||||
* @return The development/release date for the AI.
|
||||
* @note This function is required.
|
||||
*/
|
||||
string GetDate();
|
||||
|
||||
/**
|
||||
* Can this AI be used as random AI?
|
||||
*
|
||||
* The idea behind this function is to 'forbid' highly
|
||||
* competitive or other special AIs from running in games unless
|
||||
* the user explicitly selects the AI to be loaded. This to
|
||||
* try to prevent users from complaining that the AI is too
|
||||
* aggressive or does not build profitable routes.
|
||||
*
|
||||
* If this function does not exist OpenTTD assumes the AI can
|
||||
* be used as random AI. As such it will be randomly chosen.
|
||||
*
|
||||
* @return True if the AI can be used as random AI.
|
||||
* @note This function is optional.
|
||||
*/
|
||||
bool UseAsRandomAI();
|
||||
|
||||
/**
|
||||
* Gets the name of main class of the AI so OpenTTD knows
|
||||
* what class to instantiate.
|
||||
*
|
||||
* @return The class name of the AI.
|
||||
* @note This function is required.
|
||||
*/
|
||||
string CreateInstance();
|
||||
|
||||
/**
|
||||
* Gets the API version this AI is written for. If this function
|
||||
* does not exist API compatability with version 0.7 is assumed.
|
||||
* If the function returns something OpenTTD does not understand,
|
||||
* for example a newer version or a string that is not a version,
|
||||
* the AI will not be loaded.
|
||||
*
|
||||
* Although in the future we might need to make a separate
|
||||
* compatability 'wrapper' for a specific version of OpenTTD, for
|
||||
* example '0.7.1', we will use only the major and minor number
|
||||
* and not the bugfix number as valid return for this function.
|
||||
*
|
||||
* Valid return values are:
|
||||
* - "0.7"
|
||||
*
|
||||
* @return The version this AI is compatible with.
|
||||
* @note This function is optional.
|
||||
*/
|
||||
string GetAPIVersion();
|
||||
|
||||
/**
|
||||
* Gets the URL to be shown in the 'this AI has crashed' message
|
||||
* and in the 'Available AIs' window. If this function does not
|
||||
* exist no URL will be shown.
|
||||
*
|
||||
* This function purely exists to redirect users of the AI to the
|
||||
* right place on the internet to discuss the AI and report bugs
|
||||
* of this AI.
|
||||
*
|
||||
* @return The URL to show.
|
||||
* @note This function is optional.
|
||||
*/
|
||||
string GetURL();
|
||||
|
||||
/**
|
||||
* Gets the settings that OpenTTD shows in the "AI Parameters" window
|
||||
* so the user can customize the AI. This is a special function that
|
||||
* doesn't need to return anything. Instead you can call AddSetting
|
||||
* and AddLabels here.
|
||||
*
|
||||
* @note This function is optional.
|
||||
*/
|
||||
void GetSettings();
|
||||
|
||||
/** Miscellaneous flags for AI settings. */
|
||||
enum AIConfigFlags {
|
||||
AICONFIG_NONE, //!< Normal setting.
|
||||
AICONFIG_RANDOM, //!< When randomizing the AI, pick any value between min_value and max_value.
|
||||
AICONFIG_BOOLEAN, //!< This value is a boolean (either 0 (false) or 1 (true) ).
|
||||
};
|
||||
|
||||
/**
|
||||
* Add a user configurable setting for this AI. You can call this
|
||||
* as many times as you have settings.
|
||||
* @param setting_description A table with all information about a
|
||||
* single setting. The table should have the following name/value pairs:
|
||||
* - name The name of the setting, this is used in openttd.cfg to
|
||||
* store the current configuration of AIs. Required.
|
||||
* - description A single line describing the setting. Required.
|
||||
* - min_value The minimum value of this setting. Required for integer
|
||||
* settings and not allowed for boolean settings.
|
||||
* - max_value The maximum value of this setting. Required for integer
|
||||
* settings and not allowed for boolean settings.
|
||||
* - easy_value The default value if the easy difficulty level
|
||||
* is selected. Required.
|
||||
* - medium_value The default value if the medium difficulty level
|
||||
* is selected. Required.
|
||||
* - hard_value The default value if the hard difficulty level
|
||||
* is selected. Required.
|
||||
* - custom_value The default value if the custom difficulty level
|
||||
* is selected. Required.
|
||||
* - random_deviation If this property has a nonzero value, then the
|
||||
* actual value of the setting in game will be
|
||||
* user_configured_value + random(-random_deviation, random_deviation).
|
||||
* Not allowed if the AICONFIG_RANDOM flag is set, otherwise optional.
|
||||
* - step_size The increase/decrease of the value every time the user
|
||||
* clicks one of the up/down arrow buttons. Optional, default is 1.
|
||||
* - flags Bitmask of some flags, see AIConfigFlags. Required.
|
||||
*
|
||||
* @note This is a function provided by OpenTTD, you don't have to
|
||||
* include it in your AI but should just call it from GetSettings.
|
||||
*/
|
||||
void AddSetting(table setting_description);
|
||||
|
||||
/**
|
||||
* Add labels for the values of a setting. Instead of a number the
|
||||
* user will see the corresponding name.
|
||||
* @param setting_name The name of the setting.
|
||||
* @param value_names A table that maps values to names. The first
|
||||
* character of every identifier is ignored and the rest should
|
||||
* be the an integer of the value you define a name for. The value
|
||||
* is a short description of that value.
|
||||
* To define labels for a setting named "competition_level" you could
|
||||
* for example call it like this:
|
||||
* AddLabels("competition_level", {_0 = "no competition", _1 = "some competition",
|
||||
* _2 = "a lot of competition"});
|
||||
*
|
||||
* @note This is a function provided by OpenTTD, you don't have to
|
||||
* include it in your AI but should just call it from GetSettings.
|
||||
*/
|
||||
void AddLabels(const char *setting_name, table value_names);
|
||||
};
|
||||
#endif
|
@@ -17,9 +17,9 @@ void SQAILog_Register(Squirrel *engine) {
|
||||
SQAILog.PreRegister(engine);
|
||||
SQAILog.AddConstructor<void (AILog::*)(), 1>(engine, "x");
|
||||
|
||||
SQAILog.DefSQStaticMethod(engine, &AILog::Info, "Info", 2, "..");
|
||||
SQAILog.DefSQStaticMethod(engine, &AILog::Warning, "Warning", 2, "..");
|
||||
SQAILog.DefSQStaticMethod(engine, &AILog::Error, "Error", 2, "..");
|
||||
SQAILog.DefSQStaticMethod(engine, &AILog::Info, "Info", 2, ".s");
|
||||
SQAILog.DefSQStaticMethod(engine, &AILog::Warning, "Warning", 2, ".s");
|
||||
SQAILog.DefSQStaticMethod(engine, &AILog::Error, "Error", 2, ".s");
|
||||
|
||||
SQAILog.PostRegister(engine);
|
||||
}
|
||||
|
@@ -13,7 +13,9 @@
|
||||
class AIMap : public AIObject {
|
||||
public:
|
||||
#ifdef DEFINE_SCRIPT_FILES
|
||||
static const int TILE_INVALID = INVALID_TILE; //!< Invalid TileIndex.
|
||||
enum MapType {
|
||||
TILE_INVALID = INVALID_TILE, //!< Invalid TileIndex.
|
||||
};
|
||||
#endif /* DEFINE_SCRIPT_FILES */
|
||||
#ifdef DOXYGEN_SKIP
|
||||
const static TileIndex TILE_INVALID; //!< Invalid TileIndex.
|
||||
|
@@ -4,6 +4,10 @@
|
||||
#include "ai_map.hpp"
|
||||
|
||||
namespace SQConvert {
|
||||
/* Allow enums to be used as Squirrel parameters */
|
||||
template <> AIMap::MapType GetParam(ForceType<AIMap::MapType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AIMap::MapType)tmp; }
|
||||
template <> int Return<AIMap::MapType>(HSQUIRRELVM vm, AIMap::MapType res) { sq_pushinteger(vm, (int32)res); return 1; }
|
||||
|
||||
/* Allow AIMap to be used as Squirrel parameter */
|
||||
template <> AIMap *GetParam(ForceType<AIMap *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIMap *)instance; }
|
||||
template <> AIMap &GetParam(ForceType<AIMap &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIMap *)instance; }
|
||||
|
@@ -161,11 +161,6 @@ void AIObject::SetAllowDoCommand(bool allow)
|
||||
}
|
||||
|
||||
bool AIObject::GetAllowDoCommand()
|
||||
{
|
||||
return GetStorage()->allow_do_command;
|
||||
}
|
||||
|
||||
bool AIObject::CanSuspend()
|
||||
{
|
||||
Squirrel *squirrel = GetCompany(_current_company)->ai_instance->engine;
|
||||
return GetStorage()->allow_do_command && squirrel->CanSuspend();
|
||||
@@ -194,8 +189,9 @@ int AIObject::GetCallbackVariable(int index)
|
||||
|
||||
bool AIObject::DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd, const char *text, AISuspendCallbackProc *callback)
|
||||
{
|
||||
if (!AIObject::CanSuspend()) {
|
||||
throw AI_FatalError("You are not allowed to execute any DoCommand (even indirect) in your constructor, Save(), Load(), and any valuator.");
|
||||
if (AIObject::GetAllowDoCommand() == false) {
|
||||
AILog::Error("You are not allowed to execute any DoCommand (even indirect) in your constructor, Save(), Load(), and any valuator.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
CommandCost res;
|
||||
|
@@ -133,15 +133,8 @@ protected:
|
||||
static GroupID GetNewGroupID();
|
||||
|
||||
/**
|
||||
* Can we suspend the AI at this moment?
|
||||
*/
|
||||
static bool CanSuspend();
|
||||
|
||||
/**
|
||||
* Get the internal value of allow_do_command. This can differ
|
||||
* from CanSuspend() if the reason we are not allowed
|
||||
* to execute a DoCommand is in squirrel and not the API.
|
||||
* In that case use this function to restore the previous value.
|
||||
* Get the latest stored allow_do_command.
|
||||
* If this is false, you are not allowed to do any DoCommands.
|
||||
*/
|
||||
static bool GetAllowDoCommand();
|
||||
|
||||
|
@@ -328,7 +328,7 @@ public:
|
||||
* @pre AIVehicle::IsValidVehicle(vehicle_id).
|
||||
* @pre AreOrderFlagsValid(destination, order_flags).
|
||||
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception AIOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception AIOrder::ERR_ORDER_NO_MORE_SPACE
|
||||
* @exception AIOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION
|
||||
* @return True if and only if the order was appended.
|
||||
*/
|
||||
@@ -341,7 +341,7 @@ public:
|
||||
* @pre AIVehicle::IsValidVehicle(vehicle_id).
|
||||
* @pre IsValidVehicleOrder(vehicle_id, jump_to).
|
||||
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception AIOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception AIOrder::ERR_ORDER_NO_MORE_SPACE
|
||||
* @return True if and only if the order was appended.
|
||||
*/
|
||||
static bool AppendConditionalOrder(VehicleID vehicle_id, OrderPosition jump_to);
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @pre AreOrderFlagsValid(destination, order_flags).
|
||||
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception AIOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception AIOrder::ERR_ORDER_NO_MORE_SPACE
|
||||
* @exception AIOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION
|
||||
* @return True if and only if the order was inserted.
|
||||
*/
|
||||
@@ -369,7 +369,7 @@ public:
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @pre IsValidVehicleOrder(vehicle_id, jump_to).
|
||||
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception AIOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception AIOrder::ERR_ORDER_NO_MORE_SPACE
|
||||
* @return True if and only if the order was inserted.
|
||||
*/
|
||||
static bool InsertConditionalOrder(VehicleID vehicle_id, OrderPosition order_position, OrderPosition jump_to);
|
||||
@@ -442,7 +442,7 @@ public:
|
||||
* @pre AIVehicle::IsValidVehicle(vehicle_id).
|
||||
* @pre AIVehicle::IsValidVehicle(main_vehicle_id).
|
||||
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception AIOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception AIOrder::ERR_ORDER_NO_MORE_SPACE
|
||||
* @return True if and only if the copying succeeded.
|
||||
*/
|
||||
static bool CopyOrders(VehicleID vehicle_id, VehicleID main_vehicle_id);
|
||||
|
@@ -221,7 +221,7 @@
|
||||
/* static */ bool AIRail::RemoveRailTrack(TileIndex tile, RailTrack rail_track)
|
||||
{
|
||||
EnforcePrecondition(false, ::IsValidTile(tile));
|
||||
EnforcePrecondition(false, ::IsPlainRailTile(tile) || ::IsLevelCrossingTile(tile));
|
||||
EnforcePrecondition(false, ::IsTileType(tile, MP_RAILWAY) && ::IsPlainRailTile(tile));
|
||||
EnforcePrecondition(false, GetRailTracks(tile) & rail_track);
|
||||
EnforcePrecondition(false, KillFirstBit((uint)rail_track) == 0);
|
||||
|
||||
@@ -404,7 +404,7 @@ static bool IsValidSignalType(int signal_type)
|
||||
/* static */ bool AIRail::BuildSignal(TileIndex tile, TileIndex front, SignalType signal)
|
||||
{
|
||||
EnforcePrecondition(false, AIMap::DistanceManhattan(tile, front) == 1)
|
||||
EnforcePrecondition(false, ::IsPlainRailTile(tile));
|
||||
EnforcePrecondition(false, ::IsTileType(tile, MP_RAILWAY) && ::IsPlainRailTile(tile));
|
||||
EnforcePrecondition(false, ::IsValidSignalType(signal));
|
||||
|
||||
Track track = INVALID_TRACK;
|
||||
|
@@ -75,7 +75,6 @@
|
||||
{
|
||||
if (!::IsValidTile(t1)) return false;
|
||||
if (!::IsValidTile(t2)) return false;
|
||||
if (!IsRoadTypeAvailable(GetCurrentRoadType())) return false;
|
||||
|
||||
/* Tiles not neighbouring */
|
||||
if ((abs((int)::TileX(t1) - (int)::TileX(t2)) + abs((int)::TileY(t1) - (int)::TileY(t2))) != 1) return false;
|
||||
@@ -422,7 +421,6 @@ static bool NeighbourHasReachableRoad(::RoadTypes rts, TileIndex start_tile, Dia
|
||||
/* static */ int32 AIRoad::GetNeighbourRoadCount(TileIndex tile)
|
||||
{
|
||||
if (!::IsValidTile(tile)) return false;
|
||||
if (!IsRoadTypeAvailable(GetCurrentRoadType())) return false;
|
||||
|
||||
::RoadTypes rts = ::RoadTypeToRoadTypes((::RoadType)GetCurrentRoadType());
|
||||
int32 neighbour = 0;
|
||||
@@ -463,7 +461,6 @@ static bool NeighbourHasReachableRoad(::RoadTypes rts, TileIndex start_tile, Dia
|
||||
EnforcePrecondition(false, ::IsValidTile(end));
|
||||
EnforcePrecondition(false, ::TileX(start) == ::TileX(end) || ::TileY(start) == ::TileY(end));
|
||||
EnforcePrecondition(false, !one_way || AIObject::GetRoadType() == ::ROADTYPE_ROAD);
|
||||
EnforcePrecondition(false, IsRoadTypeAvailable(GetCurrentRoadType()));
|
||||
|
||||
return AIObject::DoCommand(end, start, (::TileY(start) != ::TileY(end) ? 4 : 0) | (((start < end) == !full) ? 1 : 2) | (AIObject::GetRoadType() << 3) | ((one_way ? 1 : 0) << 5), CMD_BUILD_LONG_ROAD);
|
||||
}
|
||||
@@ -494,7 +491,6 @@ static bool NeighbourHasReachableRoad(::RoadTypes rts, TileIndex start_tile, Dia
|
||||
EnforcePrecondition(false, ::IsValidTile(tile));
|
||||
EnforcePrecondition(false, ::IsValidTile(front));
|
||||
EnforcePrecondition(false, ::TileX(tile) == ::TileX(front) || ::TileY(tile) == ::TileY(front));
|
||||
EnforcePrecondition(false, IsRoadTypeAvailable(GetCurrentRoadType()));
|
||||
|
||||
uint entrance_dir = (::TileX(tile) == ::TileX(front)) ? (::TileY(tile) < ::TileY(front) ? 1 : 3) : (::TileX(tile) < ::TileX(front) ? 2 : 0);
|
||||
|
||||
@@ -509,7 +505,6 @@ static bool NeighbourHasReachableRoad(::RoadTypes rts, TileIndex start_tile, Dia
|
||||
EnforcePrecondition(false, ::TileX(tile) == ::TileX(front) || ::TileY(tile) == ::TileY(front));
|
||||
EnforcePrecondition(false, station_id == AIStation::STATION_NEW || station_id == AIStation::STATION_JOIN_ADJACENT || AIStation::IsValidStation(station_id));
|
||||
EnforcePrecondition(false, road_veh_type == ROADVEHTYPE_BUS || road_veh_type == ROADVEHTYPE_TRUCK);
|
||||
EnforcePrecondition(false, IsRoadTypeAvailable(GetCurrentRoadType()));
|
||||
|
||||
uint entrance_dir;
|
||||
if (drive_through) {
|
||||
@@ -541,7 +536,6 @@ static bool NeighbourHasReachableRoad(::RoadTypes rts, TileIndex start_tile, Dia
|
||||
EnforcePrecondition(false, ::IsValidTile(start));
|
||||
EnforcePrecondition(false, ::IsValidTile(end));
|
||||
EnforcePrecondition(false, ::TileX(start) == ::TileX(end) || ::TileY(start) == ::TileY(end));
|
||||
EnforcePrecondition(false, IsRoadTypeAvailable(GetCurrentRoadType()));
|
||||
|
||||
return AIObject::DoCommand(end, start, (::TileY(start) != ::TileY(end) ? 4 : 0) | (start < end ? 1 : 2) | (AIObject::GetRoadType() << 3), CMD_REMOVE_LONG_ROAD);
|
||||
}
|
||||
@@ -551,7 +545,6 @@ static bool NeighbourHasReachableRoad(::RoadTypes rts, TileIndex start_tile, Dia
|
||||
EnforcePrecondition(false, ::IsValidTile(start));
|
||||
EnforcePrecondition(false, ::IsValidTile(end));
|
||||
EnforcePrecondition(false, ::TileX(start) == ::TileX(end) || ::TileY(start) == ::TileY(end));
|
||||
EnforcePrecondition(false, IsRoadTypeAvailable(GetCurrentRoadType()));
|
||||
|
||||
return AIObject::DoCommand(end, start, (::TileY(start) != ::TileY(end) ? 4 : 0) | (start < end ? 2 : 1) | (AIObject::GetRoadType() << 3), CMD_REMOVE_LONG_ROAD);
|
||||
}
|
||||
|
@@ -134,7 +134,6 @@ public:
|
||||
* center of the second tile.
|
||||
* @param tile_from The source tile.
|
||||
* @param tile_to The destination tile.
|
||||
* @pre IsRoadTypeAvailable(GetCurrentRoadType()).
|
||||
* @pre AIMap::IsValidTile(tile_from).
|
||||
* @pre AIMap::IsValidTile(tile_to).
|
||||
* @pre 'tile_from' and 'tile_to' are directly neighbouring tiles.
|
||||
@@ -198,7 +197,6 @@ public:
|
||||
* Count how many neighbours are road.
|
||||
* @param tile The tile to check on.
|
||||
* @pre AIMap::IsValidTile(tile).
|
||||
* @pre IsRoadTypeAvailable(GetCurrentRoadType()).
|
||||
* @return 0 means no neighbour road; max value is 4.
|
||||
*/
|
||||
static int32 GetNeighbourRoadCount(TileIndex tile);
|
||||
@@ -239,7 +237,6 @@ public:
|
||||
* @pre 'start' and 'end' are in a straight line, i.e.
|
||||
* AIMap::GetTileX(start) == AIMap::GetTileX(end) or
|
||||
* AIMap::GetTileY(start) == AIMap::GetTileY(end).
|
||||
* @pre IsRoadTypeAvailable(GetCurrentRoadType()).
|
||||
* @exception AIError::ERR_ALREADY_BUILT
|
||||
* @exception AIError::ERR_LAND_SLOPED_WRONG
|
||||
* @exception AIError::ERR_AREA_NOT_CLEAR
|
||||
@@ -287,7 +284,6 @@ public:
|
||||
* @pre 'start' and 'end' are in a straight line, i.e.
|
||||
* AIMap::GetTileX(start) == AIMap::GetTileX(end) or
|
||||
* AIMap::GetTileY(start) == AIMap::GetTileY(end).
|
||||
* @pre IsRoadTypeAvailable(GetCurrentRoadType()).
|
||||
* @exception AIError::ERR_ALREADY_BUILT
|
||||
* @exception AIError::ERR_LAND_SLOPED_WRONG
|
||||
* @exception AIError::ERR_AREA_NOT_CLEAR
|
||||
@@ -332,7 +328,6 @@ public:
|
||||
* @pre AIMap::IsValidTile(tile).
|
||||
* @pre AIMap::IsValidTile(front).
|
||||
* @pre 'tile' is not equal to 'front', but in a straight line of it.
|
||||
* @pre IsRoadTypeAvailable(GetCurrentRoadType()).
|
||||
* @exception AIError::ERR_FLAT_LAND_REQUIRED
|
||||
* @exception AIError::ERR_AREA_NOT_CLEAR
|
||||
* @return Whether the road depot has been/can be build or not.
|
||||
@@ -349,13 +344,12 @@ public:
|
||||
* @pre AIMap::IsValidTile(front).
|
||||
* @pre 'tile' is not equal to 'front', but in a straight line of it.
|
||||
* @pre station_id == AIStation::STATION_NEW || station_id == AIStation::STATION_JOIN_ADJACENT || AIStation::IsValidStation(station_id).
|
||||
* @pre GetCurrentRoadType() == ROADTYPE_ROAD.
|
||||
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception AIError::ERR_AREA_NOT_CLEAR
|
||||
* @exception AIError::ERR_FLAT_LAND_REQUIRED
|
||||
* @exception AIRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION
|
||||
* @exception AIRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD
|
||||
* @exception AIError::ERR_VEHICLE_IN_THE_WAY
|
||||
* @exception AIError:ERR_VEHICLE_IN_THE_WAY
|
||||
* @exception AIStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION
|
||||
* @exception AIStation::ERR_STATION_TOO_MANY_STATIONS
|
||||
* @exception AIStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN
|
||||
@@ -365,7 +359,7 @@ public:
|
||||
|
||||
/**
|
||||
* Builds a drive-through road bus or truck station.
|
||||
* @param tile Place to build the station.
|
||||
* @param tile Place to build the depot.
|
||||
* @param front A tile on the same axis with 'tile' as the station shall be oriented.
|
||||
* @param road_veh_type Whether to build a truck or bus station.
|
||||
* @param station_id The station to join, AIStation::STATION_NEW or AIStation::STATION_JOIN_ADJACENT.
|
||||
@@ -373,13 +367,12 @@ public:
|
||||
* @pre AIMap::IsValidTile(front).
|
||||
* @pre 'tile' is not equal to 'front', but in a straight line of it.
|
||||
* @pre station_id == AIStation::STATION_NEW || station_id == AIStation::STATION_JOIN_ADJACENT || AIStation::IsValidStation(station_id).
|
||||
* @pre IsRoadTypeAvailable(GetCurrentRoadType()).
|
||||
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception AIError::ERR_AREA_NOT_CLEAR
|
||||
* @exception AIError::ERR_FLAT_LAND_REQUIRED
|
||||
* @exception AIRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION
|
||||
* @exception AIRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD
|
||||
* @exception AIError::ERR_VEHICLE_IN_THE_WAY
|
||||
* @exception AIError:ERR_VEHICLE_IN_THE_WAY
|
||||
* @exception AIStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION
|
||||
* @exception AIStation::ERR_STATION_TOO_MANY_STATIONS
|
||||
* @exception AIStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN
|
||||
@@ -396,7 +389,6 @@ public:
|
||||
* @pre 'start' and 'end' are in a straight line, i.e.
|
||||
* AIMap::GetTileX(start) == AIMap::GetTileX(end) or
|
||||
* AIMap::GetTileY(start) == AIMap::GetTileY(end).
|
||||
* @pre IsRoadTypeAvailable(GetCurrentRoadType()).
|
||||
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception AIError::ERR_VEHICLE_IN_THE_WAY
|
||||
* @exception AIRoad::ERR_ROAD_WORKS_IN_PROGRESS
|
||||
@@ -414,7 +406,6 @@ public:
|
||||
* @pre 'start' and 'end' are in a straight line, i.e.
|
||||
* AIMap::GetTileX(start) == AIMap::GetTileX(end) or
|
||||
* AIMap::GetTileY(start) == AIMap::GetTileY(end).
|
||||
* @pre IsRoadTypeAvailable(GetCurrentRoadType()).
|
||||
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception AIError::ERR_VEHICLE_IN_THE_WAY
|
||||
* @exception AIRoad::ERR_ROAD_WORKS_IN_PROGRESS
|
||||
|
@@ -30,10 +30,10 @@ void SQAISign_Register(Squirrel *engine) {
|
||||
|
||||
SQAISign.DefSQStaticMethod(engine, &AISign::GetMaxSignID, "GetMaxSignID", 1, ".");
|
||||
SQAISign.DefSQStaticMethod(engine, &AISign::IsValidSign, "IsValidSign", 2, ".i");
|
||||
SQAISign.DefSQStaticMethod(engine, &AISign::SetName, "SetName", 3, ".i.");
|
||||
SQAISign.DefSQStaticMethod(engine, &AISign::SetName, "SetName", 3, ".is");
|
||||
SQAISign.DefSQStaticMethod(engine, &AISign::GetName, "GetName", 2, ".i");
|
||||
SQAISign.DefSQStaticMethod(engine, &AISign::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAISign.DefSQStaticMethod(engine, &AISign::BuildSign, "BuildSign", 3, ".i.");
|
||||
SQAISign.DefSQStaticMethod(engine, &AISign::BuildSign, "BuildSign", 3, ".is");
|
||||
SQAISign.DefSQStaticMethod(engine, &AISign::RemoveSign, "RemoveSign", 2, ".i");
|
||||
|
||||
SQAISign.PostRegister(engine);
|
||||
|
@@ -55,13 +55,6 @@
|
||||
return ::GetStation(station_id)->xy;
|
||||
}
|
||||
|
||||
/* static */ int32 AIStation::GetConstructionDate(StationID station_id)
|
||||
{
|
||||
if (!IsValidStation(station_id)) return -1;
|
||||
|
||||
return ::GetStation(station_id)->build_date;
|
||||
}
|
||||
|
||||
/* static */ int32 AIStation::GetCargoWaiting(StationID station_id, CargoID cargo_id)
|
||||
{
|
||||
if (!IsValidStation(station_id)) return -1;
|
||||
|
@@ -102,13 +102,6 @@ public:
|
||||
*/
|
||||
static TileIndex GetLocation(StationID station_id);
|
||||
|
||||
/**
|
||||
* Get the last date a station part was added to this station.
|
||||
* @param station_id The station to look at.
|
||||
* @return The last date some part of this station was build.
|
||||
*/
|
||||
static int32 GetConstructionDate(StationID station_id);
|
||||
|
||||
/**
|
||||
* See how much cargo there is waiting on a station.
|
||||
* @param station_id The station to get the cargo-waiting of.
|
||||
|
@@ -57,9 +57,8 @@ void SQAIStation_Register(Squirrel *engine) {
|
||||
SQAIStation.DefSQStaticMethod(engine, &AIStation::IsValidStation, "IsValidStation", 2, ".i");
|
||||
SQAIStation.DefSQStaticMethod(engine, &AIStation::GetStationID, "GetStationID", 2, ".i");
|
||||
SQAIStation.DefSQStaticMethod(engine, &AIStation::GetName, "GetName", 2, ".i");
|
||||
SQAIStation.DefSQStaticMethod(engine, &AIStation::SetName, "SetName", 3, ".i.");
|
||||
SQAIStation.DefSQStaticMethod(engine, &AIStation::SetName, "SetName", 3, ".is");
|
||||
SQAIStation.DefSQStaticMethod(engine, &AIStation::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAIStation.DefSQStaticMethod(engine, &AIStation::GetConstructionDate, "GetConstructionDate", 2, ".i");
|
||||
SQAIStation.DefSQStaticMethod(engine, &AIStation::GetCargoWaiting, "GetCargoWaiting", 3, ".ii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &AIStation::GetCargoRating, "GetCargoRating", 3, ".ii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &AIStation::GetCoverageRadius, "GetCoverageRadius", 2, ".i");
|
||||
|
@@ -4,9 +4,6 @@
|
||||
|
||||
#include "ai_testmode.hpp"
|
||||
#include "../../command_type.h"
|
||||
#include "../../company_base.h"
|
||||
#include "../../company_func.h"
|
||||
#include "../ai_instance.hpp"
|
||||
|
||||
bool AITestMode::ModeProc(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs)
|
||||
{
|
||||
@@ -24,12 +21,6 @@ AITestMode::AITestMode()
|
||||
|
||||
AITestMode::~AITestMode()
|
||||
{
|
||||
if (this->GetDoCommandModeInstance() != this) {
|
||||
AIInstance *instance = GetCompany(_current_company)->ai_instance;
|
||||
/* Ignore this error if the AI already died. */
|
||||
if (!instance->IsDead()) {
|
||||
throw AI_FatalError("AITestmode object was removed while it was not the latest AI*Mode object created.");
|
||||
}
|
||||
}
|
||||
assert(this->GetDoCommandModeInstance() == this);
|
||||
this->SetDoCommandMode(this->last_mode, this->last_instance);
|
||||
}
|
||||
|
@@ -87,43 +87,31 @@
|
||||
|
||||
/* static */ bool AITile::HasTreeOnTile(TileIndex tile)
|
||||
{
|
||||
if (!::IsValidTile(tile)) return false;
|
||||
|
||||
return ::IsTileType(tile, MP_TREES);
|
||||
}
|
||||
|
||||
/* static */ bool AITile::IsFarmTile(TileIndex tile)
|
||||
{
|
||||
if (!::IsValidTile(tile)) return false;
|
||||
|
||||
return (::IsTileType(tile, MP_CLEAR) && ::IsClearGround(tile, CLEAR_FIELDS));
|
||||
}
|
||||
|
||||
/* static */ bool AITile::IsRockTile(TileIndex tile)
|
||||
{
|
||||
if (!::IsValidTile(tile)) return false;
|
||||
|
||||
return (::IsTileType(tile, MP_CLEAR) && ::IsClearGround(tile, CLEAR_ROCKS));
|
||||
}
|
||||
|
||||
/* static */ bool AITile::IsRoughTile(TileIndex tile)
|
||||
{
|
||||
if (!::IsValidTile(tile)) return false;
|
||||
|
||||
return (::IsTileType(tile, MP_CLEAR) && ::IsClearGround(tile, CLEAR_ROUGH));
|
||||
}
|
||||
|
||||
/* static */ bool AITile::IsSnowTile(TileIndex tile)
|
||||
{
|
||||
if (!::IsValidTile(tile)) return false;
|
||||
|
||||
return (::IsTileType(tile, MP_CLEAR) && ::IsClearGround(tile, CLEAR_SNOW));
|
||||
}
|
||||
|
||||
/* static */ bool AITile::IsDesertTile(TileIndex tile)
|
||||
{
|
||||
if (!::IsValidTile(tile)) return false;
|
||||
|
||||
return (::IsTileType(tile, MP_CLEAR) && ::IsClearGround(tile, CLEAR_DESERT));
|
||||
}
|
||||
|
||||
|
@@ -386,7 +386,7 @@ public:
|
||||
* @pre end_tile < AIMap::GetMapSize().
|
||||
* @exception AIError::ERR_AREA_NOT_CLEAR
|
||||
* @exception AIError::ERR_TOO_CLOSE_TO_EDGE
|
||||
* @return True if one or more tiles were leveled.
|
||||
* @return True if and only if the area was completely leveled.
|
||||
* @note Even if leveling some part fails, some other part may have been
|
||||
* succesfully leveled already.
|
||||
* @note This function may return true in AITestMode, although it fails in
|
||||
|
@@ -65,8 +65,8 @@
|
||||
const Town *t = ::GetTown(town_id);
|
||||
|
||||
switch(AICargo::GetTownEffect(cargo_id)) {
|
||||
case AICargo::TE_PASSENGERS: return t->max_pass;
|
||||
case AICargo::TE_MAIL: return t->max_mail;
|
||||
case AICargo::TE_PASSENGERS: return t->act_pass;
|
||||
case AICargo::TE_MAIL: return t->act_mail;
|
||||
default: return -1;
|
||||
}
|
||||
}
|
||||
@@ -79,27 +79,22 @@
|
||||
const Town *t = ::GetTown(town_id);
|
||||
|
||||
switch(AICargo::GetTownEffect(cargo_id)) {
|
||||
case AICargo::TE_PASSENGERS: return t->act_pass;
|
||||
case AICargo::TE_MAIL: return t->act_mail;
|
||||
case AICargo::TE_PASSENGERS: return t->pct_pass_transported;
|
||||
case AICargo::TE_MAIL: return t->pct_mail_transported;
|
||||
default: return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ int32 AITown::GetMaxProduction(TownID town_id, CargoID cargo_id)
|
||||
{
|
||||
return AITown::GetLastMonthProduction(town_id, cargo_id);
|
||||
}
|
||||
|
||||
/* static */ int32 AITown::GetLastMonthTransportedPercentage(TownID town_id, CargoID cargo_id)
|
||||
{
|
||||
if (!IsValidTown(town_id)) return -1;
|
||||
if (!AICargo::IsValidCargo(cargo_id)) return -1;
|
||||
|
||||
const Town *t = ::GetTown(town_id);
|
||||
|
||||
switch (AICargo::GetTownEffect(cargo_id)) {
|
||||
case AICargo::TE_PASSENGERS: return t->pct_pass_transported * 100 >> 8;
|
||||
case AICargo::TE_MAIL: return t->pct_mail_transported * 100 >> 8;
|
||||
switch(AICargo::GetTownEffect(cargo_id)) {
|
||||
case AICargo::TE_PASSENGERS: return t->max_pass;
|
||||
case AICargo::TE_MAIL: return t->max_mail;
|
||||
default: return -1;
|
||||
}
|
||||
}
|
||||
|
@@ -180,18 +180,6 @@ public:
|
||||
*/
|
||||
static int32 GetMaxProduction(TownID town_id, CargoID cargo_id);
|
||||
|
||||
/**
|
||||
* Get the percentage of transported production of the given cargo at a town.
|
||||
* @param town_id The index of the town.
|
||||
* @param cargo_id The index of the cargo.
|
||||
* @pre IsValidTown(town_id).
|
||||
* @pre AICargo::IsValidCargo(cargo_id).
|
||||
* @pre AICargo::GetTownEffect(cargo_id) == TE_PASSENGERS || AICargo::GetTownEffect(cargo_id) == TE_MAIL.
|
||||
* @return The percentage of given cargo transported from this town last month.
|
||||
* @post Return value is always non-negative.
|
||||
*/
|
||||
static int32 GetLastMonthTransportedPercentage(TownID town_id, CargoID cargo_id);
|
||||
|
||||
/**
|
||||
* Get the manhattan distance from the tile to the AITown::GetLocation()
|
||||
* of the town.
|
||||
|
@@ -49,28 +49,27 @@ void SQAITown_Register(Squirrel *engine) {
|
||||
SQAITown.DefSQConst(engine, AITown::ROAD_LAYOUT_3x3, "ROAD_LAYOUT_3x3");
|
||||
SQAITown.DefSQConst(engine, AITown::ROAD_LAYOUT_INVALID, "ROAD_LAYOUT_INVALID");
|
||||
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetTownCount, "GetTownCount", 1, ".");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::IsValidTown, "IsValidTown", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetName, "GetName", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetPopulation, "GetPopulation", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetHouseCount, "GetHouseCount", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetLastMonthTransported, "GetLastMonthTransported", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetMaxProduction, "GetMaxProduction", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetLastMonthTransportedPercentage, "GetLastMonthTransportedPercentage", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::HasStatue, "HasStatue", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetRoadReworkDuration, "GetRoadReworkDuration", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetExclusiveRightsCompany, "GetExclusiveRightsCompany", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetExclusiveRightsDuration, "GetExclusiveRightsDuration", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::IsActionAvailable, "IsActionAvailable", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::PerformTownAction, "PerformTownAction", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetRating, "GetRating", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetAllowedNoise, "GetAllowedNoise", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetRoadLayout, "GetRoadLayout", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetTownCount, "GetTownCount", 1, ".");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::IsValidTown, "IsValidTown", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetName, "GetName", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetPopulation, "GetPopulation", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetHouseCount, "GetHouseCount", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetLastMonthTransported, "GetLastMonthTransported", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetMaxProduction, "GetMaxProduction", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::HasStatue, "HasStatue", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetRoadReworkDuration, "GetRoadReworkDuration", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetExclusiveRightsCompany, "GetExclusiveRightsCompany", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetExclusiveRightsDuration, "GetExclusiveRightsDuration", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::IsActionAvailable, "IsActionAvailable", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::PerformTownAction, "PerformTownAction", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetRating, "GetRating", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetAllowedNoise, "GetAllowedNoise", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &AITown::GetRoadLayout, "GetRoadLayout", 2, ".i");
|
||||
|
||||
SQAITown.PostRegister(engine);
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
ERR_VEHICLE_IN_FLIGHT, // [STR_A017_AIRCRAFT_IS_IN_FLIGHT]
|
||||
|
||||
/** Vehicle is without power */
|
||||
ERR_VEHICLE_NO_POWER, // [STR_TRAIN_START_NO_CATENARY]
|
||||
ERR_VEHCILE_NO_POWER, // [STR_TRAIN_START_NO_CATENARY]
|
||||
|
||||
};
|
||||
|
||||
|
@@ -37,7 +37,7 @@ void SQAIVehicle_Register(Squirrel *engine) {
|
||||
SQAIVehicle.DefSQConst(engine, AIVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED");
|
||||
SQAIVehicle.DefSQConst(engine, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT");
|
||||
SQAIVehicle.DefSQConst(engine, AIVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT");
|
||||
SQAIVehicle.DefSQConst(engine, AIVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER");
|
||||
SQAIVehicle.DefSQConst(engine, AIVehicle::ERR_VEHCILE_NO_POWER, "ERR_VEHCILE_NO_POWER");
|
||||
SQAIVehicle.DefSQConst(engine, AIVehicle::VT_RAIL, "VT_RAIL");
|
||||
SQAIVehicle.DefSQConst(engine, AIVehicle::VT_ROAD, "VT_ROAD");
|
||||
SQAIVehicle.DefSQConst(engine, AIVehicle::VT_WATER, "VT_WATER");
|
||||
@@ -85,7 +85,7 @@ void SQAIVehicle_Register(Squirrel *engine) {
|
||||
AIError::RegisterErrorMap(STR_TRAIN_MUST_BE_STOPPED, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
|
||||
AIError::RegisterErrorMap(STR_980B_SHIP_MUST_BE_STOPPED_IN, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
|
||||
AIError::RegisterErrorMap(STR_A017_AIRCRAFT_IS_IN_FLIGHT, AIVehicle::ERR_VEHICLE_IN_FLIGHT);
|
||||
AIError::RegisterErrorMap(STR_TRAIN_START_NO_CATENARY, AIVehicle::ERR_VEHICLE_NO_POWER);
|
||||
AIError::RegisterErrorMap(STR_TRAIN_START_NO_CATENARY, AIVehicle::ERR_VEHCILE_NO_POWER);
|
||||
|
||||
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY");
|
||||
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE");
|
||||
@@ -98,11 +98,11 @@ void SQAIVehicle_Register(Squirrel *engine) {
|
||||
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED");
|
||||
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT");
|
||||
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT");
|
||||
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER");
|
||||
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHCILE_NO_POWER, "ERR_VEHCILE_NO_POWER");
|
||||
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsValidVehicle, "IsValidVehicle", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetNumWagons, "GetNumWagons", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SetName, "SetName", 3, ".i.");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SetName, "SetName", 3, ".is");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetName, "GetName", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetEngineType, "GetEngineType", 2, ".i");
|
||||
|
@@ -26,7 +26,7 @@ void SQAIWaypoint_Register(Squirrel *engine) {
|
||||
SQAIWaypoint.DefSQStaticMethod(engine, &AIWaypoint::IsValidWaypoint, "IsValidWaypoint", 2, ".i");
|
||||
SQAIWaypoint.DefSQStaticMethod(engine, &AIWaypoint::GetWaypointID, "GetWaypointID", 2, ".i");
|
||||
SQAIWaypoint.DefSQStaticMethod(engine, &AIWaypoint::GetName, "GetName", 2, ".i");
|
||||
SQAIWaypoint.DefSQStaticMethod(engine, &AIWaypoint::SetName, "SetName", 3, ".i.");
|
||||
SQAIWaypoint.DefSQStaticMethod(engine, &AIWaypoint::SetName, "SetName", 3, ".is");
|
||||
SQAIWaypoint.DefSQStaticMethod(engine, &AIWaypoint::GetLocation, "GetLocation", 2, ".i");
|
||||
|
||||
SQAIWaypoint.PostRegister(engine);
|
||||
|
@@ -34,7 +34,6 @@ BEGIN {
|
||||
enum_value_size = 0
|
||||
enum_string_to_error_size = 0
|
||||
enum_error_to_string_size = 0
|
||||
const_size = 0
|
||||
struct_size = 0
|
||||
method_size = 0
|
||||
static_method_size = 0
|
||||
@@ -218,17 +217,6 @@ BEGIN {
|
||||
}
|
||||
if (enum_value_size != 0) print ""
|
||||
|
||||
# Const values
|
||||
mlen = 0
|
||||
for (i = 1; i <= const_size; i++) {
|
||||
if (mlen <= length(const_value[i])) mlen = length(const_value[i])
|
||||
}
|
||||
for (i = 1; i <= const_size; i++) {
|
||||
print " SQ" cls ".DefSQConst(engine, " cls "::" const_value[i] ", " substr(spaces, 1, mlen - length(const_value[i])) "\"" const_value[i] "\");"
|
||||
delete const_value[i]
|
||||
}
|
||||
if (const_size != 0) print ""
|
||||
|
||||
# Mapping of OTTD strings to errors
|
||||
mlen = 0
|
||||
for (i = 1; i <= enum_string_to_error_size; i++) {
|
||||
@@ -332,13 +320,6 @@ BEGIN {
|
||||
}
|
||||
}
|
||||
|
||||
# Add a const (non-enum) value
|
||||
/^[ ]*static const \w+ \w+ = \w+;/ {
|
||||
const_size++
|
||||
const_value[const_size] = $4
|
||||
next
|
||||
}
|
||||
|
||||
# Add a method to the list
|
||||
/^.*\(.*\).*$/ {
|
||||
if (cls_level != 1) next
|
||||
@@ -375,7 +356,7 @@ BEGIN {
|
||||
sub("^[ ]*", "", params[len])
|
||||
if (match(params[len], "\\*") || match(params[len], "&")) {
|
||||
if (match(params[len], "^char")) {
|
||||
types = types "."
|
||||
types = types "s"
|
||||
} else if (match(params[len], "^void")) {
|
||||
types = types "p"
|
||||
} else if (match(params[len], "^Array")) {
|
||||
|
@@ -2,10 +2,6 @@
|
||||
|
||||
# $Id$
|
||||
|
||||
# Set neutral locale so sort behaves the same everywhere
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
# We really need gawk for this!
|
||||
AWK=gawk
|
||||
|
||||
@@ -21,10 +17,10 @@ if [ -z "$1" ]; then
|
||||
for f in `ls *.hpp`; do
|
||||
case "${f}" in
|
||||
# these files should not be changed by this script
|
||||
"ai_controller.hpp" | "ai_object.hpp" | "ai_types.hpp" | "ai_changelog.hpp" | "ai_info_docs.hpp" ) continue;
|
||||
"ai_controller.hpp" | "ai_object.hpp" | "ai_types.hpp" ) continue;
|
||||
esac
|
||||
${AWK} -f squirrel_export.awk ${f} > ${f}.tmp
|
||||
if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' ${f}.tmp ${f}.sq 2> /dev/null || echo boo`" ]; then
|
||||
if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' -b ${f}.tmp ${f}.sq 2> /dev/null || echo boo`" ]; then
|
||||
mv ${f}.tmp ${f}.sq
|
||||
echo "Updated: ${f}.sq"
|
||||
svn add ${f}.sq > /dev/null 2>&1
|
||||
@@ -36,7 +32,7 @@ if [ -z "$1" ]; then
|
||||
done
|
||||
else
|
||||
${AWK} -f squirrel_export.awk $1 > $1.tmp
|
||||
if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' $1.sq $1.tmp 2> /dev/null || echo boo`" ]; then
|
||||
if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' -b $1.sq $1.tmp 2> /dev/null || echo boo`" ]; then
|
||||
mv $1.tmp $1.sq
|
||||
echo "Updated: $1.sq"
|
||||
svn add $1.sq > /dev/null 2>&1
|
||||
@@ -99,7 +95,7 @@ echo "
|
||||
|
||||
${AWK} -f ${f}.awk ${f} > ${f}.tmp
|
||||
|
||||
if ! [ -f "${f}" ] || [ -n "`diff -I '$Id' ${f} ${f}.tmp 2> /dev/null || echo boo`" ]; then
|
||||
if ! [ -f "${f}" ] || [ -n "`diff -I '$Id' -b ${f} ${f}.tmp 2> /dev/null || echo boo`" ]; then
|
||||
mv ${f}.tmp ${f}
|
||||
echo "Updated: ${f}"
|
||||
else
|
||||
|
@@ -706,9 +706,11 @@ void SetAircraftPosition(Vehicle *v, int x, int y, int z)
|
||||
v->y_pos = y;
|
||||
v->z_pos = z;
|
||||
|
||||
v->UpdateViewport(true, false);
|
||||
v->cur_image = v->GetImage(v->direction);
|
||||
if (v->subtype == AIR_HELICOPTER) v->Next()->Next()->cur_image = GetRotorImage(v);
|
||||
|
||||
VehicleMove(v, true);
|
||||
|
||||
Vehicle *u = v->Next();
|
||||
|
||||
int safe_x = Clamp(x, 0, MapMaxX() * TILE_SIZE);
|
||||
@@ -1291,8 +1293,9 @@ TileIndex Aircraft::GetOrderStationLocation(StationID station)
|
||||
|
||||
void Aircraft::MarkDirty()
|
||||
{
|
||||
this->UpdateViewport(false, false);
|
||||
this->cur_image = this->GetImage(this->direction);
|
||||
if (this->subtype == AIR_HELICOPTER) this->Next()->Next()->cur_image = GetRotorImage(this);
|
||||
MarkSingleVehicleDirty(this);
|
||||
}
|
||||
|
||||
static void CrashAirplane(Vehicle *v)
|
||||
@@ -1303,7 +1306,6 @@ static void CrashAirplane(Vehicle *v)
|
||||
CreateEffectVehicleRel(v, 4, 4, 8, EV_EXPLOSION_LARGE);
|
||||
|
||||
InvalidateWindow(WC_VEHICLE_VIEW, v->index);
|
||||
v->MarkDirty();
|
||||
|
||||
uint amt = 2;
|
||||
if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) amt += v->cargo.Count();
|
||||
|
@@ -606,7 +606,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
|
||||
assert(res.GetCost() == res2.GetCost() && CmdFailed(res) == CmdFailed(res2)); // sanity check
|
||||
} else {
|
||||
if (CmdFailed(res2)) {
|
||||
res2.SetGlobalErrorMessage();
|
||||
res.SetGlobalErrorMessage();
|
||||
goto show_error;
|
||||
}
|
||||
}
|
||||
|
@@ -59,14 +59,7 @@ Company::~Company()
|
||||
if (CleaningPool()) return;
|
||||
|
||||
DeleteCompanyWindows(this->index);
|
||||
|
||||
/* Zero the memory of the company; we might 'reuse' it later on.
|
||||
* This is more a hack than a proper fix, but... it's already
|
||||
* fixed in trunk by the new pool system and this is the only
|
||||
* troublesome case in 0.7, so we'll leave it at this fix. */
|
||||
CompanyID id = this->index;
|
||||
memset(this, 0, sizeof(*this));
|
||||
this->index = id;
|
||||
this->name_1 = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -264,9 +257,7 @@ static void GenerateCompanyName(Company *c)
|
||||
StringID str;
|
||||
Company *cc;
|
||||
uint32 strp;
|
||||
/* Reserve space for extra unicode character. We need to do this to be able
|
||||
* to detect too long company name. */
|
||||
char buffer[MAX_LENGTH_COMPANY_NAME_BYTES + MAX_CHAR_LENGTH];
|
||||
char buffer[100];
|
||||
|
||||
if (c->name_1 != STR_SV_UNNAMED) return;
|
||||
|
||||
@@ -398,9 +389,7 @@ restart:;
|
||||
c->president_name_2 = Random();
|
||||
c->president_name_1 = SPECSTR_PRESIDENT_NAME;
|
||||
|
||||
/* Reserve space for extra unicode character. We need to do this to be able
|
||||
* to detect too long president name. */
|
||||
char buffer[MAX_LENGTH_PRESIDENT_NAME_BYTES + MAX_CHAR_LENGTH];
|
||||
char buffer[MAX_LENGTH_PRESIDENT_NAME_BYTES + 1];
|
||||
SetDParam(0, c->index);
|
||||
GetString(buffer, STR_PRESIDENT_NAME, lastof(buffer));
|
||||
if (strlen(buffer) >= MAX_LENGTH_PRESIDENT_NAME_BYTES) continue;
|
||||
@@ -408,8 +397,7 @@ restart:;
|
||||
Company *cc;
|
||||
FOR_ALL_COMPANIES(cc) {
|
||||
if (c != cc) {
|
||||
/* Reserve extra space so even overlength president names can be compared. */
|
||||
char buffer2[MAX_LENGTH_PRESIDENT_NAME_BYTES + MAX_CHAR_LENGTH];
|
||||
char buffer2[MAX_LENGTH_PRESIDENT_NAME_BYTES + 2];
|
||||
SetDParam(0, cc->index);
|
||||
GetString(buffer2, STR_PRESIDENT_NAME, lastof(buffer2));
|
||||
if (strcmp(buffer2, buffer) == 0) goto restart;
|
||||
@@ -432,23 +420,16 @@ void ResetCompanyLivery(Company *c)
|
||||
* Create a new company and sets all company variables default values
|
||||
*
|
||||
* @param is_ai is a ai company?
|
||||
* @param company CompanyID to use for the new company
|
||||
* @return the company struct
|
||||
*/
|
||||
Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY)
|
||||
Company *DoStartupNewCompany(bool is_ai)
|
||||
{
|
||||
if (ActiveCompanyCount() == MAX_COMPANIES || !Company::CanAllocateItem()) return NULL;
|
||||
|
||||
/* we have to generate colour before this company is valid */
|
||||
Colours colour = GenerateCompanyColour();
|
||||
|
||||
Company *c;
|
||||
if (company == INVALID_COMPANY) {
|
||||
c = new Company(STR_SV_UNNAMED, is_ai);
|
||||
} else {
|
||||
if (IsValidCompanyID(company)) return NULL;
|
||||
c = new (company) Company(STR_SV_UNNAMED, is_ai);
|
||||
}
|
||||
Company *c = new Company(STR_SV_UNNAMED, is_ai);
|
||||
|
||||
c->colour = colour;
|
||||
|
||||
@@ -505,7 +486,7 @@ static void MaybeStartNewCompany()
|
||||
if (n < (uint)_settings_game.difficulty.max_no_competitors) {
|
||||
/* Send a command to all clients to start up a new AI.
|
||||
* Works fine for Multiplayer and Singleplayer */
|
||||
DoCommandP(0, 1, INVALID_COMPANY, CMD_COMPANY_CTRL);
|
||||
DoCommandP(0, 1, 0, CMD_COMPANY_CTRL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -719,7 +700,6 @@ void CompanyNewsInformation::FillData(const Company *c, const Company *other)
|
||||
* - p1 = 3 - merge two companies together. merge #1 with #2. Identified by p2
|
||||
* @param p2 various functionality, dictated by p1
|
||||
* - p1 = 0 - ClientID of the newly created client
|
||||
* - p1 = 1 - CompanyID to start AI (INVALID_COMPANY for first available)
|
||||
* - p1 = 2 - CompanyID of the that is getting deleted
|
||||
* - p1 = 3 - #1 p2 = (bit 0-15) - company to merge (p2 & 0xFFFF)
|
||||
* - #2 p2 = (bit 16-31) - company to be merged into ((p2>>16)&0xFFFF)
|
||||
@@ -835,8 +815,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
case 1: // Make a new AI company
|
||||
if (!(flags & DC_EXEC)) return CommandCost();
|
||||
|
||||
if (p2 != INVALID_COMPANY && (p2 >= MAX_COMPANIES || IsValidCompanyID((CompanyID)p2))) return CMD_ERROR;
|
||||
DoStartupNewCompany(true, (CompanyID)p2);
|
||||
DoStartupNewCompany(true);
|
||||
break;
|
||||
|
||||
case 2: { // Delete a company
|
||||
|
@@ -933,16 +933,13 @@ DEF_CONSOLE_CMD(ConRestart)
|
||||
if (argc == 0) {
|
||||
IConsoleHelp("Restart game. Usage: 'restart'");
|
||||
IConsoleHelp("Restarts a game. It tries to reproduce the exact same map as the game started with.");
|
||||
IConsoleHelp("However:");
|
||||
IConsoleHelp(" * restarting games started in another version might create another map due to difference in map generation");
|
||||
IConsoleHelp(" * restarting games based on scenarios, loaded games or heightmaps will start a new game based on the settings stored in the scenario/savegame");
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Don't copy the _newgame pointers to the real pointers, so call SwitchToMode directly */
|
||||
_settings_game.game_creation.map_x = MapLogX();
|
||||
_settings_game.game_creation.map_y = FindFirstBit(MapSizeY());
|
||||
SwitchToMode(SM_RESTARTGAME);
|
||||
SwitchToMode(SM_NEWGAME);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1018,7 +1015,7 @@ DEF_CONSOLE_CMD(ConStartAI)
|
||||
}
|
||||
|
||||
/* Start a new AI company */
|
||||
DoCommandP(0, 1, INVALID_COMPANY, CMD_COMPANY_CTRL);
|
||||
DoCommandP(0, 1, 0, CMD_COMPANY_CTRL);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1054,7 +1051,7 @@ DEF_CONSOLE_CMD(ConReloadAI)
|
||||
|
||||
/* First kill the company of the AI, then start a new one. This should start the current AI again */
|
||||
DoCommandP(0, 2, company_id, CMD_COMPANY_CTRL);
|
||||
DoCommandP(0, 1, company_id, CMD_COMPANY_CTRL);
|
||||
DoCommandP(0, 1, 0, CMD_COMPANY_CTRL);
|
||||
IConsolePrint(CC_DEFAULT, "AI reloaded.");
|
||||
|
||||
return true;
|
||||
|
@@ -10,7 +10,6 @@
|
||||
#include "core/bitmath_func.hpp"
|
||||
#include "tile_map.h"
|
||||
#include "water_map.h"
|
||||
#include "vehicle_gui.h"
|
||||
|
||||
DEFINE_OLD_POOL_GENERIC(Depot, Depot)
|
||||
|
||||
@@ -49,16 +48,6 @@ Depot::~Depot()
|
||||
|
||||
/* Delete the depot-window */
|
||||
DeleteWindowById(WC_VEHICLE_DEPOT, this->xy);
|
||||
|
||||
/* Delete the depot list */
|
||||
WindowNumber wno = (this->index << 16) | VLW_DEPOT_LIST | GetTileOwner(this->xy);
|
||||
switch (GetTileType(this->xy)) {
|
||||
default: break; // It can happen there is no depot here anymore (TTO/TTD savegames)
|
||||
case MP_RAILWAY: DeleteWindowById(WC_TRAINS_LIST, wno | (VEH_TRAIN << 11)); break;
|
||||
case MP_ROAD: DeleteWindowById(WC_ROADVEH_LIST, wno | (VEH_ROAD << 11)); break;
|
||||
case MP_WATER: DeleteWindowById(WC_SHIPS_LIST, wno | (VEH_SHIP << 11)); break;
|
||||
}
|
||||
|
||||
this->xy = INVALID_TILE;
|
||||
}
|
||||
|
||||
|
@@ -626,7 +626,8 @@ static void DisasterTick_Big_Ufo(Vehicle *v)
|
||||
|
||||
tile_org = tile = RandomTile();
|
||||
do {
|
||||
if (IsPlainRailTile(tile) &&
|
||||
if (IsTileType(tile, MP_RAILWAY) &&
|
||||
IsPlainRailTile(tile) &&
|
||||
IsHumanCompany(GetTileOwner(tile))) {
|
||||
break;
|
||||
}
|
||||
|
@@ -469,7 +469,6 @@ static void CompanyCheckBankrupt(Company *c)
|
||||
/* If the company has money again, it does not go bankrupt */
|
||||
if (c->money >= 0) {
|
||||
c->quarters_of_bankrupcy = 0;
|
||||
c->bankrupt_asked = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -522,7 +521,7 @@ static void CompanyCheckBankrupt(Company *c)
|
||||
* he/she is no long in control of this company. However... when you
|
||||
* join another company (cheat) the "unowned" company can bankrupt. */
|
||||
c->bankrupt_asked = MAX_UVALUE(CompanyMask);
|
||||
free(cni);
|
||||
c->bankrupt_timeout = 0x456;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -671,18 +670,9 @@ static void CompaniesPayInterest()
|
||||
|
||||
static void HandleEconomyFluctuations()
|
||||
{
|
||||
if (_settings_game.difficulty.economy != 0) {
|
||||
/* When economy is Fluctuating, decrease counter */
|
||||
_economy.fluct--;
|
||||
} else if (_economy.fluct <= 0) {
|
||||
/* When it's Steady and we are in recession, end it now */
|
||||
_economy.fluct = -12;
|
||||
} else {
|
||||
/* No need to do anything else in other cases */
|
||||
return;
|
||||
}
|
||||
if (_settings_game.difficulty.economy == 0) return;
|
||||
|
||||
if (_economy.fluct == 0) {
|
||||
if (--_economy.fluct == 0) {
|
||||
_economy.fluct = -(int)GB(Random(), 0, 2);
|
||||
AddNewsItem(STR_7073_WORLD_RECESSION_FINANCIAL, NS_ECONOMY, 0, 0);
|
||||
} else if (_economy.fluct == -12) {
|
||||
@@ -1153,7 +1143,7 @@ Money GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, C
|
||||
int result = GB(callback, 0, 14);
|
||||
|
||||
/* Simulate a 15 bit signed value */
|
||||
if (HasBit(callback, 14)) result -= 0x4000;
|
||||
if (HasBit(callback, 14)) result = 0x4000 - result;
|
||||
|
||||
/* "The result should be a signed multiplier that gets multiplied
|
||||
* by the amount of cargo moved and the price factor, then gets
|
||||
@@ -1563,8 +1553,6 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
|
||||
{
|
||||
assert(v->current_order.IsType(OT_LOADING));
|
||||
|
||||
assert(v->load_unload_time_rem != 0);
|
||||
|
||||
/* We have not waited enough time till the next round of loading/unloading */
|
||||
if (--v->load_unload_time_rem != 0) {
|
||||
if (_settings_game.order.improved_load && (v->current_order.GetLoadType() & OLFB_FULL_LOAD)) {
|
||||
@@ -1584,7 +1572,6 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
|
||||
/* The train reversed in the station. Take the "easy" way
|
||||
* out and let the train just leave as it always did. */
|
||||
SetBit(v->vehicle_flags, VF_LOADING_FINISHED);
|
||||
v->load_unload_time_rem = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1678,11 +1665,9 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
|
||||
/* update stats */
|
||||
int t;
|
||||
switch (u->type) {
|
||||
case VEH_TRAIN: t = u->u.rail.cached_max_speed; break;
|
||||
case VEH_ROAD: t = u->max_speed / 2; break;
|
||||
case VEH_SHIP: t = u->max_speed; break;
|
||||
case VEH_AIRCRAFT: t = u->max_speed * 10 / 129; break; // convert to old units
|
||||
default: NOT_REACHED();
|
||||
case VEH_TRAIN: t = u->u.rail.cached_max_speed; break;
|
||||
case VEH_ROAD: t = u->max_speed / 2; break;
|
||||
default: t = u->max_speed; break;
|
||||
}
|
||||
|
||||
/* if last speed is 0, we treat that as if no vehicle has ever visited the station. */
|
||||
@@ -1814,8 +1799,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
|
||||
}
|
||||
}
|
||||
|
||||
/* Always wait at least 1, otherwise we'll wait 'infinitively' long. */
|
||||
v->load_unload_time_rem = max(1, unloading_time);
|
||||
v->load_unload_time_rem = unloading_time;
|
||||
|
||||
if (completely_emptied) {
|
||||
TriggerVehicle(v, VEHICLE_TRIGGER_EMPTY);
|
||||
|
@@ -116,7 +116,7 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
|
||||
*/
|
||||
static TrackBits MaskWireBits(TileIndex t, TrackBits tracks)
|
||||
{
|
||||
if (!IsPlainRailTile(t)) return tracks;
|
||||
if (!IsTileType(t, MP_RAILWAY) || !IsPlainRailTile(t)) return tracks;
|
||||
|
||||
TrackdirBits neighbour_tdb = TRACKDIR_BIT_NONE;
|
||||
for (DiagDirection d = DIAGDIR_BEGIN; d < DIAGDIR_END; d++) {
|
||||
|
@@ -481,11 +481,11 @@ void StartupOneEngine(Engine *e, Date aging_date)
|
||||
e->flags = 0;
|
||||
e->company_avail = 0;
|
||||
|
||||
/* Don't randomise the start-date in the first two years after gamestart to ensure availability
|
||||
* of engines in early starting games.
|
||||
* Note: TTDP uses fixed 1922 */
|
||||
/* The magic value of 729 days below comes from the NewGRF spec. If the
|
||||
* base intro date is before 1922 then the random number of days is not
|
||||
* added. */
|
||||
r = Random();
|
||||
e->intro_date = ei->base_intro <= ConvertYMDToDate(_settings_game.game_creation.starting_year + 2, 0, 1) ? ei->base_intro : (Date)GB(r, 0, 9) + ei->base_intro;
|
||||
e->intro_date = ei->base_intro <= ConvertYMDToDate(1922, 0, 1) ? ei->base_intro : (Date)GB(r, 0, 9) + ei->base_intro;
|
||||
if (e->intro_date <= _date) {
|
||||
e->age = (aging_date - e->intro_date) >> 5;
|
||||
e->company_avail = (CompanyMask)-1;
|
||||
|
@@ -39,7 +39,7 @@ void StartupEconomy();
|
||||
void StartupCompanies();
|
||||
void StartupDisasters();
|
||||
|
||||
void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settings);
|
||||
void InitializeGame(uint size_x, uint size_y, bool reset_date);
|
||||
|
||||
/* Please only use this variable in genworld.h and genworld.c and
|
||||
* nowhere else. For speed improvements we need it to be global, but
|
||||
@@ -256,7 +256,7 @@ void HandleGeneratingWorldAbortion()
|
||||
* @param size_x The X-size of the map.
|
||||
* @param size_y The Y-size of the map.
|
||||
*/
|
||||
void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y, bool reset_settings)
|
||||
void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y)
|
||||
{
|
||||
if (_gw.active) return;
|
||||
_gw.mode = mode;
|
||||
@@ -281,7 +281,7 @@ void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y, bool reset_
|
||||
GfxLoadSprites();
|
||||
LoadStringWidthTable();
|
||||
|
||||
InitializeGame(_gw.size_x, _gw.size_y, false, reset_settings);
|
||||
InitializeGame(_gw.size_x, _gw.size_y, false);
|
||||
PrepareGenerateWorldProgress();
|
||||
|
||||
/* Re-init the windowing system */
|
||||
|
@@ -74,7 +74,7 @@ bool IsGenerateWorldThreaded();
|
||||
void GenerateWorldSetCallback(gw_done_proc *proc);
|
||||
void GenerateWorldSetAbortCallback(gw_abort_proc *proc);
|
||||
void WaitTillGeneratedWorld();
|
||||
void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y, bool reset_settings = true);
|
||||
void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y);
|
||||
void AbortGeneratingWorld();
|
||||
bool IsGeneratingWorldAborted();
|
||||
void HandleGeneratingWorldAbortion();
|
||||
|
@@ -229,26 +229,16 @@ void CheckExternalFiles()
|
||||
|
||||
DEBUG(grf, 1, "Using the %s base graphics set with the %s palette", _used_graphics_set->name, _use_palette == PAL_DOS ? "DOS" : "Windows");
|
||||
|
||||
static const size_t ERROR_MESSAGE_LENGTH = 256;
|
||||
static const size_t MISSING_FILE_MESSAGE_LENGTH = 128;
|
||||
|
||||
/* Allocate for a message for each missing file and for one error
|
||||
* message per set.
|
||||
*/
|
||||
char error_msg[MISSING_FILE_MESSAGE_LENGTH * (MAX_GFT + 1) + 2 * ERROR_MESSAGE_LENGTH];
|
||||
static const size_t ERROR_MESSAGE_LENGTH = 128;
|
||||
char error_msg[ERROR_MESSAGE_LENGTH * (MAX_GFT + 1)];
|
||||
error_msg[0] = '\0';
|
||||
char *add_pos = error_msg;
|
||||
const char *last = lastof(error_msg);
|
||||
|
||||
if (_used_graphics_set->found_grfs != MAX_GFT) {
|
||||
/* Not all files were loaded succesfully, see which ones */
|
||||
add_pos += seprintf(add_pos, last, "Trying to load graphics set '%s', but it is incomplete. The game will probably not run correctly until you properly install this set or select another one.\n\nThe following files are corrupted or missing:\n", _used_graphics_set->name);
|
||||
for (uint i = 0; i < lengthof(_used_graphics_set->files); i++) {
|
||||
if (!FileMD5(_used_graphics_set->files[i])) {
|
||||
add_pos += seprintf(add_pos, last, "\t%s (%s)\n", _used_graphics_set->files[i].filename, _used_graphics_set->files[i].missing_warning);
|
||||
}
|
||||
for (uint i = 0; i < lengthof(_used_graphics_set->files); i++) {
|
||||
if (!FileMD5(_used_graphics_set->files[i])) {
|
||||
add_pos += seprintf(add_pos, last, "Your '%s' file is corrupted or missing! %s\n", _used_graphics_set->files[i].filename, _used_graphics_set->files[i].missing_warning);
|
||||
}
|
||||
add_pos += seprintf(add_pos, last, "\n");
|
||||
}
|
||||
|
||||
bool sound = false;
|
||||
@@ -257,8 +247,7 @@ void CheckExternalFiles()
|
||||
}
|
||||
|
||||
if (!sound) {
|
||||
add_pos += seprintf(add_pos, last, "Trying to load sound set, but it is incomplete. The game will probably not run correctly until you properly install this set or select another one.\n\nThe following files are corrupted or missing:\n");
|
||||
add_pos += seprintf(add_pos, last, "\tsample.cat (You can find it on your Transport Tycoon Deluxe CD-ROM.)\n");
|
||||
add_pos += seprintf(add_pos, last, "Your 'sample.cat' file is corrupted or missing! You can find 'sample.cat' on your Transport Tycoon Deluxe CD-ROM.\n");
|
||||
}
|
||||
|
||||
if (add_pos != error_msg) ShowInfoF("%s", error_msg);
|
||||
@@ -493,11 +482,6 @@ bool OBGFileScanner::AddFile(const char *filename, size_t basepath_length)
|
||||
/* don't allow recursive delete of all remaining items */
|
||||
duplicate->next = NULL;
|
||||
|
||||
/* If the duplicate set is currently used (due to rescanning this can happen)
|
||||
* update the currently used set to the new one. This will 'lie' about the
|
||||
* version number until a new game is started which isn't a big problem */
|
||||
if (_used_graphics_set == duplicate) _used_graphics_set = graphics;
|
||||
|
||||
DEBUG(grf, 1, "Removing %s (%i) as base graphics set (duplicate)", duplicate->name, duplicate->version);
|
||||
delete duplicate;
|
||||
ret = true;
|
||||
|
@@ -99,7 +99,7 @@ static const Widget _graph_legend_widgets[] = {
|
||||
};
|
||||
|
||||
static const WindowDesc _graph_legend_desc(
|
||||
WDP_AUTO, WDP_AUTO, 250, 196, 250, 196,
|
||||
WDP_AUTO, WDP_AUTO, 250, 198, 250, 198,
|
||||
WC_GRAPH_LEGEND, WC_NONE,
|
||||
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
|
||||
_graph_legend_widgets
|
||||
|
@@ -1597,7 +1597,6 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, int type, const Ind
|
||||
*/
|
||||
static Industry *CreateNewIndustryHelper(TileIndex tile, IndustryType type, DoCommandFlag flags, const IndustrySpec *indspec, uint itspec_index, uint32 seed, Owner founder)
|
||||
{
|
||||
assert(itspec_index < indspec->num_table);
|
||||
const IndustryTileTable *it = indspec->table[itspec_index];
|
||||
bool custom_shape_check = false;
|
||||
|
||||
@@ -1643,14 +1642,13 @@ static Industry *CreateNewIndustryHelper(TileIndex tile, IndustryType type, DoCo
|
||||
*/
|
||||
CommandCost CmdBuildIndustry(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
{
|
||||
IndustryType it = GB(p1, 0, 16);
|
||||
if (it >= NUM_INDUSTRYTYPES) return CMD_ERROR;
|
||||
|
||||
const IndustrySpec *indspec = GetIndustrySpec(it);
|
||||
const IndustrySpec *indspec = GetIndustrySpec(GB(p1, 0, 16));
|
||||
const Industry *ind = NULL;
|
||||
|
||||
/* Check if the to-be built/founded industry is available for this climate. */
|
||||
if (!indspec->enabled || indspec->num_table == 0) return CMD_ERROR;
|
||||
if (!indspec->enabled) {
|
||||
return CMD_ERROR;
|
||||
}
|
||||
|
||||
/* If the setting for raw-material industries is not on, you cannot build raw-material industries.
|
||||
* Raw material industries are industries that do not accept cargo (at least for now) */
|
||||
@@ -1683,8 +1681,7 @@ CommandCost CmdBuildIndustry(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||
} else {
|
||||
int count = indspec->num_table;
|
||||
const IndustryTileTable * const *itt = indspec->table;
|
||||
int num = GB(p1, 16, 16);
|
||||
if (num >= count) return CMD_ERROR;
|
||||
int num = Clamp(GB(p1, 16, 16), 0, count - 1);
|
||||
|
||||
_error_message = STR_0239_SITE_UNSUITABLE;
|
||||
do {
|
||||
@@ -1787,7 +1784,7 @@ void GenerateIndustries()
|
||||
}
|
||||
|
||||
chance = ind_spc->appear_creation[_settings_game.game_creation.landscape];
|
||||
if (ind_spc->enabled && chance > 0 && ind_spc->num_table > 0) {
|
||||
if (ind_spc->enabled && chance > 0) {
|
||||
/* once the chance of appearance is determind, it have to be scaled by
|
||||
* the difficulty level. The "chance" in question is more an index into
|
||||
* the _numof_industry_table,in fact */
|
||||
@@ -1810,7 +1807,7 @@ void GenerateIndustries()
|
||||
* @todo : Do we really have to pass chance as un-scaled value, since we've already
|
||||
* processed that scaling above? No, don't think so. Will find a way. */
|
||||
ind_spc = GetIndustrySpec(it);
|
||||
if (ind_spc->enabled && ind_spc->num_table > 0) {
|
||||
if (ind_spc->enabled) {
|
||||
chance = ind_spc->appear_creation[_settings_game.game_creation.landscape];
|
||||
if (chance > 0) PlaceInitialIndustry(it, chance);
|
||||
}
|
||||
@@ -1867,7 +1864,7 @@ static void MaybeNewIndustry(void)
|
||||
ind_spc = GetIndustrySpec(j);
|
||||
byte chance = ind_spc->appear_ingame[_settings_game.game_creation.landscape];
|
||||
|
||||
if (!ind_spc->enabled || chance == 0 || ind_spc->num_table == 0) continue;
|
||||
if (!ind_spc->enabled || chance == 0) continue;
|
||||
|
||||
/* If there is no Callback CBID_INDUSTRY_AVAILABLE or if this one did anot failed,
|
||||
* and if appearing chance for this landscape is above 0, this industry can be chosen */
|
||||
|
@@ -643,7 +643,7 @@ public:
|
||||
Industry *i = GetIndustry(this->window_number);
|
||||
int line = this->editbox_line;
|
||||
|
||||
i->production_rate[line] = ClampU(atoi(str) / 8, 0, 255);
|
||||
i->production_rate[line] = ClampU(atoi(str), 0, 255);
|
||||
UpdateIndustryProduction(i);
|
||||
this->SetDirty();
|
||||
}
|
||||
|
@@ -621,7 +621,7 @@ STR_028C_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Placér
|
||||
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Placér fyrtårn
|
||||
STR_028E_PLACE_TRANSMITTER :{BLACK}Placér sender
|
||||
STR_028F_DEFINE_DESERT_AREA :{BLACK}Definer ørkenområde.{}Hold CTRL nede for at fjerne det
|
||||
STR_CREATE_LAKE :{BLACK}Definer vandområde.{}Lav en kanal, med mindre CTRL-tasten bruges ved havniveau, da omgivelserne i stedet vil blive oversvømmet
|
||||
STR_CREATE_LAKE :{BLACK}Definer vandområde.{}Lav en kanal, med mindre CTRL-tasten holdes ved havniveau, hvorved omgivelserne oversvømmes i stedet
|
||||
STR_CREATE_RIVER :{BLACK}Placér floder.
|
||||
STR_0290_DELETE :{BLACK}Slet
|
||||
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Slet denne by fuldstændigt
|
||||
@@ -800,7 +800,7 @@ STR_TOWNNAME_CATALAN :Catalanske
|
||||
############ end of townname region
|
||||
|
||||
STR_CURR_GBP :Pund (£)
|
||||
STR_CURR_USD :Dollars ($)
|
||||
STR_CURR_USD :Dollar ($)
|
||||
STR_CURR_EUR :Euro (€)
|
||||
STR_CURR_YEN :Yen (¥)
|
||||
STR_CURR_ATS :Østrisk Shilling (ATS)
|
||||
@@ -886,7 +886,7 @@ STR_CANT_COPY_ORDER_LIST :{WHITE}Kan ikke
|
||||
STR_END_OF_SHARED_ORDERS :{SETX 10}- - Slut på delt ordreliste - -
|
||||
|
||||
STR_TRAIN_IS_STUCK :{WHITE}{VEHICLE} kan ikke finde en rute at fortsætte ad.
|
||||
STR_TRAIN_IS_LOST :{WHITE}{VEHICLE} er faret vild.
|
||||
STR_TRAIN_IS_LOST :{WHITE}{VEHICLE} er gået tabt.
|
||||
STR_VEHICLE_IS_UNPROFITABLE :{WHITE}{VEHICLE}s indtjening sidste år var {CURRENCY}
|
||||
STR_EURO_INTRODUCE :{BLACK}{BIGFONT}Europæisk fællesvaluta!{}{}Euroen er introduceret som eneste betalingsmiddel i dit land!
|
||||
|
||||
@@ -1301,14 +1301,14 @@ STR_NETWORK_YEARS_CAPTION :{BLACK}År
|
||||
STR_NETWORK_YEARS_CAPTION_TIP :{BLACK}Antallet af år{}spillet varer
|
||||
|
||||
STR_NETWORK_GAME_INFO :{SILVER}SPIL INFO
|
||||
STR_NETWORK_CLIENTS :{SILVER}Klienter: {WHITE}{COMMA} / {COMMA} - {COMMA} / {COMMA}
|
||||
STR_NETWORK_LANGUAGE :{SILVER}Sprog: {WHITE}{STRING}
|
||||
STR_NETWORK_TILESET :{SILVER}Klima: {WHITE}{STRING}
|
||||
STR_NETWORK_MAP_SIZE :{SILVER}Størrelse: {WHITE}{COMMA}x{COMMA}
|
||||
STR_NETWORK_SERVER_VERSION :{SILVER}Server version: {WHITE}{STRING}
|
||||
STR_NETWORK_CLIENTS :{SILVER}Klienter: {WHITE}{COMMA} / {COMMA} - {COMMA} / {COMMA}
|
||||
STR_NETWORK_LANGUAGE :{SILVER}Sprog: {WHITE}{STRING}
|
||||
STR_NETWORK_TILESET :{SILVER}Klima: {WHITE}{STRING}
|
||||
STR_NETWORK_MAP_SIZE :{SILVER}Størrelse: {WHITE}{COMMA}x{COMMA}
|
||||
STR_NETWORK_SERVER_VERSION :{SILVER}Server version: {WHITE}{STRING}
|
||||
STR_NETWORK_SERVER_ADDRESS :{SILVER}Serveradresse: {WHITE}{STRING} : {NUM}
|
||||
STR_NETWORK_START_DATE :{SILVER}Start dato: {WHITE}{DATE_SHORT}
|
||||
STR_NETWORK_CURRENT_DATE :{SILVER}Nuværende dato: {WHITE}{DATE_SHORT}
|
||||
STR_NETWORK_START_DATE :{SILVER}Start dato: {WHITE}{DATE_SHORT}
|
||||
STR_NETWORK_CURRENT_DATE :{SILVER}Nuværende dato: {WHITE}{DATE_SHORT}
|
||||
STR_NETWORK_PASSWORD :{SILVER}Beskyttet af kodeord!
|
||||
STR_NETWORK_SERVER_OFFLINE :{SILVER}SERVEREN ER OFFLINE
|
||||
STR_NETWORK_SERVER_FULL :{SILVER}SERVEREN ER FULD
|
||||
@@ -1390,7 +1390,7 @@ STR_NETWORK_LANG_LATVIAN :Lettisk
|
||||
|
||||
STR_NETWORK_GAME_LOBBY :{WHITE}Netværksspils lobby
|
||||
|
||||
STR_NETWORK_PREPARE_TO_JOIN :{BLACK}Forbereder tilslutning: {ORANGE}{STRING}
|
||||
STR_NETWORK_PREPARE_TO_JOIN :{BLACK}Forbereder tilslutning: {ORANGE}{STRING}
|
||||
STR_NETWORK_COMPANY_LIST_TIP :{BLACK}En liste over alle selskaber i spillet lige nu. Du kan enten tilslutte dig et eller starte et nyt, hvis der er plads til flere selskaber
|
||||
STR_NETWORK_NEW_COMPANY :{BLACK}Nyt selskab
|
||||
STR_NETWORK_NEW_COMPANY_TIP :{BLACK}Opret et nyt selskab
|
||||
@@ -1403,16 +1403,16 @@ STR_NETWORK_REFRESH_TIP :{BLACK}Genopfri
|
||||
|
||||
STR_NETWORK_COMPANY_INFO :{SILVER}SELSKABSINFO
|
||||
|
||||
STR_NETWORK_COMPANY_NAME :{SILVER}Selskabsnavn: {WHITE}{STRING}
|
||||
STR_NETWORK_INAUGURATION_YEAR :{SILVER}Grundlagt: {WHITE}{NUM}
|
||||
STR_NETWORK_VALUE :{SILVER}Virksomhedens værdi: {WHITE}{CURRENCY}
|
||||
STR_NETWORK_CURRENT_BALANCE :{SILVER}Nuværende beholdning: {WHITE}{CURRENCY}
|
||||
STR_NETWORK_LAST_YEARS_INCOME :{SILVER}Sidste års indtægt: {WHITE}{CURRENCY}
|
||||
STR_NETWORK_PERFORMANCE :{SILVER}Præstation: {WHITE}{NUM}
|
||||
STR_NETWORK_COMPANY_NAME :{SILVER}Selskabsnavn: {WHITE}{STRING}
|
||||
STR_NETWORK_INAUGURATION_YEAR :{SILVER}Grundlagt: {WHITE}{NUM}
|
||||
STR_NETWORK_VALUE :{SILVER}Virksomhedens værdi: {WHITE}{CURRENCY}
|
||||
STR_NETWORK_CURRENT_BALANCE :{SILVER}Nuværende beholdning: {WHITE}{CURRENCY}
|
||||
STR_NETWORK_LAST_YEARS_INCOME :{SILVER}Sidste års indtægt: {WHITE}{CURRENCY}
|
||||
STR_NETWORK_PERFORMANCE :{SILVER}Præstation: {WHITE}{NUM}
|
||||
|
||||
STR_NETWORK_VEHICLES :{SILVER}Køretøjer: {WHITE}{NUM} {TRAIN}, {NUM} {LORRY}, {NUM} {BUS}, {NUM} {PLANE}, {NUM} {SHIP}
|
||||
STR_NETWORK_STATIONS :{SILVER}Stationer: {WHITE}{NUM} {TRAIN}, {NUM} {LORRY}, {NUM} {BUS}, {NUM} {PLANE}, {NUM} {SHIP}
|
||||
STR_NETWORK_PLAYERS :{SILVER}Spillere: {WHITE}{STRING}
|
||||
STR_NETWORK_VEHICLES :{SILVER}Køretøjer: {WHITE}{NUM} {TRAIN}, {NUM} {LORRY}, {NUM} {BUS}, {NUM} {PLANE}, {NUM} {SHIP}
|
||||
STR_NETWORK_STATIONS :{SILVER}Stationer: {WHITE}{NUM} {TRAIN}, {NUM} {LORRY}, {NUM} {BUS}, {NUM} {PLANE}, {NUM} {SHIP}
|
||||
STR_NETWORK_PLAYERS :{SILVER}Spillere: {WHITE}{STRING}
|
||||
|
||||
STR_NETWORK_CONNECTING :{WHITE}Tilslutter...
|
||||
|
||||
@@ -1440,22 +1440,22 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Tilslut
|
||||
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nyt firma
|
||||
|
||||
STR_NETWORK_ERR_NOTAVAILABLE :{WHITE} Ingen netværksheder fundet eller kompilet uden ENABLE_NETWORK
|
||||
STR_NETWORK_ERR_NOSERVER :{WHITE}Kunne ikke finde nogen netværksspil
|
||||
STR_NETWORK_ERR_NOCONNECTION :{WHITE}Serveren besvarede ikke denne forspørgsel
|
||||
STR_NETWORK_ERR_NEWGRF_MISMATCH :{WHITE}Kunne ikke tilslutte grundet NewGRF ulighed
|
||||
STR_NETWORK_ERR_DESYNC :{WHITE}Netværks synkroniseringsfejl
|
||||
STR_NETWORK_ERR_LOSTCONNECTION :{WHITE}Netværksforbindelse mistet
|
||||
STR_NETWORK_ERR_SAVEGAMEERROR :{WHITE}Kunne ikke hente gemt spil
|
||||
STR_NETWORK_ERR_SERVER_START :{WHITE}Kunne ikke starte serveren
|
||||
STR_NETWORK_ERR_CLIENT_START :{WHITE}Kunne ikke forbinde
|
||||
STR_NETWORK_ERR_TIMEOUT :{WHITE}Forbindelsen #{NUM} svarer ikke
|
||||
STR_NETWORK_ERR_SERVER_ERROR :{WHITE}Der opstod en protokol-fejl og forbindelse blev lukket
|
||||
STR_NETWORK_ERR_WRONG_REVISION :{WHITE}Revisionen af denne klient passer ikke sammen med serverens revision
|
||||
STR_NETWORK_ERR_WRONG_PASSWORD :{WHITE}Forkert kodeord
|
||||
STR_NETWORK_ERR_SERVER_FULL :{WHITE}Serveren er fuld
|
||||
STR_NETWORK_ERR_SERVER_BANNED :{WHITE}Du har forbud mod at bruge denne server
|
||||
STR_NETWORK_ERR_KICKED :{WHITE}Du blev smidt ud af spillet
|
||||
STR_NETWORK_ERR_CHEATER :{WHITE}Snyderi er ikke tilladt på denne server
|
||||
STR_NETWORK_ERR_NOSERVER :{WHITE} Kunne ikke finde nogen netværksspil
|
||||
STR_NETWORK_ERR_NOCONNECTION :{WHITE} Serveren besvarede ikke denne forspørgsel
|
||||
STR_NETWORK_ERR_NEWGRF_MISMATCH :{WHITE} Kunne ikke tilslutte grundet NewGRF ulighed
|
||||
STR_NETWORK_ERR_DESYNC :{WHITE} Netværks synkroniseringsfejl
|
||||
STR_NETWORK_ERR_LOSTCONNECTION :{WHITE} Netværksforbindelse mistet
|
||||
STR_NETWORK_ERR_SAVEGAMEERROR :{WHITE} Kunne ikke hente gemt spil
|
||||
STR_NETWORK_ERR_SERVER_START :{WHITE} Kunne ikke starte serveren
|
||||
STR_NETWORK_ERR_CLIENT_START :{WHITE} Kunne ikke forbinde
|
||||
STR_NETWORK_ERR_TIMEOUT :{WHITE} Forbindelsen #{NUM} svarer ikke
|
||||
STR_NETWORK_ERR_SERVER_ERROR :{WHITE} Der opstod en protokol-fejl og forbindelse blev lukket
|
||||
STR_NETWORK_ERR_WRONG_REVISION :{WHITE} Revisionen af denne klient passer ikke sammen med serverens revision
|
||||
STR_NETWORK_ERR_WRONG_PASSWORD :{WHITE} Forkert kodeord
|
||||
STR_NETWORK_ERR_SERVER_FULL :{WHITE} Serveren er fuld
|
||||
STR_NETWORK_ERR_SERVER_BANNED :{WHITE} Du har forbud mod at bruge denne server
|
||||
STR_NETWORK_ERR_KICKED :{WHITE} Du blev smidt ud af spillet
|
||||
STR_NETWORK_ERR_CHEATER :{WHITE} Snyderi er ikke tilladt på denne server
|
||||
|
||||
############ Leave those lines in this order!!
|
||||
STR_NETWORK_ERR_CLIENT_GENERAL :generel fejl
|
||||
@@ -1468,7 +1468,7 @@ STR_NETWORK_ERR_CLIENT_NOT_AUTHORIZED :ikke autorisere
|
||||
STR_NETWORK_ERR_CLIENT_NOT_EXPECTED :modtog en underlig pakke
|
||||
STR_NETWORK_ERR_CLIENT_WRONG_REVISION :forkert revision
|
||||
STR_NETWORK_ERR_CLIENT_NAME_IN_USE :navnet er allerede i brug
|
||||
STR_NETWORK_ERR_CLIENT_WRONG_PASSWORD :forkert spil kodeord
|
||||
STR_NETWORK_ERR_CLIENT_WRONG_PASSWORD :forkert spil password
|
||||
STR_NETWORK_ERR_CLIENT_COMPANY_MISMATCH :forkert firma-id i DoCommand
|
||||
STR_NETWORK_ERR_CLIENT_KICKED :smidt ud af serveren
|
||||
STR_NETWORK_ERR_CLIENT_CHEATER :prøvede at snyde
|
||||
@@ -1521,7 +1521,7 @@ STR_NETWORK_SEND :{BLACK}Send
|
||||
|
||||
##### PNG-MAP-Loader
|
||||
|
||||
STR_PNGMAP_ERROR :{WHITE}Kan ikke hente landskab fra PNG...
|
||||
STR_PNGMAP_ERROR :{WHITE}Kan ikke hente billedet fra PNG...
|
||||
STR_PNGMAP_ERR_FILE_NOT_FOUND :{WHITE}...filen blev ikke fundet.
|
||||
STR_PNGMAP_ERR_IMAGE_TYPE :{WHITE}...kan ikke konvertere billedtype. Der skal bruges 8 eller 24-bit PNG.
|
||||
STR_PNGMAP_ERR_MISC :{WHITE}...noget gik galt. Undskyld (Måske en ødelagt fil)
|
||||
@@ -1588,10 +1588,10 @@ STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO :{BLACK}Vælg or
|
||||
STR_1021_RAILROAD_TRACK :Jernbaneskinner
|
||||
STR_1023_RAILROAD_TRAIN_DEPOT :Remise
|
||||
STR_1024_AREA_IS_OWNED_BY_ANOTHER :{WHITE}...området ejes af et andet selskab
|
||||
STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Jernbane med blok signaler
|
||||
STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Jernbane med almindelige signaler
|
||||
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Jernbane med præ-signaler
|
||||
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Jernbane med exit-signaler
|
||||
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Jernbane med kombi-signaler
|
||||
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Jernbaneskinne med kombi-signaler
|
||||
STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Jernbane med avancerede signaler
|
||||
STR_RAILROAD_TRACK_WITH_NOENTRYSIGNALS :Jernbane med ensrettede avancerede signaler
|
||||
STR_RAILROAD_TRACK_WITH_NORMAL_PRESIGNALS :Jernbanespor med normale og præ-signaler
|
||||
@@ -2731,7 +2731,7 @@ STR_8823_SKIP :{BLACK}Spring o
|
||||
STR_8824_DELETE :{BLACK}Slet
|
||||
STR_8826_GO_TO :{BLACK}Gå til
|
||||
STR_REFIT :{BLACK}Ombyg
|
||||
STR_REFIT_TIP :{BLACK}Vælg hvilken lasttype, der skal ombygges til i denne ordre. CTRL-klik for at fjerne ombygningsinstruktion
|
||||
STR_REFIT_TIP :{BLACK}Vælg hvilken lasttype der skal ombygges til i denne ordre. CTRL-klik for at fjerne ombygningsinstruktion
|
||||
STR_REFIT_ORDER :(Ombyg til {STRING})
|
||||
STR_REFIT_STOP_ORDER :(Ombyg til {STRING} og stop)
|
||||
STR_STOP_ORDER :(Stop)
|
||||
@@ -2815,8 +2815,6 @@ STR_8866_CAN_T_NAME_TRAIN :{WHITE}Kan ikke
|
||||
STR_8867_NAME_TRAIN :{BLACK}Giv toget et navn
|
||||
STR_8868_TRAIN_CRASH_DIE_IN_FIREBALL :{BLACK}{BIGFONT}Tog forulykket!{}{COMMA} døde i flammerne efter kollision
|
||||
STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN :{WHITE}Kan ikke vende retningen af toget...
|
||||
STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE :{WHITE}Kan ikke vende køretøjet om...
|
||||
STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS :{WHITE}Kan ikke vende et køretøj, der består af flere enheder
|
||||
STR_886A_RENAME_TRAIN_VEHICLE_TYPE :{WHITE}Omdøb tog-/togvognstypen
|
||||
STR_886B_CAN_T_RENAME_TRAIN_VEHICLE :{WHITE}Kan ikke omdøbe tog-/togvognstypen...
|
||||
STR_CLEAR_TIME :{BLACK}Nulstil tid
|
||||
@@ -2904,7 +2902,7 @@ STR_CITIZENS_CELEBRATE_FIRST_PASSENGER_TRAM :{BLACK}{BIGFONT
|
||||
STR_CITIZENS_CELEBRATE_FIRST_CARGO_TRAM :{BLACK}{BIGFONT}Indbyggerne fester . . .{}Første fragt-sporvogn ankommer til {STATION}!
|
||||
STR_9031_ROAD_VEHICLE_CRASH_DRIVER :{BLACK}{BIGFONT}Lastbil forulykket!{}Chauffør dør i flammerne efter sammenstød med tog
|
||||
STR_9032_ROAD_VEHICLE_CRASH_DIE :{BLACK}{BIGFONT}Bus forulykket!{}{COMMA} dør i flammerne efter kollision med et tog
|
||||
STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN :{WHITE}Tillader ikke køretøjer at vende om...
|
||||
STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS :{WHITE}Kan ikke vende et køretøj, der består af flere enheder
|
||||
STR_9034_RENAME :{BLACK}Omdøb
|
||||
STR_9035_RENAME_ROAD_VEHICLE_TYPE :{BLACK}Omdøb køretøjstypen
|
||||
STR_9036_RENAME_ROAD_VEHICLE_TYPE :{WHITE}Omdøb køretøjstypen
|
||||
|
@@ -2220,8 +2220,8 @@ STR_7030_SELECT_NEW_FACE_FOR_PRESIDENT :{BLACK}Select n
|
||||
STR_7031_CHANGE_THE_COMPANY_VEHICLE :{BLACK}Change the company vehicle livery
|
||||
STR_7032_CHANGE_THE_PRESIDENT_S :{BLACK}Change the manager's name
|
||||
STR_7033_CHANGE_THE_COMPANY_NAME :{BLACK}Change the company name
|
||||
STR_7035_INCREASE_SIZE_OF_LOAN :{BLACK}Increase size of loan. Ctrl+Click borrows as much as possible
|
||||
STR_7036_REPAY_PART_OF_LOAN :{BLACK}Repay part of loan. Ctrl+Click repays as much loan as possible
|
||||
STR_7035_INCREASE_SIZE_OF_LOAN :{BLACK}Increase size of loan
|
||||
STR_7036_REPAY_PART_OF_LOAN :{BLACK}Repay part of loan
|
||||
STR_7037_PRESIDENT :{WHITE}{PRESIDENTNAME}{}{GOLD}(Manager)
|
||||
STR_7038_INAUGURATED :{GOLD}Inaugurated: {WHITE}{NUM}
|
||||
STR_7039_VEHICLES :{GOLD}Vehicles:
|
||||
@@ -3270,7 +3270,7 @@ STR_MASS_START_LIST_TIP :{BLACK}Click to
|
||||
STR_SHORT_DATE :{WHITE}{DATE_TINY}
|
||||
STR_SIGN_LIST_CAPTION :{WHITE}Sign List - {COMMA} Sign{P "" s}
|
||||
|
||||
STR_ORDER_REFIT_FAILED :{WHITE}{VEHICLE} stopped because an ordered refit failed
|
||||
STR_ORDER_REFIT_FAILED :{WHITE}Order refit failure stopped {VEHICLE}
|
||||
|
||||
############ Lists rail types
|
||||
|
||||
|
@@ -1054,7 +1054,6 @@ STR_CONFIG_SETTING_AI_BUILDS_AIRCRAFT :{LTBLUE}Malebli
|
||||
STR_CONFIG_SETTING_AI_BUILDS_SHIPS :{LTBLUE}Malebligu ŝipojn por la komputilo: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :{LTBLUE}Permesu ArtefaritajnIntelektojn en pluropaj ludoj: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_AI_MAX_OPCODES :{LTBLUE}#opcodes antaŭ ArtefariteIntelekto estos prokrestita: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_SETTING_SERVINT_ISPERCENT :{LTBLUE}Prizorgintervala procentaĵo: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_SERVINT_TRAINS :{LTBLUE}Defaŭlta prizorgintervalo por trajnoj: {ORANGE}{STRING} tagoj/%
|
||||
@@ -1591,10 +1590,6 @@ STR_1024_AREA_IS_OWNED_BY_ANOTHER :{WHITE}...regio
|
||||
STR_RAILROAD_TRACK_WITH_NORMAL_SIGNALS :Reloj kun normalaj signaloj
|
||||
STR_RAILROAD_TRACK_WITH_PRESIGNALS :Reloj kun antaŭ-signaloj
|
||||
STR_RAILROAD_TRACK_WITH_EXITSIGNALS :Reloj kun elir-signaloj
|
||||
STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Reloj kun kombin-signaloj
|
||||
STR_RAILROAD_TRACK_WITH_PBSSIGNALS :Reloj kun pad-signaloj
|
||||
STR_RAILROAD_TRACK_WITH_NOENTRYSIGNALS :Reloj kun unudirektaj pad-signaloj
|
||||
STR_RAILROAD_TRACK_WITH_NORMAL_PRESIGNALS :Reloj kun blok- kaj antaŭ-signaloj
|
||||
|
||||
|
||||
|
||||
|
@@ -310,7 +310,7 @@ STR_015A_COMPANY_LEAGUE_TABLE :Yhtiökilpataul
|
||||
STR_PERFORMANCE_DETAIL_MENU :Suoritearviointi
|
||||
############ range for menu ends
|
||||
|
||||
STR_015B_OPENTTD :{WHITE}Tietoja OpenTTD:stä
|
||||
STR_015B_OPENTTD :{WHITE}Tietoa OpenTTD:stä
|
||||
STR_015C_SAVE_GAME :Tallenna peli
|
||||
STR_015D_LOAD_GAME :Lataa peli
|
||||
STR_015E_QUIT_GAME :Lopeta peli
|
||||
@@ -352,19 +352,19 @@ STR_ENGINE_SORT_CARGO_CAPACITY :Rahtikapasiteet
|
||||
STR_NO_WAITING_CARGO :{BLACK}Minkäänlaista lastia ei ole odottamassa
|
||||
STR_SELECT_ALL_FACILITIES :{BLACK}Valitse kaikki laitteet
|
||||
STR_SELECT_ALL_TYPES :{BLACK}Valitse kaikki lastityypit (myös odottava lasti)
|
||||
STR_AVAILABLE_TRAINS :{BLACK}Käytett. Junat
|
||||
STR_AVAILABLE_ROAD_VEHICLES :{BLACK}Käytett. Ajoneuvot
|
||||
STR_AVAILABLE_SHIPS :{BLACK}Käytett. Laivat
|
||||
STR_AVAILABLE_AIRCRAFT :{BLACK}Käytett. Ilma-alukset
|
||||
STR_AVAILABLE_TRAINS :{BLACK}Käytettävissä olevat junat
|
||||
STR_AVAILABLE_ROAD_VEHICLES :{BLACK}Käytettävissä olevat ajoneuvot
|
||||
STR_AVAILABLE_SHIPS :{BLACK}Käytettävissä olevat laivat
|
||||
STR_AVAILABLE_AIRCRAFT :{BLACK}Käytettävissä olevat ilma-alukset
|
||||
STR_AVAILABLE_ENGINES_TIP :{BLACK}Näytä lista saatavilla olevista moottorityypeistä tälle ajoneuvotyypille.
|
||||
STR_MANAGE_LIST :{BLACK}Muokkaa listaa
|
||||
STR_MANAGE_LIST_TIP :{BLACK}Ohjaa kaikkia listan ajoneuvoja
|
||||
STR_REPLACE_VEHICLES :Korvaa liikenneväl.
|
||||
STR_REPLACE_VEHICLES :Korvaa liikennevälineitä
|
||||
STR_SEND_TRAIN_TO_DEPOT :Lähetä varikolle
|
||||
STR_SEND_ROAD_VEHICLE_TO_DEPOT :Lähetä varikolle
|
||||
STR_SEND_SHIP_TO_DEPOT :Lähetä varikolle
|
||||
STR_SEND_AIRCRAFT_TO_HANGAR :Lähetä varikolle
|
||||
STR_SEND_FOR_SERVICING :Lähetä huoltoon
|
||||
STR_SEND_FOR_SERVICING :Lähetä huollettavaksi
|
||||
|
||||
############ range for months starts
|
||||
STR_0162_JAN :01.
|
||||
@@ -892,10 +892,10 @@ STR_EURO_INTRODUCE :{BLACK}{BIGFONT
|
||||
|
||||
# Start of order review system.
|
||||
# DON'T ADD OR REMOVE LINES HERE
|
||||
STR_VEHICLE_HAS_TOO_FEW_ORDERS :{WHITE}Kulkuneuvon {VEHICLE} aikataulussa on liian vähän käskyjä
|
||||
STR_VEHICLE_HAS_VOID_ORDER :{WHITE}Kulkuneuvon {VEHICLE} aikataulussa on epäkelpo käsky
|
||||
STR_VEHICLE_HAS_TOO_FEW_ORDERS :Kulkuneuvon {WHITE}{VEHICLE} aikataulussa on liian vähän käskyjä
|
||||
STR_VEHICLE_HAS_VOID_ORDER :Kulkuneuvon {WHITE}{VEHICLE} aikataulussa on epäkelpo käsky
|
||||
STR_VEHICLE_HAS_DUPLICATE_ENTRY :{WHITE}Ajoneuvolla {VEHICLE} on toistuvia määräyksiä
|
||||
STR_VEHICLE_HAS_INVALID_ENTRY :{WHITE}Kulkuneuvon {VEHICLE} aikataulussa on virheellinen asema
|
||||
STR_VEHICLE_HAS_INVALID_ENTRY :Kulkuneuvon {WHITE}{VEHICLE} aikataulussa on virheellinen asema
|
||||
# end of order system
|
||||
|
||||
STR_VEHICLE_AUTORENEW_FAILED :{WHITE}Automaattinen korvaus epäonnistui ajoneuvolle {VEHICLE}{}{STRING}
|
||||
@@ -2224,7 +2224,7 @@ STR_7035_INCREASE_SIZE_OF_LOAN :{BLACK}Ota lis
|
||||
STR_7036_REPAY_PART_OF_LOAN :{BLACK}Lyhennä lainaa.
|
||||
STR_7037_PRESIDENT :{WHITE}{PRESIDENTNAME}{}{GOLD}(pääjohtaja)
|
||||
STR_7038_INAUGURATED :{GOLD}Avattu: {WHITE}{NUM}
|
||||
STR_7039_VEHICLES :{GOLD}Liikenneväl.:
|
||||
STR_7039_VEHICLES :{GOLD}Liikennevälineet:
|
||||
STR_TRAINS :{WHITE}{COMMA} juna{P "" a}
|
||||
STR_ROAD_VEHICLES :{WHITE}{COMMA} ajoneuvo{P "" a}
|
||||
STR_AIRCRAFT :{WHITE}{COMMA} lentokone{P "" tta}
|
||||
@@ -3078,9 +3078,9 @@ STR_PERFORMANCE_DETAIL_AMOUNT_INT :{BLACK}({COMMA}
|
||||
STR_PERFORMANCE_DETAIL_PERCENT :{WHITE}{NUM}%
|
||||
STR_PERFORMANCE_DETAIL_INT :{BLACK}{NUM}
|
||||
############ Those following lines need to be in this order!!
|
||||
STR_PERFORMANCE_DETAIL_VEHICLES :{BLACK}Liikenneväl.:
|
||||
STR_PERFORMANCE_DETAIL_VEHICLES :{BLACK}Liikennevälineitä:
|
||||
STR_PERFORMANCE_DETAIL_STATIONS :{BLACK}Asemia:
|
||||
STR_PERFORMANCE_DETAIL_MIN_PROFIT :{BLACK}Väh. tuotto:
|
||||
STR_PERFORMANCE_DETAIL_MIN_PROFIT :{BLACK}Vähimmäistuotto:
|
||||
STR_PERFORMANCE_DETAIL_MIN_INCOME :{BLACK}Vähimmäistulo:
|
||||
STR_PERFORMANCE_DETAIL_MAX_INCOME :{BLACK}Enimmäistulo:
|
||||
STR_PERFORMANCE_DETAIL_DELIVERED :{BLACK}Kuljetettu:
|
||||
@@ -3232,8 +3232,8 @@ STR_VEHICLE_LIST_SHIP_DEPOT :{BLACK}{STRING}
|
||||
STR_VEHICLE_LIST_AIRCRAFT_DEPOT :{BLACK}{STRING} - {COMMA} ilma-alus{P "" ta}
|
||||
|
||||
STR_REPLACE_VEHICLES_WHITE :{WHITE}Korvaa {STRING}
|
||||
STR_REPLACE_VEHICLES_START :{BLACK}Aloita ajoneuvojen korv.
|
||||
STR_REPLACE_VEHICLES_STOP :{BLACK}Lopeta ajoneuvojen korv.
|
||||
STR_REPLACE_VEHICLES_START :{BLACK}Aloita ajoneuvojen korvaaminen
|
||||
STR_REPLACE_VEHICLES_STOP :{BLACK}Lopeta ajoneuvojen korvaaminen
|
||||
STR_NOT_REPLACING :{BLACK}Ei korvata
|
||||
STR_NOT_REPLACING_VEHICLE_SELECTED :{BLACK}Ei liikennevälinettä valittuna
|
||||
STR_REPLACE_HELP_LEFT_ARRAY :{BLACK}Valitse korvattava veturityyppi.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user