1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-13 01:29:10 +00:00

Compare commits

...

29 Commits

Author SHA1 Message Date
rubidium
8a1c079edf (svn r16365) -Release: 0.7.1-RC2 2009-05-21 12:08:52 +00:00
rubidium
ba01583ce3 (svn r16364) [0.7] -Backport from trunk:
- Fix: The previously selected NewGRF station type was still remembered after switching to a different game without newstations enabled, preventing stations from being built (r16363)
- Fix: Pointer incremented with wrong count (r16361)
- Fix: Delete invalid depots in TTD savegames caused by improper SVXConverter conversions (r16357)
2009-05-21 11:47:45 +00:00
rubidium
498e5989d1 (svn r16355) [0.7] -Backport from trunk:
- Fix: Invalid read when OTTD savegame contains VEH_INVALID (r16353)
- Fix: Signal handler could end in endless loop (r16351)
- Fix: [NewGRF] When overriding 'original sounds', only allow overriding of the 'original sounds' and not any other that is already loaded (r16339)
- Fix: Desyncs when removing lots of stations/towns (r16329, r16328)
[0.7] -Cleanup: unify style of changelog
2009-05-18 20:17:28 +00:00
rubidium
ab7b117c50 (svn r16324) [0.7] -Backport from trunk:
- Fix: Desyncs due to the fact that depot searching with a maximum search depth simply does not work with YAPF's caches [FS#2900] (r16323)
- Fix: Trains could get stuck in a depot when they wanted to go to the same depot again [FS#2873] (r16322)
- Fix: In the scenario editor change the (starting) game year of the scenario, not the (starting) game year for new games/scenarios (r16321)
- Fix: Loading of savegames created in revision between 0.3.5 and 0.3.6 caused crash (r16320)
- Fix: [NoAI] Set the autorenew settings for new AI companies to the default values, not to 0 or the local settings (r16316)
- Fix: [NewGRF] Allow accessing the house age when the house is not yet built (r16314)
- Fix: (Get|Set)TrackBits() is only valid for RAIL_TILE_NORMAL and _SIGNALS (r16311)
2009-05-16 20:29:53 +00:00
rubidium
085b498c28 (svn r16310) [0.7] -Backport from trunk:
- Fix: Parameter is invalid when it is equal to length of an array (r16308)
- Fix: Close all windows before unloading the AI system as closing the content-download window will rescan for AIs [FS#2901] (r16306)
- Fix: ICC (Intel C++ Compiler) defined __GNUC__ but does not define __builtin_bswap32, so fall back to the default swap method for ICC (r16295)
- Fix: Road vehicles were unable to find a depot when turning around (in some cases), causing 'nearest depot' orders to be occasionally lost [FS#2893] (r16291
2009-05-15 10:24:13 +00:00
rubidium
30eff93341 (svn r16309) [0.7] -Backport from trunk:
- Fix: Unable to (re)set the desert state for watery tiles [FS#2888] (r16290)
- Fix: Possible (in theory) desync related to autorenew settings (r16287)
- Fix: Crash after using the 'Reset landscape' function and remove all waypoint signs and buoys after resetting landscape (r16280)
- Fix: [NewGRF] Disable multitile houses for which the newgrf does not define proper additional tiles (r16274)
2009-05-15 10:17:00 +00:00
rubidium
139a213d4d (svn r16278) [0.7] -Backport from trunk:
- Fix: The language is called Slovak, not Slovakish (r16090)
2009-05-11 15:35:26 +00:00
rubidium
06c45d6fe5 (svn r16275) [0.7] -Backport a lot of language updates from trunk. 2009-05-10 22:35:36 +00:00
rubidium
8446d6b8c2 (svn r16273) [0.7] -Backport from trunk:
- Fix: Wrong number of parameters or wrong parameter types sent to printf-like functions at several places (r16269)
- Fix: [NewGRF] When callback 2E returns an amount of 0, do not transport 1 unit to the station (r16268)
- Fix: [NoAI] Various documentation omissions with respect to IDs of various objects and corners for AITile::(Raise|Lower)Tile (r16267,r16266)
2009-05-10 21:33:55 +00:00
rubidium
9676072298 (svn r16272) [0.7] -Backport from trunk:
- Fix: [NoAI] Check slopes passed to the API better for validity (r16264, r16262)
- Fix: [NewGRF] Interpret setting bridge property 08 to 0 as always available (r16263)
- Add: [NoAI] AIController::GetVersion, this returns the version of OpenTTD in the same way as for NewGRFs (r16253)
- Add: [NoAI] AIAirport::GetPrice, returning the building cost of an airport (r16252)
- Fix: [NoAI] Enable parameter checking for AIController::* functions again (r16249)
2009-05-10 21:26:46 +00:00
rubidium
2db7e3a0a8 (svn r16248) [0.7] -Backport from trunk:
- Fix: Improve corner case order handling: mark order as done only when actually done, obey non-stop orders, do only stop/refit at the depot in the order (r16240,r16228,r16199,r16198,r16187)
- Fix: Use the stop/non-stop intermediate orderflags AIs can give for goto-depot orders (r16239)
2009-05-06 23:21:43 +00:00
rubidium
1e9fd18e6a (svn r16247) [0.7] -Backport from trunk:
- Fix: [NoAI] Make sure AITunnel::BuildTunnel returns what the documentation says it does (r16244)
- Fix: [NoAI] CmdBuildTunnel could be called with invalid parameters from the API code, causing crashes later [FS#2875] (r16243)
- Fix: [NewGRF] ActionB should use the online parameters from GRFFile instead of the initial user-specified values from GRFConfig. Also use the values as they were set when the ActionB was executed, not as they are set when the message is shown (r16223)
- Fix: Possible crashes when quiting OpenTTD or forcing resizes/redraws of the screen during map generation [FS#2862] (r16220)
- Fix: Shared orders without orders were not properly converted causing corrupt/invalid orders when loading pre 0.7 savegames [FS#2878] (r16214)
2009-05-06 22:37:19 +00:00
rubidium
909af50aaa (svn r16246) [0.7] -Backport from trunk:
- Fix: [Squirrel] the traps variable wasn't restored, causing try/catch blocks to be 'forgotten' during a suspend (r16181)
- 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 [FS#2801] (r16165)
- Fix: [NoAI] AIOrder::GetOrderDestination and AIOrder::GetOrderFlags didn't work on ORDER_CURRENT when the vehicle was loading/leaving in a station (r16165)
- Fix: [NoAI] Change WAYPOINT_INVALID to 0xFFFF from -1 as that is the value the AIs got (due to casting) (r16150)
2009-05-06 22:31:52 +00:00
rubidium
07a16f9282 (svn r16245) [0.7] -Backport from trunk:
- Fix: Hardcoded (old sized) MAX_COMPANIES constant (r16182)
- Fix: Do not try to reserve path for trains crashed in station [FS#2866] (r16178)
- Fix: Forbid joining AI companies via the 'move' and 'join' console commands/multiplayer lobby (r16176, r16175)
- Fix: The overflowsafe type did not like dividing by int64 larger than MAX_INT32 causing division by negative numbers and small anomolies when drawing graphs [FS#2855] (r16130)
2009-05-06 22:21:32 +00:00
rubidium
28e7981a5b (svn r16121) [0.7] -Backport from trunk:
- Add: [NoAI] UseAsRandomAI as function in info.nut. When an AI returns false, it will never be chosen as random AI (r16113)
- 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)
- Add: [NoAI] AIOF_STOP_IN_DEPOT to the orderflags in AIOrder to allow stop-in-depot orders (r16107)
- Fix: [NoAI] AIOrder::SetOrderFlags always removed "Service if needed" from goto-depot orders (r16106)
- 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)
- Change: [NoAI] Reverse the order of the lines in the AI debug window [FS#2778] (r16091)
- Fix: [NoAI] AIDebug window profiled the blitters by invalidating itself unconditionally on repaint. OTOH it was not invalidated in other cases when needed (r16094)
- Fix: [NoAI] MOF_COND_DESTINATION was not accepted by CmdModifyOrder() (r16063)
2009-04-22 09:00:19 +00:00
rubidium
f7cc97fe5c (svn r16120) [0.7] -Backport from trunk:
- Fix: Road was removed when both the Remove button was active and Ctrl was pressed [FS#2582] (r16119)
- Fix: Connect tried to validate too much of the company ID with too little information on hand [FS#2849] (r16096)
- Fix: Insanely fast trains would not stop in time for stations/'jump' over waypoints/via stations within a tick, which would cause the order not to be processed causing the train to go in loops until (with luck) it 'hit' the tile [FS#2824] (r16079)
- Fix: Content download progress bar 'resetting' due to mathematical overflow [FS#2845] (r16071)
- Fix: Memory leak when querying a server multiple times (r16064)
2009-04-22 08:48:08 +00:00
rubidium
d9ed2d380f (svn r16061) [0.7] -Backport from trunk:
- Fix: Non advanced vehicle list did not handle company switching correctly (r16054)
- 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)
2009-04-14 21:20:03 +00:00
rubidium
60901368cc (svn r16060) [0.7] -Backport from trunk:
- 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: 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: Chance16() did not work for b = 1. Also transform the formula to not use divisions (r16006)
2009-04-14 21:13:07 +00:00
rubidium
9f5e690118 (svn r16059) [0.7] -Backport from trunk:
- 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)
- Fix: [NewGRF] Set callback_param1 (var 10) to 1 only when requested (r15957)
- Fix: Tooltip of detailed ratings window button showed wrong tip (r15943)
- Change: Harden string copying on places where it is possible (r16024)
- Change: Use recent Czech language for plural form (r15965)
2009-04-14 21:07:33 +00:00
rubidium
2fbd7ff6cc (svn r15912) [0.7] -Backport from trunk:
- Update: lots and lots of translations
- Fix: Chat completion got called twice causing tab completion to seemingly fail (r15905)
2009-04-01 14:24:54 +00:00
rubidium
1595413545 (svn r15904) [0.7] -Backport from trunk:
- Feature: Watermark crash.sav and do not generate crash information if a loaded crash.sav causes a crash so the real crash report does not get overwritten (r15893)
- Feature: Add autoclean_novehicles setting which will, when autoclean_companies is true, remove any company with no vehicles and no active client after autoclean_novehicles-months (r15848)
- Add: [NoAI] AIIndustryType::IsBuiltOnWater(), HasHeliport() and HasDock(). Just like AIIndustry (r15901)
- Add: [NoAI] AIBridge::GetBridgeID() so AIs can get the type of bridge that are already build (r15875)
- Add: [NoAI] AIRoad::GetRoadVehicleTypeForCargo() to tell whether a certain cargo needs a bus- or a truckstop (r15860)
2009-03-30 23:22:13 +00:00
rubidium
76b2e1c5ab (svn r15903) [0.7] -Backport from trunk:
- Fix: YAPF did not apply the platform length (too long/too short) penalties (r15900)
- Fix: Fixing the slopes was done a bit more often than intended making map generation with the original generator horribly slow (r15895)
- Fix: YAPF used different penalties for aqueducts than for other water tiles (r15891)
- Fix: Round the production rate up, so e.g. oilrigs always produce some passengers on lowest production level [FS#2772] (r15888)
- Fix: Libtimidity cannot handle frees of NULL (in contrast of most other frees) [FS#2770] (r15886)
- Fix: Make sure house class/ID counters do not overflow (r15831)
2009-03-30 23:15:05 +00:00
rubidium
7e1385b6eb (svn r15828) [0.7] -Prepare: for 0.7.0-RC2. 2009-03-23 00:19:22 +00:00
rubidium
4ec28e1ba7 (svn r15826) [0.7] -Backport from trunk:
- Update: language files
- Fix: Some (newer) GCCs have trouble compiling the Win32 specific part of fontcache.cpp; jumps across variable declarations [FS#2752] (r15818)
- Fix: When sorting on cost do not sort on the running cost [FS#2749] (r15778)
2009-03-23 00:12:52 +00:00
rubidium
30afba1d10 (svn r15775) [0.7] -Backport from trunk:
- Fix: Do not show the message about reporting an AI crash for the dummy AI (r15774)
- Fix: Number of active clients was not always properly updated [FS#2475] (r15773)
- Fix: Settings from the [gameopt] section (from old 0.6 config files) were overwritten with default values (r15771)
- Fix: Infinite loop when skipping sprites when a GRF is invalid (or truncated) (r15767)
- Fix: Crash when opening the content list window twice; inconsistencies when clicking download twice [FS#2744] (r15766)
2009-03-19 23:50:54 +00:00
rubidium
61e97110c9 (svn r15765) [0.7] -Backport from trunk:
- Change: [NewGRF] Expose GRF ID of engines in var action property 0x25 (r15739)
- Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere (r15763)
- Fix: [Windows] Inlined UTF-8 characters (in the source code) are not handled properly on Eastern versions of Windows so escape them (r15762)
- Fix: [Windows] On some system searching a font using its English name fails. So now we search the font using the localised name and use the English name for the final 'validation' only (r15757)
2009-03-18 19:50:34 +00:00
rubidium
9e592b9986 (svn r15764) [0.7] -Backport from trunk:
- Fix: Number of houses in house variables 0x44, 0x60 and 0x61 were incorrect after 0xFF had been reached and could desync clients joining afterwards (r15755)
- Fix: Crash when clicking the small area between the savegame list and the save button in the save game window [FS#2742] (r15753)
- Fix: Do not try to (un)draw the cursor when the screen is not ready (r15752)
- Fix: The big UFO sometimes landed just outside the map. Instead of landing, just disappear (fly away) in those cases (r15750)
- Fix: Crash because submarines would sometimes start far outside of the map [FS#2739] (r15748)
- Fix: Road ownership getting lost when removing a road stop [FS#2736] (r15747)
- Fix: Update threading code for OS/2, add mutex support, fix compilation (r15746, r15745)
- Fix: When town generator failed to create requested number of towns, there were too many cities (r15744)
2009-03-18 19:47:05 +00:00
rubidium
de7a4a4006 (svn r15737) [0.7] -Prepare: for 0.7.0-RC1. 2009-03-15 22:42:48 +00:00
rubidium
53dc1a89da (svn r15734) [0.7] -Branch: the long awaited branch so we can introduce new features in trunk before 0.7.0, but not let them destabalize the pending release :) 2009-03-15 22:14:10 +00:00
217 changed files with 5415 additions and 3285 deletions

View File

@@ -1,7 +1,7 @@
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = openttd
PROJECT_NAME = OpenTTD
OUTPUT_DIRECTORY = docs/source/
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English

View File

@@ -93,7 +93,7 @@ ifeq ($(shell if test -f config.cache; then echo 1; fi), 1)
@echo " Going to reconfigure with last known settings..."
@echo "----------------"
# Make sure we don't lock config.cache
@$(shell cat config.cache | sed 's~\\ ~\\\\ ~g') || exit 1
@$(shell cat config.cache | sed 's@\\ @\\\\ @g') || exit 1
@echo "----------------"
@echo "Reconfig done. Please re-execute make."
@echo "----------------"

View File

@@ -20,7 +20,7 @@ SRC_DIR = "$(ROOT_DIR)/src"
BUNDLE_DIR = "$(ROOT_DIR)/bundle"
BUNDLES_DIR = "$(ROOT_DIR)/bundles"
TTD = "openttd.exe"
TARGET := $(shell echo $(PLATFORM) | sed "s~win64~x64~;s~win32~Win32~")
TARGET := $(shell echo $(PLATFORM) | sed "s@win64@x64@;s@win32@Win32@")
all:
$(Q)cp objs/$(TARGET)/Release/$(TTD) $(BIN_DIR)/$(TTD)

View File

@@ -57,7 +57,7 @@ ENDIAN_TARGETS := endian_target.h $(ENDIAN_CHECK)
# For more information, please check:
# http://maillist.openttd.org/pipermail/devs/2007-April/000284.html
# http://maillist.openttd.org/pipermail/devs/2007-February/000248.html
GCC295_FIX=sed -r 's~^(\t*)(.*)( const )([A-Za-z0-9_ ]+(\[.*\]){2,})(( = \{)|(;))(.*)$$~\1\2 \4\6\8\9~g'
GCC295_FIX=sed -r 's@^(\t*)(.*)( const )([A-Za-z0-9_ ]+(\[.*\]){2,})(( = \{)|(;))(.*)$$@\1\2 \4\6\8\9@g'
# This 'sed' removes the 3rd '4' in the # lines of the -E output of
# gcc 2.95.3 and lower, as it should indicate that it is a C-linkage, but the
# compiler can't handle that information (just don't ask). So we remove it
@@ -65,7 +65,7 @@ GCC295_FIX=sed -r 's~^(\t*)(.*)( const )([A-Za-z0-9_ ]+(\[.*\]){2,})(( = \{)|(;)
# Furthermore gcc 2.95 has some trouble with protected and private when
# accessing the protected/private stuff of the enclosing class (or the
# super class of the enclosing class).
GCC295_FIX_2=sed -e 's~\(^\# [0-9][0-9]* "[^"]*"[ 0-9]*\) 4$$~\1~g;s~private:~public:~g;s~protected:~public:~g'
GCC295_FIX_2=sed -e 's@\(^\# [0-9][0-9]* "[^"]*"[ 0-9]*\) 4$$@\1@g;s@private:@public:@g;s@protected:@public:@g'
# Check if we want to show what we are doing
ifdef VERBOSE
@@ -98,7 +98,7 @@ MODIFIED := $(shell echo "$(VERSIONS)" | cut -f 3 -d' ')
ifdef REVISION
# Use specified revision (which should be of the form "r000").
REV := $(REVISION)
REV_NR := $(shell echo $(REVISION) | sed "s~[^0-9]~~g")
REV_NR := $(shell echo $(REVISION) | sed "s@[^0-9]@@g")
else
# Use autodetected revisions
REV := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ')
@@ -143,15 +143,15 @@ endif
$(OBJS_C:%.o=%.d): %.d: $(SRC_DIR)/%.c $(FILE_DEP)
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.c=%.c)'
$(Q)$(CC_HOST) $(CC_CFLAGS) $(CFLAGS) -MM $< | sed 's~^$(@F:%.d=%.o):~$@ $(@:%.d=%.o):~' > $@
$(Q)$(CC_HOST) $(CC_CFLAGS) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@
$(OBJS_CPP:%.o=%.d): %.d: $(SRC_DIR)/%.cpp $(FILE_DEP)
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_HOST) $(CFLAGS) -MM $< | sed 's~^$(@F:%.d=%.o):~$@ $(@:%.d=%.o):~' > $@
$(Q)$(CXX_HOST) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@
$(OBJS_MM:%.o=%.d): %.d: $(SRC_DIR)/%.mm $(FILE_DEP)
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)'
$(Q)$(CC_HOST) $(CFLAGS) -MM $< | sed 's~^$(@F:%.d=%.o):~$@ $(@:%.d=%.o):~' > $@
$(Q)$(CC_HOST) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@
$(OBJS_RC:%.o=%.d): %.d: $(SRC_DIR)/%.rc $(FILE_DEP)
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)'
@@ -182,7 +182,7 @@ endif
# Convert x:/... paths to /x/... for mingw
ifeq ($(OS), MINGW)
@cat Makefile.dep.tmp | sed 's~\([a-zA-Z]\):\/~\/\1\/~g' > Makefile.dep.tmp.mingw
@cat Makefile.dep.tmp | sed 's@\([a-zA-Z]\):\/@\/\1\/@g' > Makefile.dep.tmp.mingw
@cp Makefile.dep.tmp.mingw Makefile.dep.tmp
@rm -f Makefile.dep.tmp.mingw
endif
@@ -211,7 +211,7 @@ endif
{ \
print $$0 \
} \
' < Makefile.dep.tmp | sed 's~ *~ ~g;s~ $$~~' | $(SORT) > Makefile.dep
' < Makefile.dep.tmp | sed 's@ *@ @g;s@ $$@@' | $(SORT) > Makefile.dep
$(Q)rm -f Makefile.dep.tmp Makefile.dep.tmp.bak
@@ -280,10 +280,10 @@ $(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
# Revision files
$(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/rev.cpp.in
$(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s~@@REVISION@@~$(REV_NR)~g;s~@@VERSION@@~$(REV)~g;s~@@MODIFIED@@~$(MODIFIED)~g;s~@@DATE@@~`date +%d.%m.%y`~g" > $(SRC_DIR)/rev.cpp
$(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/rev.cpp
$(SRC_DIR)/ottdres.rc: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/ottdres.rc.in
$(Q)cat $(SRC_DIR)/ottdres.rc.in | sed "s~@@REVISION@@~$(REV_NR)~g;s~@@VERSION@@~$(REV)~g;s~@@DATE@@~`date +%d.%m.%y`~g" > $(SRC_DIR)/ottdres.rc
$(Q)cat $(SRC_DIR)/ottdres.rc.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/ottdres.rc
FORCE:

View File

@@ -220,6 +220,7 @@ function Regression::Airport()
}
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
print(" GetPrice(): " + AIAirport.GetPrice(0));
print(" BuildAirport(): " + AIAirport.BuildAirport(32116, 0, AIStation.STATION_JOIN_ADJACENT));
print(" IsHangarTile(): " + AIAirport.IsHangarTile(32116));
print(" IsAirportTile(): " + AIAirport.IsAirportTile(32116));
@@ -256,12 +257,15 @@ function Regression::Bridge()
print(" Valid Bridges: " + j);
print(" IsBridgeTile(): " + AIBridge.IsBridgeTile(33160));
print(" GetBridgeID(): " + AIBridge.GetBridgeID(33160));
print(" RemoveBridge(): " + AIBridge.RemoveBridge(33155));
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
print(" GetOtherBridgeEnd(): " + AIBridge.GetOtherBridgeEnd(33160));
print(" BuildBridge(): " + AIBridge.BuildBridge(AIVehicle.VT_ROAD, 5, 33160, 33155));
print(" IsBridgeTile(): " + AIBridge.IsBridgeTile(33160));
print(" GetBridgeID(): " + AIBridge.GetBridgeID(33160));
print(" IsBridgeTile(): " + AIBridge.IsBridgeTile(33155));
print(" GetBridgeID(): " + AIBridge.GetBridgeID(33155));
print(" GetOtherBridgeEnd(): " + AIBridge.GetOtherBridgeEnd(33160));
print(" BuildBridge(): " + AIBridge.BuildBridge(AIVehicle.VT_ROAD, 5, 33160, 33155));
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
@@ -329,6 +333,7 @@ function Regression::Cargo()
print(" GetCargoIncome(10, 10): " + AICargo.GetCargoIncome(i, 10, 10));
print(" GetCargoIncome(100, 10): " + AICargo.GetCargoIncome(i, 100, 10));
print(" GetCargoIncome(10, 100): " + AICargo.GetCargoIncome(i, 10, 100));
print(" GetRoadVehicleTypeForCargo(): " + AIRoad.GetRoadVehicleTypeForCargo(i));
}
}
@@ -631,6 +636,9 @@ function Regression::IndustryTypeList()
print(" GetName(): " + AIIndustryType.GetName(i));
print(" CanBuildIndustry(): " + AIIndustryType.CanBuildIndustry(i));
print(" CanProspectIndustry(): " + AIIndustryType.CanProspectIndustry(i));
print(" IsBuiltOnWater(): " + AIIndustryType.IsBuiltOnWater(i));
print(" HasHeliport(): " + AIIndustryType.HasHeliport(i));
print(" HasDock(): " + AIIndustryType.HasDock(i));
}
}
@@ -1182,7 +1190,7 @@ function Regression::TileList()
print("");
print("--TileList--");
print(" Count(): " + list.Count());
list.AddRectangle(41895 - 256 * 2, 256 * 2 + 41895 + 8);
list.AddRectangle(34436, 256 * 2 + 34436 + 8);
print(" Count(): " + list.Count());
list.Valuate(AITile.GetHeight);
@@ -1193,6 +1201,30 @@ function Regression::TileList()
print(" " + i + " => " + list.GetValue(i));
}
list.Valuate(AITile.GetCornerHeight, AITile.CORNER_N);
print(" CornerHeight(North): done");
print(" Count(): " + list.Count());
print(" ListDump:");
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
print(" " + i + " => " + list.GetValue(i));
}
list.Valuate(AITile.GetMinHeight);
print(" MinHeight(): done");
print(" Count(): " + list.Count());
print(" ListDump:");
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
print(" " + i + " => " + list.GetValue(i));
}
list.Valuate(AITile.GetMaxHeight);
print(" MaxHeight(): done");
print(" Count(): " + list.Count());
print(" ListDump:");
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
print(" " + i + " => " + list.GetValue(i));
}
list.Valuate(AITile.GetSlope);
list.KeepValue(0);
print(" Slope(): done");
@@ -1203,6 +1235,8 @@ function Regression::TileList()
print(" " + i + " => " + list.GetValue(i));
}
list.Clear();
list.AddRectangle(41895 - 256 * 2, 256 * 2 + 41895 + 8);
list.Valuate(AITile.IsBuildable);
list.KeepValue(1);
print(" Buildable(): done");

View File

@@ -620,6 +620,7 @@
GetAirportHeight(9): -1
GetAirportCoverageRadius(9): -1
GetBankBalance(): 100000
GetPrice(): 84
BuildAirport(): true
IsHangarTile(): false
IsAirportTile(): true
@@ -743,12 +744,15 @@
GetMinLength(): -1
Valid Bridges: 10
IsBridgeTile(): false
GetBridgeID(): -1
RemoveBridge(): false
GetLastErrorString(): ERR_PRECONDITION_FAILED
GetOtherBridgeEnd(): -1
BuildBridge(): true
IsBridgeTile(): true
GetBridgeID(): 5
IsBridgeTile(): true
GetBridgeID(): 5
GetOtherBridgeEnd(): 33155
BuildBridge(): false
GetLastErrorString(): ERR_ALREADY_BUILT
@@ -824,6 +828,7 @@
GetCargoIncome(10, 10): -1
GetCargoIncome(100, 10): -1
GetCargoIncome(10, 100): -1
GetRoadVehicleTypeForCargo(): 1
Cargo 0
IsValidCargo(): true
GetCargoLabel(): 'PASS'
@@ -834,6 +839,7 @@
GetCargoIncome(10, 10): 3
GetCargoIncome(100, 10): 39
GetCargoIncome(10, 100): 3
GetRoadVehicleTypeForCargo(): 0
Cargo 1
IsValidCargo(): true
GetCargoLabel(): 'COAL'
@@ -844,6 +850,7 @@
GetCargoIncome(10, 10): 7
GetCargoIncome(100, 10): 75
GetCargoIncome(10, 100): 6
GetRoadVehicleTypeForCargo(): 1
Cargo 2
IsValidCargo(): true
GetCargoLabel(): 'MAIL'
@@ -854,6 +861,7 @@
GetCargoIncome(10, 10): 5
GetCargoIncome(100, 10): 58
GetCargoIncome(10, 100): 5
GetRoadVehicleTypeForCargo(): 1
Cargo 3
IsValidCargo(): true
GetCargoLabel(): 'OIL_'
@@ -864,6 +872,7 @@
GetCargoIncome(10, 10): 5
GetCargoIncome(100, 10): 56
GetCargoIncome(10, 100): 5
GetRoadVehicleTypeForCargo(): 1
Cargo 4
IsValidCargo(): true
GetCargoLabel(): 'LVST'
@@ -874,6 +883,7 @@
GetCargoIncome(10, 10): 5
GetCargoIncome(100, 10): 55
GetCargoIncome(10, 100): 4
GetRoadVehicleTypeForCargo(): 1
Cargo 5
IsValidCargo(): true
GetCargoLabel(): 'GOOD'
@@ -884,6 +894,7 @@
GetCargoIncome(10, 10): 7
GetCargoIncome(100, 10): 78
GetCargoIncome(10, 100): 6
GetRoadVehicleTypeForCargo(): 1
Cargo 6
IsValidCargo(): true
GetCargoLabel(): 'GRAI'
@@ -894,6 +905,7 @@
GetCargoIncome(10, 10): 6
GetCargoIncome(100, 10): 60
GetCargoIncome(10, 100): 5
GetRoadVehicleTypeForCargo(): 1
Cargo 7
IsValidCargo(): true
GetCargoLabel(): 'WOOD'
@@ -904,6 +916,7 @@
GetCargoIncome(10, 10): 6
GetCargoIncome(100, 10): 63
GetCargoIncome(10, 100): 5
GetRoadVehicleTypeForCargo(): 1
Cargo 8
IsValidCargo(): true
GetCargoLabel(): 'IORE'
@@ -914,6 +927,7 @@
GetCargoIncome(10, 10): 6
GetCargoIncome(100, 10): 65
GetCargoIncome(10, 100): 5
GetRoadVehicleTypeForCargo(): 1
Cargo 9
IsValidCargo(): true
GetCargoLabel(): 'STEL'
@@ -924,6 +938,7 @@
GetCargoIncome(10, 10): 7
GetCargoIncome(100, 10): 72
GetCargoIncome(10, 100): 6
GetRoadVehicleTypeForCargo(): 1
Cargo 10
IsValidCargo(): true
GetCargoLabel(): 'VALU'
@@ -934,6 +949,7 @@
GetCargoIncome(10, 10): 9
GetCargoIncome(100, 10): 94
GetCargoIncome(10, 100): 7
GetRoadVehicleTypeForCargo(): 1
Cargo 11
IsValidCargo(): false
GetCargoLabel(): '(null : 0x00000000)'
@@ -944,6 +960,7 @@
GetCargoIncome(10, 10): -1
GetCargoIncome(100, 10): -1
GetCargoIncome(10, 100): -1
GetRoadVehicleTypeForCargo(): 1
Cargo 12
IsValidCargo(): false
GetCargoLabel(): '(null : 0x00000000)'
@@ -954,6 +971,7 @@
GetCargoIncome(10, 10): -1
GetCargoIncome(100, 10): -1
GetCargoIncome(10, 100): -1
GetRoadVehicleTypeForCargo(): 1
Cargo 13
IsValidCargo(): false
GetCargoLabel(): '(null : 0x00000000)'
@@ -964,6 +982,7 @@
GetCargoIncome(10, 10): -1
GetCargoIncome(100, 10): -1
GetCargoIncome(10, 100): -1
GetRoadVehicleTypeForCargo(): 1
Cargo 14
IsValidCargo(): false
GetCargoLabel(): '(null : 0x00000000)'
@@ -974,6 +993,7 @@
GetCargoIncome(10, 10): -1
GetCargoIncome(100, 10): -1
GetCargoIncome(10, 100): -1
GetRoadVehicleTypeForCargo(): 1
--CargoList--
Count(): 11
@@ -1052,7 +1072,7 @@
GetAutoRenewStatus(); true
SetAutoRenewStatus(true); false
SetAutoRenewStatus(false); true
GetAutoRenewMonths(); -6
GetAutoRenewMonths(); 6
SetAutoRenewMonths(-12); true
GetAutoRenewMonths(); -12
SetAutoRenewMonths(-12); false
@@ -6907,6 +6927,9 @@
GetName(): Farm
CanBuildIndustry(): false
CanProspectIndustry(): false
IsBuiltOnWater(): false
HasHeliport(): false
HasDock(): false
Id: 5
IsRawIndustry(): true
ProductionCanIncrease(): true
@@ -6914,6 +6937,9 @@
GetName(): Oil Rig
CanBuildIndustry(): false
CanProspectIndustry(): false
IsBuiltOnWater(): true
HasHeliport(): true
HasDock(): true
Id: 12
IsRawIndustry(): false
ProductionCanIncrease(): true
@@ -6921,6 +6947,9 @@
GetName(): Bank
CanBuildIndustry(): true
CanProspectIndustry(): false
IsBuiltOnWater(): false
HasHeliport(): false
HasDock(): false
Id: 11
IsRawIndustry(): true
ProductionCanIncrease(): false
@@ -6928,6 +6957,9 @@
GetName(): Oil Wells
CanBuildIndustry(): false
CanProspectIndustry(): false
IsBuiltOnWater(): false
HasHeliport(): false
HasDock(): false
Id: 1
IsRawIndustry(): false
ProductionCanIncrease(): true
@@ -6935,6 +6967,9 @@
GetName(): Power Station
CanBuildIndustry(): true
CanProspectIndustry(): false
IsBuiltOnWater(): false
HasHeliport(): false
HasDock(): false
Id: 3
IsRawIndustry(): true
ProductionCanIncrease(): true
@@ -6942,6 +6977,9 @@
GetName(): Forest
CanBuildIndustry(): false
CanProspectIndustry(): false
IsBuiltOnWater(): false
HasHeliport(): false
HasDock(): false
Id: 2
IsRawIndustry(): false
ProductionCanIncrease(): true
@@ -6949,6 +6987,9 @@
GetName(): Sawmill
CanBuildIndustry(): true
CanProspectIndustry(): false
IsBuiltOnWater(): false
HasHeliport(): false
HasDock(): false
Id: 18
IsRawIndustry(): true
ProductionCanIncrease(): true
@@ -6956,6 +6997,9 @@
GetName(): Iron Ore Mine
CanBuildIndustry(): false
CanProspectIndustry(): false
IsBuiltOnWater(): false
HasHeliport(): false
HasDock(): false
Id: 0
IsRawIndustry(): true
ProductionCanIncrease(): true
@@ -6963,6 +7007,9 @@
GetName(): Coal Mine
CanBuildIndustry(): false
CanProspectIndustry(): false
IsBuiltOnWater(): false
HasHeliport(): false
HasDock(): false
Id: 8
IsRawIndustry(): false
ProductionCanIncrease(): true
@@ -6970,6 +7017,9 @@
GetName(): Steel Mill
CanBuildIndustry(): true
CanProspectIndustry(): false
IsBuiltOnWater(): false
HasHeliport(): false
HasDock(): false
Id: 4
IsRawIndustry(): false
ProductionCanIncrease(): true
@@ -6977,6 +7027,9 @@
GetName(): Oil Refinery
CanBuildIndustry(): true
CanProspectIndustry(): false
IsBuiltOnWater(): false
HasHeliport(): false
HasDock(): false
Id: 6
IsRawIndustry(): false
ProductionCanIncrease(): true
@@ -6984,6 +7037,9 @@
GetName(): Factory
CanBuildIndustry(): true
CanProspectIndustry(): false
IsBuiltOnWater(): false
HasHeliport(): false
HasDock(): false
--Map--
GetMapSize(): 65536
@@ -7273,7 +7329,7 @@
Count(): 9
ListDump:
27631 => 29
27631 => 255
27631 => 65535
27631 => true
27631 => false
27888 => 13
@@ -7311,125 +7367,178 @@
--TileList--
Count(): 0
Count(): 45
Count(): 27
Height(): done
Count(): 45
Count(): 27
ListDump:
42411 => 2
42410 => 2
42409 => 2
42408 => 2
42407 => 2
42154 => 2
42153 => 2
42152 => 2
42151 => 2
41898 => 2
41897 => 2
41896 => 2
41895 => 2
41642 => 2
41641 => 2
41640 => 2
41639 => 2
41386 => 2
41385 => 2
41384 => 2
41383 => 2
42415 => 1
42414 => 1
42413 => 1
42412 => 1
42159 => 1
42158 => 1
42157 => 1
42156 => 1
42155 => 1
41903 => 1
41902 => 1
41901 => 1
41900 => 1
41899 => 1
41647 => 1
41646 => 1
41645 => 1
41644 => 1
41643 => 1
41391 => 1
41390 => 1
41389 => 1
41388 => 1
41387 => 1
34956 => 4
34700 => 4
34444 => 4
34955 => 3
34954 => 3
34953 => 3
34699 => 3
34698 => 3
34697 => 3
34693 => 3
34692 => 3
34443 => 3
34442 => 3
34441 => 3
34439 => 3
34438 => 3
34437 => 3
34436 => 3
34952 => 2
34951 => 2
34950 => 2
34949 => 2
34948 => 2
34696 => 2
34695 => 2
34694 => 2
34440 => 2
CornerHeight(North): done
Count(): 27
ListDump:
34956 => 4
34700 => 4
34444 => 4
34955 => 3
34954 => 3
34953 => 3
34699 => 3
34698 => 3
34697 => 3
34693 => 3
34692 => 3
34443 => 3
34442 => 3
34441 => 3
34439 => 3
34438 => 3
34437 => 3
34436 => 3
34952 => 2
34951 => 2
34950 => 2
34949 => 2
34948 => 2
34696 => 2
34695 => 2
34694 => 2
34440 => 2
MinHeight(): done
Count(): 27
ListDump:
34956 => 4
34700 => 4
34444 => 4
34955 => 3
34954 => 3
34953 => 3
34699 => 3
34698 => 3
34697 => 3
34443 => 3
34442 => 3
34441 => 3
34436 => 3
34952 => 2
34951 => 2
34950 => 2
34949 => 2
34948 => 2
34696 => 2
34695 => 2
34694 => 2
34693 => 2
34692 => 2
34440 => 2
34439 => 2
34438 => 2
34437 => 2
MaxHeight(): done
Count(): 27
ListDump:
34956 => 4
34955 => 4
34700 => 4
34699 => 4
34444 => 4
34443 => 4
34954 => 3
34953 => 3
34952 => 3
34951 => 3
34950 => 3
34949 => 3
34948 => 3
34698 => 3
34697 => 3
34696 => 3
34693 => 3
34692 => 3
34442 => 3
34441 => 3
34440 => 3
34439 => 3
34438 => 3
34437 => 3
34436 => 3
34695 => 2
34694 => 2
Slope(): done
KeepValue(0): done
Count(): 38
Count(): 12
ListDump:
42415 => 0
42414 => 0
42413 => 0
42410 => 0
42409 => 0
42408 => 0
42407 => 0
42159 => 0
42158 => 0
42157 => 0
42156 => 0
42153 => 0
42152 => 0
42151 => 0
41903 => 0
41902 => 0
41901 => 0
41900 => 0
41899 => 0
41897 => 0
41896 => 0
41895 => 0
41647 => 0
41646 => 0
41645 => 0
41644 => 0
41643 => 0
41641 => 0
41640 => 0
41639 => 0
41391 => 0
41390 => 0
41389 => 0
41388 => 0
41387 => 0
41385 => 0
41384 => 0
41383 => 0
34956 => 0
34954 => 0
34953 => 0
34700 => 0
34698 => 0
34697 => 0
34695 => 0
34694 => 0
34444 => 0
34442 => 0
34441 => 0
34436 => 0
Buildable(): done
KeepValue(1): done
Count(): 28
Count(): 35
BuildableRectangle(3, 3) ListDump:
42415 => 1
42414 => 1
42413 => 1
42412 => 1
42411 => 1
42410 => 1
42159 => 1
42158 => 1
42157 => 1
42156 => 1
42155 => 1
42154 => 1
41903 => 1
41902 => 1
41901 => 1
41900 => 1
41899 => 1
41898 => 1
41647 => 1
41646 => 1
41645 => 1
41644 => 1
41643 => 1
41642 => 1
41641 => 1
41391 => 1
41390 => 1
41389 => 1
41388 => 1
41387 => 1
41386 => 1
41385 => 1
42153 => 0
41897 => 0
@@ -7441,26 +7550,33 @@
42413 => 173
42158 => 173
41903 => 173
42412 => 172
42157 => 172
41902 => 172
41647 => 172
42411 => 171
42156 => 171
41901 => 171
41646 => 171
41391 => 171
42410 => 170
42155 => 170
41900 => 170
41645 => 170
41390 => 170
42154 => 169
41899 => 169
41644 => 169
41389 => 169
42153 => 168
41898 => 168
41643 => 168
41388 => 168
41897 => 167
41642 => 167
41387 => 167
41641 => 166
41386 => 166
41385 => 165
41384 => 164
DistanceSquareToTile(30000) ListDump:
@@ -7477,17 +7593,24 @@
42157 => 17834
41390 => 17812
41901 => 17741
42412 => 17680
41645 => 17650
42156 => 17585
41389 => 17561
41900 => 17492
42411 => 17433
41644 => 17401
42155 => 17338
41388 => 17312
41899 => 17245
42410 => 17188
41643 => 17154
42154 => 17093
41387 => 17065
41898 => 17000
41642 => 16909
42153 => 16850
41386 => 16820
41897 => 16757
41641 => 16666
41385 => 16577
@@ -7496,63 +7619,77 @@
42415 => -1
42414 => -1
42413 => -1
42412 => -1
42411 => -1
42410 => -1
42159 => -1
42158 => -1
42157 => -1
42156 => -1
42155 => -1
42154 => -1
42153 => -1
41903 => -1
41902 => -1
41901 => -1
41900 => -1
41899 => -1
41898 => -1
41897 => -1
41647 => -1
41646 => -1
41645 => -1
41644 => -1
41643 => -1
41642 => -1
41641 => -1
41391 => -1
41390 => -1
41389 => -1
41388 => -1
41387 => -1
41386 => -1
41385 => -1
41384 => -1
GetClosestTown() ListDump:
42415 => 3
42414 => 3
42413 => 3
42412 => 3
42411 => 3
42410 => 3
42159 => 3
42158 => 3
42157 => 3
42156 => 3
42155 => 3
42154 => 3
42153 => 3
41903 => 3
41902 => 3
41901 => 3
41900 => 3
41899 => 3
41898 => 3
41897 => 3
41647 => 3
41646 => 3
41645 => 3
41644 => 3
41643 => 3
41642 => 3
41641 => 3
41391 => 3
41390 => 3
41389 => 3
41388 => 3
41387 => 3
41386 => 3
41385 => 3
41384 => 3
CargoAcceptance(): done
KeepAboveValue(10): done
Count(): 9
Count(): 15
ListDump:
41897 => 29
41385 => 26
@@ -7560,9 +7697,15 @@
42153 => 25
41641 => 23
41899 => 17
41898 => 17
41387 => 17
41386 => 17
41643 => 14
41642 => 14
42411 => 13
42410 => 13
42155 => 13
42154 => 13
RoadTile(): done
KeepValue(1): done
Count(): 0

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@ log() {
}
set_default() {
released_version=""
released_version="0.7.1-RC2"
ignore_extra_parameters="0"
# We set all kinds of defaults for params. Later on the user can override
@@ -415,7 +415,7 @@ save_params() {
configure="$CONFIGURE_EXECUTABLE --ignore-extra-parameters"
for p in $save_params_array; do
eval "v=\"\$$p\""
p=`echo "$p" | sed 's~_~-~g;s~\n~~g;s~ ~\\ ~g'`
p=`echo "$p" | sed 's@_@-@g;s@\n@@g;s@ @\\ @g'`
# Only save those params that aren't empty
configure="$configure --$p=\"$v\""
done
@@ -815,6 +815,7 @@ check_params() {
fi
if [ "$os" = "OSX" ]; then
check_osx_sdk
# Test on G5
if [ "$enable_osx_g5" != "0" ]; then
@@ -903,7 +904,7 @@ check_params() {
doc_dir="$data_dir/docs"
fi
else
doc_dir="`echo $doc_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
doc_dir="`echo $doc_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
fi
if [ "$icon_theme_dir" = "1" ]; then
@@ -913,7 +914,7 @@ check_params() {
icon_theme_dir=""
fi
else
icon_theme_dir="`echo $icon_theme_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
icon_theme_dir="`echo $icon_theme_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
fi
if [ "$personal_dir" = "1" ]; then
@@ -925,7 +926,7 @@ check_params() {
personal_dir=".openttd"
fi
else
personal_dir="`echo $personal_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
personal_dir="`echo $personal_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
fi
if [ "$shared_dir" = "1" ]; then
@@ -936,7 +937,7 @@ check_params() {
shared_dir=""
fi
else
shared_dir="`echo $shared_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
shared_dir="`echo $shared_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
fi
if [ "$man_dir" = "1" ]; then
@@ -947,7 +948,7 @@ check_params() {
man_dir=""
fi
else
man_dir="`echo $man_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
man_dir="`echo $man_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
fi
if [ "$menu_dir" = "1" ]; then
@@ -958,7 +959,7 @@ check_params() {
menu_dir=""
fi
else
menu_dir="`echo $menu_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
menu_dir="`echo $menu_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
fi
# "set_universal_binary_flags" needs to be before "detect_iconv"
@@ -1206,7 +1207,7 @@ make_cflags_and_ldflags() {
if [ -n "$sdl_config" ]; then
CFLAGS="$CFLAGS -DWITH_SDL"
# SDL must not add _GNU_SOURCE as it breaks many platforms
CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's~-D_GNU_SOURCE[^ ]*~~'`"
CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`"
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then
if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$sdl_config --static-libs`"
@@ -1268,7 +1269,7 @@ make_cflags_and_ldflags() {
if [ "$os" = "OSX" ]; then
# fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
# Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a `$fontconfig_config --libs --static | sed s~-lfontconfig~~`"
LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a `$fontconfig_config --libs --static | sed s@-lfontconfig@@`"
else
LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
fi
@@ -1400,8 +1401,10 @@ make_cflags_and_ldflags() {
# Lovely hackish, not?
# Btw, this almost always comes from outside the configure, so it is
# not something we can control.
# Also make makedepend aware of compiler's built-in defines.
if [ "$with_makedepend" != "0" ]; then
cflags_makedep="` echo "$CFLAGS" | sed 's~ /~ -~g;s~-I[ ]*[^ ]*~~g'`"
cflags_makedep="`echo | $cxx_host -E -x c++ -dM - | sed 's@.define @-D@g;s@ .*@ @g;s@(.*)@@g' | tr -d '\r\n'`"
cflags_makedep="$cflags_makedep `echo "$CFLAGS" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g'`"
else
makedepend=""
fi
@@ -1617,6 +1620,30 @@ set_universal_binary_flags() {
fi
}
check_osx_sdk() {
cat > tmp.osx.cpp << EOF
#include <AvailabilityMacros.h>
#if !defined(MAC_OS_X_VERSION_10_5)
# error "Need newer SDK"
#endif
int main() {
return 0;
}
EOF
execute="$cxx_host $CFLAGS -E tmp.osx.cpp -o - 2>&1"
eval $execute > /dev/null
ret=$?
log 2 "executing $execute"
log 2 " exit code $ret"
rm -f tmp.osx.cpp
if [ "$ret" != "0" ]; then
log 1 "I couldn't detect any XCode >= 2.5 on your system"
log 1 "please install/upgrade your XCode"
exit 1
fi
}
check_direct_music() {
echo "
#include <windows.h>
@@ -2405,7 +2432,7 @@ int main() {
}
EOF
execute="$cxx_host $CFLAGS -c tmp.iconv.cpp -o tmp.iconv -DTESTING 2>&1"
eval $execute >&/dev/null
eval $execute > /dev/null
ret=$?
log 2 "executing $execute"
log 2 " exit code $ret"
@@ -2426,7 +2453,7 @@ int main() {
}
EOF
execute="$cxx_host $CFLAGS tmp.iconv.cpp -o tmp.iconv -DTESTING 2>&1"
eval $execute >&/dev/null
eval $execute > /dev/null
ret=$?
log 2 "executing $execute"
log 2 " exit code $ret"
@@ -2537,104 +2564,104 @@ make_sed() {
# use multiple OBJS_DIR, because all in-between
# binaries are stored in there, and nowhere else.
SRC_REPLACE="
s~!!CC_HOST!!~$cc_host~g;
s~!!CXX_HOST!!~$cxx_host~g;
s~!!CC_BUILD!!~$cc_build~g;
s~!!CXX_BUILD!!~$cxx_build~g;
s~!!WINDRES!!~$windres~g;
s~!!STRIP!!~$strip $strip_arg~g;
s~!!LIPO!!~$lipo~g;
s~!!CC_CFLAGS!!~$CC_CFLAGS~g;
s~!!CFLAGS!!~$T_CFLAGS~g;
s~!!CFLAGS_BUILD!!~$CFLAGS_BUILD~g;
s~!!STRGEN_FLAGS!!~$strgen_flags~g;
s~!!LIBS!!~$LIBS~g;
s~!!LDFLAGS!!~$T_LDFLAGS~g;
s~!!BIN_DIR!!~$BIN_DIR~g;
s~!!ROOT_DIR!!~$ROOT_DIR~g;
s~!!MEDIA_DIR!!~$MEDIA_DIR~g;
s~!!SOURCE_LIST!!~$SOURCE_LIST~g;
s~!!SRC_OBJS_DIR!!~$SRC_OBJS_DIR~g;
s~!!LANG_OBJS_DIR!!~$LANG_OBJS_DIR~g;
s~!!SRC_DIR!!~$SRC_DIR~g;
s~!!SCRIPT_SRC_DIR!!~$SCRIPT_SRC_DIR~g;
s~!!OSXAPP!!~$OSXAPP~g;
s~!!LANG_DIR!!~$LANG_DIR~g;
s~!!TTD!!~$TTD~g;
s~!!BINARY_DIR!!~$prefix_dir/$binary_dir~g;
s~!!DATA_DIR!!~$prefix_dir/$data_dir~g;
s~!!DOC_DIR!!~$prefix_dir/$doc_dir~g;
s~!!MAN_DIR!!~$prefix_dir/$man_dir~g;
s~!!ICON_DIR!!~$prefix_dir/$icon_dir~g;
s~!!ICON_THEME_DIR!!~$prefix_dir/$icon_theme_dir~g;
s~!!PERSONAL_DIR!!~$personal_dir~g;
s~!!SHARED_DIR!!~$shared_dir~g;
s~!!INSTALL_DIR!!~$install_dir~g;
s~!!BINARY_NAME!!~$binary_name~g;
s~!!STRGEN!!~$STRGEN~g;
s~!!ENDIAN_CHECK!!~$ENDIAN_CHECK~g;
s~!!ENDIAN_FORCE!!~$endian~g;
s~!!STAGE!!~$STAGE~g;
s~!!MAKEDEPEND!!~$makedepend~g;
s~!!CFLAGS_MAKEDEP!!~$cflags_makedep~g;
s~!!SORT!!~$sort~g;
s~!!CONFIG_CACHE_COMPILER!!~config.cache.compiler~g;
s~!!CONFIG_CACHE_LINKER!!~config.cache.linker~g;
s~!!CONFIG_CACHE_ENDIAN!!~config.cache.endian~g;
s~!!CONFIG_CACHE_SOURCE!!~config.cache.source~g;
s~!!CONFIG_CACHE_VERSION!!~config.cache.version~g;
s~!!CONFIG_CACHE_SOURCE_LIST!!~config.cache.source.list~g;
s~!!CONFIG_CACHE_PWD!!~config.cache.pwd~g;
s~!!LANG_SUPPRESS!!~$lang_suppress~g;
s~!!OBJS_C!!~$OBJS_C~g;
s~!!OBJS_CPP!!~$OBJS_CPP~g;
s~!!OBJS_MM!!~$OBJS_MM~g;
s~!!OBJS_RC!!~$OBJS_RC~g;
s~!!SRCS!!~$SRCS~g;
s~!!OS!!~$os~g;
s~!!CONFIGURE_FILES!!~$CONFIGURE_FILES~g;
s~!!REVISION!!~$revision~g;
s~!!AWK!!~$awk~g;
s~!!GCC295!!~$gcc295~g;
s~!!DISTCC!!~$distcc~g;
s@!!CC_HOST!!@$cc_host@g;
s@!!CXX_HOST!!@$cxx_host@g;
s@!!CC_BUILD!!@$cc_build@g;
s@!!CXX_BUILD!!@$cxx_build@g;
s@!!WINDRES!!@$windres@g;
s@!!STRIP!!@$strip $strip_arg@g;
s@!!LIPO!!@$lipo@g;
s@!!CC_CFLAGS!!@$CC_CFLAGS@g;
s@!!CFLAGS!!@$T_CFLAGS@g;
s@!!CFLAGS_BUILD!!@$CFLAGS_BUILD@g;
s@!!STRGEN_FLAGS!!@$strgen_flags@g;
s@!!LIBS!!@$LIBS@g;
s@!!LDFLAGS!!@$T_LDFLAGS@g;
s@!!BIN_DIR!!@$BIN_DIR@g;
s@!!ROOT_DIR!!@$ROOT_DIR@g;
s@!!MEDIA_DIR!!@$MEDIA_DIR@g;
s@!!SOURCE_LIST!!@$SOURCE_LIST@g;
s@!!SRC_OBJS_DIR!!@$SRC_OBJS_DIR@g;
s@!!LANG_OBJS_DIR!!@$LANG_OBJS_DIR@g;
s@!!SRC_DIR!!@$SRC_DIR@g;
s@!!SCRIPT_SRC_DIR!!@$SCRIPT_SRC_DIR@g;
s@!!OSXAPP!!@$OSXAPP@g;
s@!!LANG_DIR!!@$LANG_DIR@g;
s@!!TTD!!@$TTD@g;
s@!!BINARY_DIR!!@$prefix_dir/$binary_dir@g;
s@!!DATA_DIR!!@$prefix_dir/$data_dir@g;
s@!!DOC_DIR!!@$prefix_dir/$doc_dir@g;
s@!!MAN_DIR!!@$prefix_dir/$man_dir@g;
s@!!ICON_DIR!!@$prefix_dir/$icon_dir@g;
s@!!ICON_THEME_DIR!!@$prefix_dir/$icon_theme_dir@g;
s@!!PERSONAL_DIR!!@$personal_dir@g;
s@!!SHARED_DIR!!@$shared_dir@g;
s@!!INSTALL_DIR!!@$install_dir@g;
s@!!BINARY_NAME!!@$binary_name@g;
s@!!STRGEN!!@$STRGEN@g;
s@!!ENDIAN_CHECK!!@$ENDIAN_CHECK@g;
s@!!ENDIAN_FORCE!!@$endian@g;
s@!!STAGE!!@$STAGE@g;
s@!!MAKEDEPEND!!@$makedepend@g;
s@!!CFLAGS_MAKEDEP!!@$cflags_makedep@g;
s@!!SORT!!@$sort@g;
s@!!CONFIG_CACHE_COMPILER!!@config.cache.compiler@g;
s@!!CONFIG_CACHE_LINKER!!@config.cache.linker@g;
s@!!CONFIG_CACHE_ENDIAN!!@config.cache.endian@g;
s@!!CONFIG_CACHE_SOURCE!!@config.cache.source@g;
s@!!CONFIG_CACHE_VERSION!!@config.cache.version@g;
s@!!CONFIG_CACHE_SOURCE_LIST!!@config.cache.source.list@g;
s@!!CONFIG_CACHE_PWD!!@config.cache.pwd@g;
s@!!LANG_SUPPRESS!!@$lang_suppress@g;
s@!!OBJS_C!!@$OBJS_C@g;
s@!!OBJS_CPP!!@$OBJS_CPP@g;
s@!!OBJS_MM!!@$OBJS_MM@g;
s@!!OBJS_RC!!@$OBJS_RC@g;
s@!!SRCS!!@$SRCS@g;
s@!!OS!!@$os@g;
s@!!CONFIGURE_FILES!!@$CONFIGURE_FILES@g;
s@!!REVISION!!@$revision@g;
s@!!AWK!!@$awk@g;
s@!!GCC295!!@$gcc295@g;
s@!!DISTCC!!@$distcc@g;
"
if [ "$icon_theme_dir" != "" ]; then
SRC_REPLACE="$SRC_REPLACE
s#!!ICON_THEME_DIR!!#$prefix_dir/$icon_theme_dir#g;
s@!!ICON_THEME_DIR!!@$prefix_dir/$icon_theme_dir@g;
"
else
SRC_REPLACE="$SRC_REPLACE
s#!!ICON_THEME_DIR!!##g;
s@!!ICON_THEME_DIR!!@@g;
"
fi
if [ "$man_dir" != "" ]; then
SRC_REPLACE="$SRC_REPLACE
s#!!MAN_DIR!!#$prefix_dir/$man_dir#g;
s@!!MAN_DIR!!@$prefix_dir/$man_dir@g;
"
else
SRC_REPLACE="$SRC_REPLACE
s#!!MAN_DIR!!##g;
s@!!MAN_DIR!!@@g;
"
fi
if [ "$menu_dir" != "" ]; then
SRC_REPLACE="$SRC_REPLACE
s#!!MENU_DIR!!#$prefix_dir/$menu_dir#g;
s@!!MENU_DIR!!@$prefix_dir/$menu_dir@g;
"
else
SRC_REPLACE="$SRC_REPLACE
s#!!MENU_DIR!!##g;
s@!!MENU_DIR!!@@g;
"
fi
}
generate_menu_item() {
MENU_REPLACE="
s~!!TTD!!~$TTD~g;
s~!!MENU_GROUP!!~$menu_group~g;
s~!!MENU_NAME!!~$menu_name~g
s@!!TTD!!@$TTD@g;
s@!!MENU_GROUP!!@$menu_group@g;
s@!!MENU_NAME!!@$menu_name@g
"
log 1 "Generating menu item..."
mkdir -p media

6
configure vendored
View File

@@ -37,7 +37,7 @@ if [ "$1" = "--reconfig" ] || [ "$1" = "--reconfigure" ]; then
exit 1
fi
# Make sure we don't lock config.cache
cat config.cache | sed 's~\\ ~\\\\ ~g' > cache.tmp
cat config.cache | sed 's@\\ @\\\\ @g' > cache.tmp
sh cache.tmp
rm -f cache.tmp
exit $?
@@ -59,7 +59,7 @@ STRGEN="strgen$EXE"
ENDIAN_CHECK="endian_check$EXE"
if [ -z "$sort" ]; then
PIPE_SORT="sed s~a~a~"
PIPE_SORT="sed s@a@a@"
else
PIPE_SORT="$sort"
fi
@@ -125,7 +125,7 @@ SRCS="` echo \"$SRCS\" | $awk ' { ORS = " " } { print $0; }'`"
# In makefiles, we always use -u for sort
if [ -z "$sort" ]; then
sort="sed s~a~a~"
sort="sed s@a@a@"
else
sort="$sort -u"
fi

View File

@@ -86,8 +86,8 @@ elif [ -d "$ROOT_DIR/.git" ]; then
fi
HASH=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null`
REV="g`echo $HASH | cut -c1-8`"
BRANCH=`git branch|grep '[*]' | sed 's~\* ~~;s~^master$~~'`
REV_NR=`LC_ALL=C git log --pretty=format:%s "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s~.*(svn r\([0-9]*\)).*~\1~"`
BRANCH=`git branch|grep '[*]' | sed 's@\* @@;s@^master$@@'`
REV_NR=`LC_ALL=C git log --pretty=format:%s "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
elif [ -d "$ROOT_DIR/.hg" ]; then
# We are a hg checkout
if [ -n "`hg status \"$SRC_DIR\" | grep -v '^?'`" ]; then
@@ -95,8 +95,8 @@ elif [ -d "$ROOT_DIR/.hg" ]; then
fi
HASH=`LC_ALL=C hg parents 2>/dev/null | head -n 1 | cut -d: -f3`
REV="h`echo $HASH | cut -c1-8`"
BRANCH=`hg branch | sed 's~^default$~~'`
REV_NR=`LC_ALL=C hg log -r $HASH:0 -k "svn" -l 1 --template "{desc}\n" "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s~.*(svn r\([0-9]*\)).*~\1~"`
BRANCH=`hg branch | sed 's@^default$@@'`
REV_NR=`LC_ALL=C hg log -r $HASH:0 -k "svn" -l 1 --template "{desc}\n" "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
else
# We don't know
MODIFIED="1"

View File

@@ -11,13 +11,15 @@ by the number below on http://bugs.openttd.org.
If the bug report is closed, it has been fixed, which then can be verified
in the latest SVN version of /trunk.
Bugs for 0.7.0-beta2
Bugs for 0.7.1-RC1
------------------------------------------------------------------------
URL: http://bugs.openttd.org
- 2689 Capacity ordering of articulated vehicle in build vehicle window is wrong
- 2769 No offer for buying bankrupt AIs
- 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

View File

@@ -1,17 +1,40 @@
openttd (0.7~svn-1) UNRELEASED; urgency=low
openttd (0.7.1~RC2) unstable; urgency=low
* Unreleased SVN version. Versioned to allow normal upgrades to released
versions.
* New upstream release.
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 03 Sep 2008 18:56:04 +0200
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 21 Mar 2008 14:34:56 +0200
openttd (0.7.0-beta2) unstable; urgency=low
openttd (0.7.1~RC1) unstable; urgency=low
* New upstream release.
-- 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 2008 13:37:42 +0000
openttd (0.7.0~RC2) unstable; urgency=low
* New upstream release.
-- 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 2008 00:07:00 +0200
openttd (0.7.0~beta2) unstable; urgency=low
* New upstream release.
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 10 Mar 2009 00:33:05 +0100
openttd (0.7.0-beta1) unstable; urgency=low
openttd (0.7.0~beta1) unstable; urgency=low
* New upstream release.

View File

@@ -1,11 +1,11 @@
!define APPNAME "OpenTTD" ; Define application name
!define APPVERSION "0.7.0" ; Define application version
!define INSTALLERVERSION 55 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!define APPVERSION "0.7.1-RC2" ; Define application version
!define APPVERSIONINTERNAL "0.7.1.0" ; Define application version in X.X.X.X
!define INSTALLERVERSION 60 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!include ${VERSION_INCLUDE}
!define APPURLLINK "http://www.openttd.org"
!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}"
!define APPVERSIONINTERNAL "${APPVERSION}.0" ; Needs to be of the format X.X.X.X
!define MUI_ICON "..\..\..\media\openttd.ico"
!define MUI_UNICON "..\..\..\media\openttd.ico"
@@ -112,13 +112,6 @@ Section "!OpenTTD" Section1
File ${PATH_ROOT}bin\data\*.grf
File ${PATH_ROOT}bin\data\*.obg
File ${PATH_ROOT}bin\data\opntitle.dat
; Copy scenario files (don't choke if they don't exist)
SetOutPath "$INSTDIR\scenario\"
File /nonfatal ${PATH_ROOT}bin\scenario\*.scn
; Copy heightmap files (don't choke if they don't exist)
SetOutPath "$INSTDIR\scenario\heightmap\"
File /nonfatal ${PATH_ROOT}bin\scenario\heightmap\*.*
; Copy the scripts
SetOutPath "$INSTDIR\scripts\"

View File

@@ -16,10 +16,10 @@ End Sub
Sub UpdateFile(modified, revision, version, cur_date, filename)
FSO.CopyFile filename & ".in", filename
FindReplaceInFile filename, "@@MODIFIED@@", modified
FindReplaceInFile filename, "@@REVISION@@", revision
FindReplaceInFile filename, "@@VERSION@@", version
FindReplaceInFile filename, "@@DATE@@", cur_date
FindReplaceInFile filename, "!!MODIFIED!!", modified
FindReplaceInFile filename, "!!REVISION!!", revision
FindReplaceInFile filename, "!!VERSION!!", version
FindReplaceInFile filename, "!!DATE!!", cur_date
End Sub
Sub UpdateFiles(version)
@@ -32,6 +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.1-RC2"
revision = 0
modified = 1
End If

View File

@@ -1,6 +1,6 @@
OpenTTD README
Last updated: 2009-03-10
Release version: 0.7.0-beta2
Last updated: 2009-04-01
Release version: 0.7.0
------------------------------------------------------------------------
@@ -253,8 +253,8 @@ features known from TTDPatch (http://www.ttdpatch.net/).
Several important non-standard controls:
* Ctrl makes much commands more powerful. For example Ctrl clicking on signals
with the build signal tool on signals changes their behaviour.
* Ctrl makes many commands more powerful. For example Ctrl clicking on signals
with the build signal tool changes their behaviour.
* Ingame console. More information at
http://wiki.openttd.org/index.php/Console
* Right clicking shows tooltips

View File

@@ -83,7 +83,7 @@ SQVM::SQVM(SQSharedState *ss)
_suspended = SQFalse;
_suspended_target=-1;
_suspended_root = SQFalse;
_suspended_traps=-1;
_suspended_traps=0;
_foreignptr=NULL;
_nnativecalls=0;
_lasterror = _null_;
@@ -688,6 +688,7 @@ bool SQVM::Execute(SQObjectPtr &closure, SQInteger target, SQInteger nargs, SQIn
_suspended = SQFalse;
break;
case ET_RESUME_OPENTTD:
traps = _suspended_traps;
_suspended = SQFalse;
break;
}
@@ -698,7 +699,7 @@ exception_restore:
for(;;)
{
DecreaseOps(1);
if (ShouldSuspend()) { _suspended = SQTrue; return true; }
if (ShouldSuspend()) { _suspended = SQTrue; _suspended_traps = traps; return true; }
const SQInstruction &_i_ = *ci->_ip++;
//dumpstack(_stackbase);

View File

@@ -103,6 +103,11 @@ struct AIListWindow : public Window {
sprintf(buf, "%d", selected_info->GetVersion());
DoDrawStringTruncated(buf, x + 5, y, TC_BLACK, this->width - x - 8);
y += 13;
if (selected_info->GetURL() != NULL) {
SetDParamStr(0, selected_info->GetURL());
DrawString(4, y, STR_AI_URL, TC_BLACK);
y += 13;
}
SetDParamStr(0, selected_info->GetDescription());
DrawStringMultiLine(4, y, STR_JUST_RAW_STRING, this->width - 8, this->widget[AIL_WIDGET_INFO_BG].bottom - y);
}
@@ -575,6 +580,8 @@ struct AIDebugWindow : public Window {
static CompanyID ai_debug_company;
int redraw_timer;
int last_vscroll_pos;
bool autoscroll;
AIDebugWindow(const WindowDesc *desc, WindowNumber number) : Window(desc, number)
{
@@ -587,6 +594,8 @@ struct AIDebugWindow : public Window {
this->vscroll.cap = 14;
this->vscroll.pos = 0;
this->resize.step_height = 12;
this->last_vscroll_pos = 0;
this->autoscroll = true;
if (ai_debug_company != INVALID_COMPANY) this->LowerWidget(ai_debug_company + AID_WIDGET_COMPANY_BUTTON_START);
@@ -664,13 +673,35 @@ struct AIDebugWindow : public Window {
AILog::LogData *log = (AILog::LogData *)AIObject::GetLogPointer();
_current_company = old_company;
SetVScrollCount(this, (log == NULL) ? 0 : log->used);
this->InvalidateWidget(AID_WIDGET_SCROLLBAR);
int scroll_count = (log == NULL) ? 0 : log->used;
if (this->vscroll.count != scroll_count) {
SetVScrollCount(this, scroll_count);
/* We need a repaint */
this->InvalidateWidget(AID_WIDGET_SCROLLBAR);
}
if (log == NULL) return;
/* Detect when the user scrolls the window. Enable autoscroll when the
* bottom-most line becomes visible. */
if (this->last_vscroll_pos != this->vscroll.pos) {
this->autoscroll = this->vscroll.pos >= log->used - this->vscroll.cap;
}
if (this->autoscroll) {
int scroll_pos = max(0, log->used - this->vscroll.cap);
if (scroll_pos != this->vscroll.pos) {
this->vscroll.pos = scroll_pos;
/* We need a repaint */
this->InvalidateWidget(AID_WIDGET_SCROLLBAR);
}
}
last_vscroll_pos = this->vscroll.pos;
int y = 6;
for (int i = this->vscroll.pos; i < (this->vscroll.cap + this->vscroll.pos); i++) {
uint pos = (log->count + log->pos - i) % log->count;
for (int i = this->vscroll.pos; i < (this->vscroll.cap + this->vscroll.pos) && i < log->used; i++) {
uint pos = (i + log->pos + 1 - log->used + log->count) % log->count;
if (log->lines[pos] == NULL) break;
TextColour colour;
@@ -693,6 +724,8 @@ struct AIDebugWindow : public Window {
this->RaiseWidget(ai_debug_company + AID_WIDGET_COMPANY_BUTTON_START);
ai_debug_company = show_ai;
this->LowerWidget(ai_debug_company + AID_WIDGET_COMPANY_BUTTON_START);
this->autoscroll = true;
this->last_vscroll_pos = this->vscroll.pos;
this->SetDirty();
}
@@ -726,6 +759,7 @@ struct AIDebugWindow : public Window {
virtual void OnResize(Point new_size, Point delta)
{
this->vscroll.cap += delta.y / (int)this->resize.step_height;
SetVScrollCount(this, this->vscroll.count); // vscroll.pos should be in a valid range
}
};

View File

@@ -36,6 +36,7 @@ AIFileInfo::~AIFileInfo()
free((void *)this->description);
free((void *)this->date);
free((void *)this->instance_name);
free((void *)this->url);
free(this->main_script);
free(this->SQ_instance);
}
@@ -98,6 +99,11 @@ bool AIFileInfo::CheckMethod(const char *name) const
if (!info->engine->CallIntegerMethod(*info->SQ_instance, "GetVersion", &info->version)) return SQ_ERROR;
if (!info->engine->CallStringMethodStrdup(*info->SQ_instance, "CreateInstance", &info->instance_name)) return SQ_ERROR;
/* The GetURL function is optional. */
if (info->engine->MethodExists(*info->SQ_instance, "GetURL")) {
if (!info->engine->CallStringMethodStrdup(*info->SQ_instance, "GetURL", &info->url)) return SQ_ERROR;
}
return 0;
}
@@ -125,6 +131,12 @@ bool AIFileInfo::CheckMethod(const char *name) const
} else {
info->min_loadable_version = info->GetVersion();
}
/* When there is an UseAsRandomAI function, call it. */
if (info->engine->MethodExists(*info->SQ_instance, "UseAsRandomAI")) {
if (!info->engine->CallBoolMethod(*info->SQ_instance, "UseAsRandomAI", &info->use_as_random)) return SQ_ERROR;
} else {
info->use_as_random = true;
}
/* Remove the link to the real instance, else it might get deleted by RegisterAI() */
sq_setinstanceup(vm, 2, NULL);

View File

@@ -41,7 +41,7 @@ public:
friend class AIInfo;
friend class AILibrary;
AIFileInfo() : SQ_instance(NULL), main_script(NULL), author(NULL), name(NULL), short_name(NULL), description(NULL), date(NULL), instance_name(NULL) {};
AIFileInfo() : SQ_instance(NULL), main_script(NULL), author(NULL), name(NULL), short_name(NULL), description(NULL), date(NULL), instance_name(NULL), url(NULL) {};
~AIFileInfo();
/**
@@ -84,6 +84,11 @@ public:
*/
const char *GetInstanceName() const { return this->instance_name; }
/**
* Get the website for this script.
*/
const char *GetURL() const { return this->url; }
/**
* Get the filename of the main.nut script.
*/
@@ -111,6 +116,7 @@ private:
const char *date;
const char *instance_name;
int version;
const char *url;
};
class AIInfo : public AIFileInfo {
@@ -155,9 +161,15 @@ public:
*/
int GetSettingDefaultValue(const char *name) const;
/**
* Use this AI as a random AI.
*/
bool UseAsRandomAI() const { return this->use_as_random; }
private:
AIConfigItemList config_list;
int min_loadable_version;
bool use_as_random;
};
class AILibrary : public AIFileInfo {

View File

@@ -31,7 +31,7 @@ class DummyAI extends AIController {
function Start() { \n\
AILog.Error(\"No suitable AI found to load.\"); \n\
AILog.Error(\"This AI is a dummy AI and won't do anything.\"); \n\
AILog.Error(\"You can download several via the 'Online Content' system.\"); \n\
AILog.Error(\"You can download several AIs via the 'Online Content' system.\"); \n\
} \n\
} \n\
");

View File

@@ -19,6 +19,7 @@
#define DEFINE_SCRIPT_FILES
#include "ai_info.hpp"
#include "ai_config.hpp"
#include "ai_storage.hpp"
#include "ai_instance.hpp"
#include "ai_gui.hpp"
@@ -255,7 +256,16 @@ void AIInstance::Died()
this->engine = NULL;
ShowAIDebugWindow(_current_company);
ShowErrorMessage(INVALID_STRING_ID, STR_AI_PLEASE_REPORT_CRASH, 0, 0);
const AIInfo *info = AIConfig::GetConfig(_current_company)->GetInfo();
if (info != NULL) {
ShowErrorMessage(INVALID_STRING_ID, STR_AI_PLEASE_REPORT_CRASH, 0, 0);
if (info->GetURL() != NULL) {
AILog::Info("Please report the error to the following URL:");
AILog::Info(info->GetURL());
}
}
}
void AIInstance::GameLoop()

View File

@@ -153,7 +153,7 @@ AIScanner::AIScanner() :
/* Create the dummy AI */
this->engine->ResetCrashed();
strcpy(this->main_script, "%_dummy");
strecpy(this->main_script, "%_dummy", lastof(this->main_script));
extern void AI_CreateAIInfoDummy(HSQUIRRELVM vm);
AI_CreateAIInfoDummy(this->engine->GetVM());
}
@@ -345,20 +345,31 @@ void AIScanner::RegisterAI(AIInfo *info)
AIInfo *AIScanner::SelectRandomAI()
{
if (this->info_single_list.size() == 0) {
uint num_random_ais = 0;
for (AIInfoList::iterator it = this->info_single_list.begin(); it != this->info_single_list.end(); it++) {
if (it->second->UseAsRandomAI()) num_random_ais++;
}
if (num_random_ais == 0) {
DEBUG(ai, 0, "No suitable AI found, loading 'dummy' AI.");
return this->info_dummy;
}
/* Find a random AI */
uint pos;
if (_networking) pos = InteractiveRandomRange((uint16)this->info_single_list.size());
else pos = RandomRange((uint16)this->info_single_list.size());
if (_networking) {
pos = InteractiveRandomRange(num_random_ais);
} else {
pos = RandomRange(num_random_ais);
}
/* Find the Nth item from the array */
AIInfoList::iterator it = this->info_single_list.begin();
for (; pos > 0; pos--) it++;
AIInfoList::iterator first_it = it;
while (!it->second->UseAsRandomAI()) it++;
for (; pos > 0; pos--) {
it++;
while (!it->second->UseAsRandomAI()) it++;
}
return (*it).second;
}

View File

@@ -8,12 +8,21 @@
#include "../../company_func.h"
#include "../../command_type.h"
#include "../../town.h"
#include "../../economy_func.h"
/* static */ bool AIAirport::IsValidAirportType(AirportType type)
{
return type >= AT_SMALL && type <= AT_HELISTATION && HasBit(::GetValidAirports(), type);
}
/* static */ Money AIAirport::GetPrice(AirportType type)
{
if (!IsValidAirportType(type)) return -1;
const AirportFTAClass *afc = ::GetAirport(type);
return _price.build_airport * afc->size_x * afc->size_y;
}
/* static */ bool AIAirport::IsHangarTile(TileIndex tile)
{
if (!::IsValidTile(tile)) return false;

View File

@@ -53,6 +53,13 @@ public:
*/
static bool IsValidAirportType(AirportType type);
/**
* Get the cost to build this AirportType.
* @param type The AirportType to check.
* @return The cost of building this AirportType.
*/
static Money GetPrice(AirportType type);
/**
* Checks whether the given tile is actually a tile with a hangar.
* @param tile The tile to check.

View File

@@ -39,6 +39,7 @@ void SQAIAirport_Register(Squirrel *engine) {
SQAIAirport.DefSQConst(engine, AIAirport::PT_INVALID, "PT_INVALID");
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");

View File

@@ -23,6 +23,12 @@
return ::IsBridgeTile(tile);
}
/* static */ BridgeID AIBridge::GetBridgeID(TileIndex tile)
{
if (!IsBridgeTile(tile)) return (BridgeID)-1;
return (BridgeID)::GetBridgeType(tile);
}
static void _DoCommandReturnBuildBridge2(class AIInstance *instance)
{
if (!AIBridge::_BuildBridgeRoad2()) {

View File

@@ -51,6 +51,14 @@ public:
*/
static bool IsBridgeTile(TileIndex tile);
/**
* Get the BridgeID of a bridge at a given tile.
* @param tile The tile to get the BridgeID from.
* @pre IsBridgeTile(tile).
* @return The BridgeID from the bridge at tile 'tile'.
*/
static BridgeID GetBridgeID(TileIndex tile);
/**
* Get the name of a bridge.
* @param bridge_id The bridge to get the name of.

View File

@@ -36,6 +36,7 @@ void SQAIBridge_Register(Squirrel *engine) {
SQAIBridge.DefSQStaticMethod(engine, &AIBridge::IsValidBridge, "IsValidBridge", 2, ".i");
SQAIBridge.DefSQStaticMethod(engine, &AIBridge::IsBridgeTile, "IsBridgeTile", 2, ".i");
SQAIBridge.DefSQStaticMethod(engine, &AIBridge::GetBridgeID, "GetBridgeID", 2, ".i");
SQAIBridge.DefSQStaticMethod(engine, &AIBridge::GetName, "GetName", 2, ".i");
SQAIBridge.DefSQStaticMethod(engine, &AIBridge::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
SQAIBridge.DefSQStaticMethod(engine, &AIBridge::GetPrice, "GetPrice", 3, ".ii");

View File

@@ -18,7 +18,7 @@ public:
* The classes of cargo (from newgrf_cargo.h).
*/
enum CargoClass {
CC_PASSENGERS = 1 << 0, //!< Passengers
CC_PASSENGERS = 1 << 0, //!< Passengers. Cargos of this class appear at bus stops. Cargos not of this class appear at truck stops.
CC_MAIL = 1 << 1, //!< Mail
CC_EXPRESS = 1 << 2, //!< Express cargo (Goods, Food, Candy, but also possible for passengers)
CC_ARMOURED = 1 << 3, //!< Armoured cargo (Valuables, Gold, Diamonds)
@@ -52,6 +52,7 @@ public:
/**
* Gets the string representation of the cargo label.
* @param cargo_type The cargo to get the string representation of.
* @pre AICargo::IsValidCargo(cargo_type).
* @return The cargo label.
* @note Never use this to check if it is a certain cargo. NewGRF can
* redefine all of the names.
@@ -60,7 +61,10 @@ public:
/**
* Checks whether the give cargo is a freight or not.
* This defines whether the "freight train weight multiplier" will apply to
* trains transporting this cargo.
* @param cargo_type The cargo to check on.
* @pre AICargo::IsValidCargo(cargo_type).
* @return True if and only if the cargo is freight.
*/
static bool IsFreight(CargoID cargo_type);
@@ -68,6 +72,7 @@ public:
/**
* Check if this cargo is in the requested cargo class.
* @param cargo_type The cargo to check on.
* @pre AICargo::IsValidCargo(cargo_type).
* @param cargo_class The class to check for.
* @return True if and only if the cargo is in the cargo class.
*/
@@ -76,6 +81,7 @@ public:
/**
* Get the effect this cargo has on a town.
* @param cargo_type The cargo to check on.
* @pre AICargo::IsValidCargo(cargo_type).
* @return The effect this cargo has on a town, or TE_NONE if it has no effect.
*/
static TownEffect GetTownEffect(CargoID cargo_type);
@@ -84,6 +90,7 @@ public:
* Get the income for transporting a piece of cargo over the
* given distance within the specified time.
* @param cargo_type The cargo to transport.
* @pre AICargo::IsValidCargo(cargo_type).
* @param distance The distance the cargo travels from begin to end.
* @param days_in_transit Amount of (game) days the cargo is in transit. The max value of this variable is 637. Any value higher returns the same as 637 would.
* @return The amount of money that would be earned by this trip.

View File

@@ -153,7 +153,8 @@ public:
* Return the location of a company's HQ.
* @param company The company the get the HQ of.
* @pre ResolveCompanyID(company) != COMPANY_INVALID.
* @return The tile of the company's HQ, this tile is the most nothern tile of that HQ, or TILE_INVALID if there is no HQ yet.
* @return The tile of the company's HQ, this tile is the most nothern tile
* of that HQ, or AIMap::TILE_INVALID if there is no HQ yet.
*/
static TileIndex GetCompanyHQ(CompanyID company);

View File

@@ -5,6 +5,7 @@
#include "../../stdafx.h"
#include "../../string_func.h"
#include "../../company_base.h"
#include "../../rev.h"
#include "table/strings.h"
#include "../ai.hpp"
@@ -66,6 +67,11 @@ AIController::~AIController()
return AIConfig::GetConfig(_current_company)->GetSetting(name);
}
/* static */ uint AIController::GetVersion()
{
return _openttd_newgrf_version;
}
bool AIController::LoadedLibrary(const char *library_name, int *next_number, char *fake_class_name, int fake_class_name_len)
{
LoadedLibraryList::iterator iter = this->loaded_library.find(library_name);

View File

@@ -50,6 +50,18 @@ public:
*/
static int GetSetting(const char *name);
/**
* Get the OpenTTD version of this executable. The version is formatted
* with the bits having the following meaning:
* 28-31 major version
* 24-27 minor version
* 20-23 build
* 19 1 if it is a release, 0 if it is not.
* 0-18 revision number; 0 when the revision is unknown.
* @return The version in newgrf format.
*/
static uint GetVersion();
/**
* Change the minimum amount of time the AI should be put in suspend mode
* when you execute a command. Normally in SP this is 1, and in MP it is

View File

@@ -5,10 +5,11 @@
void SQAIController_Register(Squirrel *engine) {
DefSQClass <AIController> SQAIController("AIController");
SQAIController.PreRegister(engine);
SQAIController.DefSQStaticMethod(engine, &AIController::GetTick, "GetTick", 1, "?");
SQAIController.DefSQStaticMethod(engine, &AIController::SetCommandDelay, "SetCommandDelay", 2, "?i");
SQAIController.DefSQStaticMethod(engine, &AIController::Sleep, "Sleep", 2, "?i");
SQAIController.DefSQStaticMethod(engine, &AIController::GetSetting, "GetSetting", 2, "?s");
SQAIController.DefSQStaticMethod(engine, &AIController::Print, "Print", 3, "?bs");
SQAIController.DefSQStaticMethod(engine, &AIController::GetTick, "GetTick", 1, ".");
SQAIController.DefSQStaticMethod(engine, &AIController::SetCommandDelay, "SetCommandDelay", 2, ".i");
SQAIController.DefSQStaticMethod(engine, &AIController::Sleep, "Sleep", 2, ".i");
SQAIController.DefSQStaticMethod(engine, &AIController::GetSetting, "GetSetting", 2, ".s");
SQAIController.DefSQStaticMethod(engine, &AIController::GetVersion, "GetVersion", 1, ".");
SQAIController.DefSQStaticMethod(engine, &AIController::Print, "Print", 3, ".bs");
SQAIController.PostRegister(engine);
}

View File

@@ -6,9 +6,10 @@
#include "ai_cargo.hpp"
#include "../../company_func.h"
#include "../../strings_func.h"
#include "../../aircraft.h"
#include "../../vehicle_func.h"
#include "../../settings_type.h"
#include "../../rail.h"
#include "../../engine_base.h"
#include "../../articulated_vehicles.h"
#include "table/strings.h"
@@ -77,11 +78,8 @@
} break;
case VEH_SHIP:
return e->u.ship.capacity;
break;
case VEH_AIRCRAFT:
return AircraftDefaultCargoCapacity(e->GetDefaultCargoType(), &e->u.air);
return e->GetDisplayDefaultCapacity();
break;
default: NOT_REACHED();

View File

@@ -3,9 +3,11 @@
/** @file ai_event_types.cpp Implementation of all EventTypes. */
#include "ai_event_types.hpp"
#include "../../command_type.h"
#include "../../strings_func.h"
#include "../../settings_type.h"
#include "../../aircraft.h"
#include "../../rail.h"
#include "../../engine_base.h"
#include "../../articulated_vehicles.h"
#include "table/strings.h"
@@ -41,11 +43,8 @@ int32 AIEventEnginePreview::GetCapacity()
} break;
case VEH_SHIP:
return e->u.ship.capacity;
break;
case VEH_AIRCRAFT:
return AircraftDefaultCargoCapacity(e->GetDefaultCargoType(), &e->u.air);
return e->GetDisplayDefaultCapacity();
break;
default: NOT_REACHED();

View File

@@ -86,7 +86,9 @@ public:
static TileIndex GetLocation(IndustryID industry_id);
/**
* Get the number of stations around an industry.
* Get the number of stations around an industry. All stations that can
* service the industry are counted, your own stations but also your
* opponents stations.
* @param industry_id The index of the industry.
* @pre IsValidIndustry(industry_id).
* @return The number of stations around an industry.

View File

@@ -111,3 +111,24 @@
uint32 seed = ::InteractiveRandom();
return AIObject::DoCommand(0, industry_type, seed, CMD_BUILD_INDUSTRY);
}
/* static */ bool AIIndustryType::IsBuiltOnWater(IndustryType industry_type)
{
if (!IsValidIndustryType(industry_type)) return false;
return (::GetIndustrySpec(industry_type)->behaviour & INDUSTRYBEH_BUILT_ONWATER) != 0;
}
/* static */ bool AIIndustryType::HasHeliport(IndustryType industry_type)
{
if (!IsValidIndustryType(industry_type)) return false;
return (::GetIndustrySpec(industry_type)->behaviour & INDUSTRYBEH_AI_AIRSHIP_ROUTES) != 0;
}
/* static */ bool AIIndustryType::HasDock(IndustryType industry_type)
{
if (!IsValidIndustryType(industry_type)) return false;
return (::GetIndustrySpec(industry_type)->behaviour & INDUSTRYBEH_AI_AIRSHIP_ROUTES) != 0;
}

View File

@@ -113,6 +113,30 @@ public:
* @note If true is returned the money is paid, whether a new industry was build or not.
*/
static bool ProspectIndustry(IndustryType industry_type);
/**
* Is this type of industry built on water.
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return True when this type is built on water.
*/
static bool IsBuiltOnWater(IndustryType industry_type);
/**
* Does this type of industry have a heliport?
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return True when this type has a heliport.
*/
static bool HasHeliport(IndustryType industry_type);
/**
* Does this type of industry have a dock?
* @param industry_type The type of the industry.
* @pre IsValidIndustryType(industry_type).
* @return True when this type has a dock.
*/
static bool HasDock(IndustryType industry_type);
};
#endif /* AI_INDUSTRYTYPE_HPP */

View File

@@ -28,6 +28,9 @@ void SQAIIndustryType_Register(Squirrel *engine) {
SQAIIndustryType.DefSQStaticMethod(engine, &AIIndustryType::CanProspectIndustry, "CanProspectIndustry", 2, ".i");
SQAIIndustryType.DefSQStaticMethod(engine, &AIIndustryType::BuildIndustry, "BuildIndustry", 3, ".ii");
SQAIIndustryType.DefSQStaticMethod(engine, &AIIndustryType::ProspectIndustry, "ProspectIndustry", 2, ".i");
SQAIIndustryType.DefSQStaticMethod(engine, &AIIndustryType::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i");
SQAIIndustryType.DefSQStaticMethod(engine, &AIIndustryType::HasHeliport, "HasHeliport", 2, ".i");
SQAIIndustryType.DefSQStaticMethod(engine, &AIIndustryType::HasDock, "HasDock", 2, ".i");
SQAIIndustryType.PostRegister(engine);
}

View File

@@ -32,7 +32,7 @@
log->lines = CallocT<char *>(80);
log->type = CallocT<AILog::AILogType>(80);
log->count = 80;
log->pos = log->count;
log->pos = log->count - 1;
log->used = 0;
}
LogData *log = (LogData *)AIObject::GetLogPointer();

View File

@@ -17,6 +17,9 @@ public:
TILE_INVALID = INVALID_TILE, //!< Invalid TileIndex.
};
#endif /* DEFINE_SCRIPT_FILES */
#ifdef DOXYGEN_SKIP
const static TileIndex TILE_INVALID; //!< Invalid TileIndex.
#endif /* DOXYGEN_SKIP */
static const char *GetClassName() { return "AIMap"; }

View File

@@ -23,7 +23,10 @@ static OrderType GetOrderTypeByTile(TileIndex t)
switch (::GetTileType(t)) {
default: break;
case MP_STATION: return OT_GOTO_STATION; break;
case MP_STATION:
if (IsHangar(t)) return OT_GOTO_DEPOT;
return OT_GOTO_STATION;
break;
case MP_WATER: if (::IsShipDepot(t)) return OT_GOTO_DEPOT; break;
case MP_ROAD: if (::GetRoadTileType(t) == ROAD_TILE_DEPOT) return OT_GOTO_DEPOT; break;
case MP_RAILWAY:
@@ -43,6 +46,47 @@ static OrderType GetOrderTypeByTile(TileIndex t)
return AIVehicle::IsValidVehicle(vehicle_id) && order_position >= 0 && (order_position < ::GetVehicle(vehicle_id)->GetNumOrders() || order_position == ORDER_CURRENT);
}
/**
* Get the current order the vehicle is executing. If the current order is in
* the order list, return the order from the orderlist. If the current order
* was a manual order, return the current order.
*/
static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition order_position)
{
const Vehicle *v = ::GetVehicle(vehicle_id);
if (order_position == AIOrder::ORDER_CURRENT) {
const Order *order = &v->current_order;
if (order->GetType() == OT_GOTO_DEPOT && !(order->GetDepotOrderType() & ODTFB_PART_OF_ORDERS)) return order;
order_position = AIOrder::ResolveOrderPosition(vehicle_id, order_position);
if (order_position == AIOrder::ORDER_INVALID) return NULL;
}
return ::GetVehicleOrder(v, order_position);
}
/* static */ bool AIOrder::IsGotoStationOrder(VehicleID vehicle_id, OrderPosition order_position)
{
if (!IsValidVehicleOrder(vehicle_id, order_position)) return false;
const Order *order = ::ResolveOrder(vehicle_id, order_position);
return order != NULL && order->GetType() == OT_GOTO_STATION;
}
/* static */ bool AIOrder::IsGotoDepotOrder(VehicleID vehicle_id, OrderPosition order_position)
{
if (!IsValidVehicleOrder(vehicle_id, order_position)) return false;
const Order *order = ::ResolveOrder(vehicle_id, order_position);
return order != NULL && order->GetType() == OT_GOTO_DEPOT;
}
/* static */ bool AIOrder::IsGotoWaypointOrder(VehicleID vehicle_id, OrderPosition order_position)
{
if (!IsValidVehicleOrder(vehicle_id, order_position)) return false;
const Order *order = ::ResolveOrder(vehicle_id, order_position);
return order != NULL && order->GetType() == OT_GOTO_WAYPOINT;
}
/* static */ bool AIOrder::IsConditionalOrder(VehicleID vehicle_id, OrderPosition order_position)
{
if (order_position == ORDER_CURRENT) return false;
@@ -52,6 +96,16 @@ static OrderType GetOrderTypeByTile(TileIndex t)
return order->GetType() == OT_CONDITIONAL;
}
/* static */ bool AIOrder::IsCurrentOrderPartOfOrderList(VehicleID vehicle_id)
{
if (AIVehicle::IsValidVehicle(vehicle_id)) return false;
if (GetOrderCount(vehicle_id) == 0) return false;
const Order *order = &::GetVehicle(vehicle_id)->current_order;
if (order->GetType() != OT_GOTO_DEPOT) return true;
return (order->GetDepotOrderType() & ODTFB_PART_OF_ORDERS) != 0;
}
/* static */ AIOrder::OrderPosition AIOrder::ResolveOrderPosition(VehicleID vehicle_id, OrderPosition order_position)
{
if (!AIVehicle::IsValidVehicle(vehicle_id)) return ORDER_INVALID;
@@ -74,7 +128,10 @@ static OrderType GetOrderTypeByTile(TileIndex t)
(((order_flags & AIOF_NO_UNLOAD) == 0) || ((order_flags & AIOF_NO_LOAD) == 0)) &&
(((order_flags & AIOF_FULL_LOAD_ANY) == 0) || ((order_flags & AIOF_NO_LOAD) == 0));
case OT_GOTO_DEPOT: return (order_flags & ~(AIOF_NON_STOP_FLAGS | AIOF_SERVICE_IF_NEEDED)) == 0;
case OT_GOTO_DEPOT:
return ((order_flags & ~(AIOF_NON_STOP_FLAGS | AIOF_DEPOT_FLAGS)) == 0) &&
(((order_flags & AIOF_SERVICE_IF_NEEDED) == 0) || ((order_flags & AIOF_STOP_IN_DEPOT) == 0));
case OT_GOTO_WAYPOINT: return (order_flags & ~(AIOF_NON_STOP_FLAGS)) == 0;
default: return false;
}
@@ -108,21 +165,41 @@ static OrderType GetOrderTypeByTile(TileIndex t)
{
if (!IsValidVehicleOrder(vehicle_id, order_position)) return INVALID_TILE;
const Order *order;
const Order *order = ::ResolveOrder(vehicle_id, order_position);
if (order == NULL || order->GetType() == OT_CONDITIONAL) return INVALID_TILE;
const Vehicle *v = ::GetVehicle(vehicle_id);
if (order_position == ORDER_CURRENT) {
order = &v->current_order;
} else {
order = ::GetVehicleOrder(GetVehicle(vehicle_id), order_position);
if (order->GetType() == OT_CONDITIONAL) return INVALID_TILE;
}
switch (order->GetType()) {
case OT_GOTO_DEPOT:
case OT_GOTO_DEPOT: {
if (v->type != VEH_AIRCRAFT) return ::GetDepot(order->GetDestination())->xy;
/* FALL THROUGH: aircraft's hangars are referenced by StationID, not DepotID */
/* Aircraft's hangars are referenced by StationID, not DepotID */
const Station *st = ::GetStation(order->GetDestination());
const AirportFTAClass *airport = st->Airport();
if (airport == NULL || airport->nof_depots == 0) return INVALID_TILE;
return st->airport_tile + ::ToTileIndexDiff(st->Airport()->airport_depots[0]);
}
case OT_GOTO_STATION: return ::GetStation(order->GetDestination())->xy;
case OT_GOTO_STATION: {
const Station *st = ::GetStation(order->GetDestination());
if (st->train_tile != INVALID_TILE) {
for (uint i = 0; i < st->trainst_w; i++) {
TileIndex t = st->train_tile + TileDiffXY(i, 0);
if (st->TileBelongsToRailStation(t)) return t;
}
} else if (st->dock_tile != INVALID_TILE) {
return st->dock_tile;
} else if (st->bus_stops != NULL) {
return st->bus_stops->xy;
} else if (st->truck_stops != NULL) {
return st->truck_stops->xy;
} else if (st->airport_tile != INVALID_TILE) {
const AirportFTAClass *fta = st->Airport();
BEGIN_TILE_LOOP(tile, fta->size_x, fta->size_y, st->airport_tile) {
if (!::IsHangar(tile)) return tile;
} END_TILE_LOOP(tile, fta->size_x, fta->size_y, st->airport_tile)
}
return INVALID_TILE;
}
case OT_GOTO_WAYPOINT: return ::GetWaypoint(order->GetDestination())->xy;
default: return INVALID_TILE;
}
@@ -132,19 +209,15 @@ static OrderType GetOrderTypeByTile(TileIndex t)
{
if (!IsValidVehicleOrder(vehicle_id, order_position)) return AIOF_INVALID;
const Order *order;
if (order_position == ORDER_CURRENT) {
order = &::GetVehicle(vehicle_id)->current_order;
} else {
order = ::GetVehicleOrder(GetVehicle(vehicle_id), order_position);
if (order->GetType() == OT_CONDITIONAL) return AIOF_INVALID;
}
const Order *order = ::ResolveOrder(vehicle_id, order_position);
if (order == NULL || order->GetType() == OT_CONDITIONAL) return AIOF_INVALID;
AIOrderFlags order_flags = AIOF_NONE;
order_flags |= (AIOrderFlags)order->GetNonStopType();
switch (order->GetType()) {
case OT_GOTO_DEPOT:
if (order->GetDepotOrderType() & ODTFB_SERVICE) order_flags |= AIOF_SERVICE_IF_NEEDED;
if (order->GetDepotActionType() & ODATFB_HALT) order_flags |= AIOF_STOP_IN_DEPOT;
break;
case OT_GOTO_STATION:
@@ -260,9 +333,21 @@ static OrderType GetOrderTypeByTile(TileIndex t)
Order order;
switch (::GetOrderTypeByTile(destination)) {
case OT_GOTO_DEPOT:
order.MakeGoToDepot(::GetDepotByTile(destination)->index, (OrderDepotTypeFlags)(ODTFB_PART_OF_ORDERS | ((order_flags & AIOF_SERVICE_IF_NEEDED) ? ODTFB_SERVICE : 0)));
case OT_GOTO_DEPOT: {
OrderDepotTypeFlags odtf = (OrderDepotTypeFlags)(ODTFB_PART_OF_ORDERS | ((order_flags & AIOF_SERVICE_IF_NEEDED) ? ODTFB_SERVICE : 0));
OrderDepotActionFlags odaf = (OrderDepotActionFlags)(ODATF_SERVICE_ONLY | ((order_flags & AIOF_STOP_IN_DEPOT) ? ODATFB_HALT : 0));
OrderNonStopFlags onsf = (OrderNonStopFlags)((order_flags & AIOF_NON_STOP_INTERMEDIATE) ? ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS : ONSF_STOP_EVERYWHERE);
/* Check explicitly if the order is to a station (for aircraft) or
* to a depot (other vehicle types). */
if (::GetVehicle(vehicle_id)->type == VEH_AIRCRAFT) {
if (!::IsTileType(destination, MP_STATION)) return false;
order.MakeGoToDepot(::GetStationIndex(destination), odtf, onsf, odaf);
} else {
if (::IsTileType(destination, MP_STATION)) return false;
order.MakeGoToDepot(::GetDepotByTile(destination)->index, odtf, onsf, odaf);
}
break;
}
case OT_GOTO_STATION:
order.MakeGoToStation(::GetStationIndex(destination));
@@ -356,8 +441,11 @@ static void _DoCommandReturnSetOrderFlags(class AIInstance *instance)
switch (order->GetType()) {
case OT_GOTO_DEPOT:
if ((current & AIOF_SERVICE_IF_NEEDED) != (order_flags & AIOF_SERVICE_IF_NEEDED)) {
return AIObject::DoCommand(0, vehicle_id | (order_position << 16), MOF_DEPOT_ACTION, CMD_MODIFY_ORDER, NULL, &_DoCommandReturnSetOrderFlags);
if ((current & AIOF_DEPOT_FLAGS) != (order_flags & AIOF_DEPOT_FLAGS)) {
uint data = DA_ALWAYS_GO;
if (order_flags & AIOF_SERVICE_IF_NEEDED) data = DA_SERVICE;
if (order_flags & AIOF_STOP_IN_DEPOT) data = DA_STOP;
return AIObject::DoCommand(0, vehicle_id | (order_position << 16), (data << 4) | MOF_DEPOT_ACTION, CMD_MODIFY_ORDER, NULL, &_DoCommandReturnSetOrderFlags);
}
break;

View File

@@ -57,6 +57,8 @@ public:
/** Service the vehicle when needed, otherwise skip this order; only for depots. */
AIOF_SERVICE_IF_NEEDED = 1 << 2,
/** Stop in the depot instead of only go there for servicing; only for depots. */
AIOF_STOP_IN_DEPOT = 1 << 3,
/** All flags related to non-stop settings. */
AIOF_NON_STOP_FLAGS = AIOF_NON_STOP_INTERMEDIATE | AIOF_NON_STOP_DESTINATION,
@@ -64,6 +66,8 @@ public:
AIOF_UNLOAD_FLAGS = AIOF_TRANSFER | AIOF_UNLOAD | AIOF_NO_UNLOAD,
/** All flags related to loading. */
AIOF_LOAD_FLAGS = AIOF_FULL_LOAD | AIOF_FULL_LOAD_ANY | AIOF_NO_LOAD,
/** All flags related to depots. */
AIOF_DEPOT_FLAGS = AIOF_SERVICE_IF_NEEDED | AIOF_STOP_IN_DEPOT,
/** For marking invalid order flags */
AIOF_INVALID = 0xFFFF,
@@ -114,6 +118,33 @@ public:
*/
static bool IsValidVehicleOrder(VehicleID vehicle_id, OrderPosition order_position);
/**
* Checks whether the given order is a goto-station order.
* @param vehicle_id The vehicle to check.
* @param order_position The order index to check.
* @pre IsValidVehicleOrder(vehicle_id, order_position).
* @return True if and only if the order is a goto-station order.
*/
static bool IsGotoStationOrder(VehicleID vehicle_id, OrderPosition order_position);
/**
* Checks whether the given order is a goto-depot order.
* @param vehicle_id The vehicle to check.
* @param order_position The order index to check.
* @pre IsValidVehicleOrder(vehicle_id, order_position).
* @return True if and only if the order is a goto-depot order.
*/
static bool IsGotoDepotOrder(VehicleID vehicle_id, OrderPosition order_position);
/**
* Checks whether the given order is a goto-waypoint order.
* @param vehicle_id The vehicle to check.
* @param order_position The order index to check.
* @pre IsValidVehicleOrder(vehicle_id, order_position).
* @return True if and only if the order is a goto-waypoint order.
*/
static bool IsGotoWaypointOrder(VehicleID vehicle_id, OrderPosition order_position);
/**
* Checks whether the given order is a conditional order.
* @param vehicle_id The vehicle to check.
@@ -123,6 +154,17 @@ public:
*/
static bool IsConditionalOrder(VehicleID vehicle_id, OrderPosition order_position);
/**
* Checks whether the current order is part of the orderlist.
* @param vehicle_id The vehicle to check.
* @pre AIVehicle::IsValidVehicle(vehicle_id).
* @return True if and only if the current order is part of the order list.
* @note If the order is a non-'non-stop' order, and the vehicle is currently
* (un)loading at a station that is not the final destination, this function
* will still return true.
*/
static bool IsCurrentOrderPartOfOrderList(VehicleID vehicle_id);
/**
* Resolves the given order index to the correct index for the given vehicle.
* If the order index was ORDER_CURRENT it will be resolved to the index of

View File

@@ -42,9 +42,11 @@ void SQAIOrder_Register(Squirrel *engine) {
SQAIOrder.DefSQConst(engine, AIOrder::AIOF_FULL_LOAD_ANY, "AIOF_FULL_LOAD_ANY");
SQAIOrder.DefSQConst(engine, AIOrder::AIOF_NO_LOAD, "AIOF_NO_LOAD");
SQAIOrder.DefSQConst(engine, AIOrder::AIOF_SERVICE_IF_NEEDED, "AIOF_SERVICE_IF_NEEDED");
SQAIOrder.DefSQConst(engine, AIOrder::AIOF_STOP_IN_DEPOT, "AIOF_STOP_IN_DEPOT");
SQAIOrder.DefSQConst(engine, AIOrder::AIOF_NON_STOP_FLAGS, "AIOF_NON_STOP_FLAGS");
SQAIOrder.DefSQConst(engine, AIOrder::AIOF_UNLOAD_FLAGS, "AIOF_UNLOAD_FLAGS");
SQAIOrder.DefSQConst(engine, AIOrder::AIOF_LOAD_FLAGS, "AIOF_LOAD_FLAGS");
SQAIOrder.DefSQConst(engine, AIOrder::AIOF_DEPOT_FLAGS, "AIOF_DEPOT_FLAGS");
SQAIOrder.DefSQConst(engine, AIOrder::AIOF_INVALID, "AIOF_INVALID");
SQAIOrder.DefSQConst(engine, AIOrder::OC_LOAD_PERCENTAGE, "OC_LOAD_PERCENTAGE");
SQAIOrder.DefSQConst(engine, AIOrder::OC_RELIABILITY, "OC_RELIABILITY");
@@ -71,34 +73,38 @@ void SQAIOrder_Register(Squirrel *engine) {
AIError::RegisterErrorMapString(AIOrder::ERR_ORDER_TOO_MANY, "ERR_ORDER_TOO_MANY");
AIError::RegisterErrorMapString(AIOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION, "ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::IsValidVehicleOrder, "IsValidVehicleOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::IsConditionalOrder, "IsConditionalOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::ResolveOrderPosition, "ResolveOrderPosition", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::AreOrderFlagsValid, "AreOrderFlagsValid", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::IsValidConditionalOrder, "IsValidConditionalOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderCount, "GetOrderCount", 2, ".i");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderDestination, "GetOrderDestination", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderFlags, "GetOrderFlags", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderJumpTo, "GetOrderJumpTo", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderCondition, "GetOrderCondition", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderCompareFunction, "GetOrderCompareFunction", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderCompareValue, "GetOrderCompareValue", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SetOrderJumpTo, "SetOrderJumpTo", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SetOrderCondition, "SetOrderCondition", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SetOrderCompareFunction, "SetOrderCompareFunction", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SetOrderCompareValue, "SetOrderCompareValue", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::AppendOrder, "AppendOrder", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::AppendConditionalOrder, "AppendConditionalOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::InsertOrder, "InsertOrder", 5, ".iiii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::InsertConditionalOrder, "InsertConditionalOrder", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::RemoveOrder, "RemoveOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SetOrderFlags, "SetOrderFlags", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::ChangeOrder, "ChangeOrder", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::MoveOrder, "MoveOrder", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SkipToOrder, "SkipToOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::CopyOrders, "CopyOrders", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::ShareOrders, "ShareOrders", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::UnshareOrders, "UnshareOrders", 2, ".i");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::IsValidVehicleOrder, "IsValidVehicleOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::IsGotoStationOrder, "IsGotoStationOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::IsGotoDepotOrder, "IsGotoDepotOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::IsGotoWaypointOrder, "IsGotoWaypointOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::IsConditionalOrder, "IsConditionalOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::IsCurrentOrderPartOfOrderList, "IsCurrentOrderPartOfOrderList", 2, ".i");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::ResolveOrderPosition, "ResolveOrderPosition", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::AreOrderFlagsValid, "AreOrderFlagsValid", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::IsValidConditionalOrder, "IsValidConditionalOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderCount, "GetOrderCount", 2, ".i");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderDestination, "GetOrderDestination", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderFlags, "GetOrderFlags", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderJumpTo, "GetOrderJumpTo", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderCondition, "GetOrderCondition", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderCompareFunction, "GetOrderCompareFunction", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::GetOrderCompareValue, "GetOrderCompareValue", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SetOrderJumpTo, "SetOrderJumpTo", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SetOrderCondition, "SetOrderCondition", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SetOrderCompareFunction, "SetOrderCompareFunction", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SetOrderCompareValue, "SetOrderCompareValue", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::AppendOrder, "AppendOrder", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::AppendConditionalOrder, "AppendConditionalOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::InsertOrder, "InsertOrder", 5, ".iiii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::InsertConditionalOrder, "InsertConditionalOrder", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::RemoveOrder, "RemoveOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SetOrderFlags, "SetOrderFlags", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::ChangeOrder, "ChangeOrder", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::MoveOrder, "MoveOrder", 4, ".iii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::SkipToOrder, "SkipToOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::CopyOrders, "CopyOrders", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::ShareOrders, "ShareOrders", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &AIOrder::UnshareOrders, "UnshareOrders", 2, ".i");
SQAIOrder.PostRegister(engine);
}

View File

@@ -203,6 +203,7 @@
if (IsRailWaypointTile(tile)) return ::GetRailWaypointBits(tile);
if (IsRailStationTile(tile)) return ::TrackToTrackBits(::GetRailStationTrack(tile));
if (IsLevelCrossingTile(tile)) return ::GetCrossingRailBits(tile);
if (IsRailDepotTile(tile)) return ::TRACK_BIT_NONE;
return ::GetTrackBits(tile);
}

View File

@@ -293,6 +293,7 @@ public:
/**
* Get all RailTracks on the given tile.
* @note A depot has no railtracks.
* @param tile The tile to check.
* @pre IsRailTile(tile).
* @return A bitmask of RailTrack with all RailTracks on the tile.

View File

@@ -5,12 +5,18 @@
#include "ai_road.hpp"
#include "ai_map.hpp"
#include "ai_station.hpp"
#include "ai_cargo.hpp"
#include "../../station_map.h"
#include "../../command_type.h"
#include "../../settings_type.h"
#include "../../company_func.h"
#include "../../script/squirrel_helper_type.hpp"
/* static */ AIRoad::RoadVehicleType AIRoad::GetRoadVehicleTypeForCargo(CargoID cargo_type)
{
return AICargo::HasCargoClass(cargo_type, AICargo::CC_PASSENGERS) ? ROADVEHTYPE_BUS : ROADVEHTYPE_TRUCK;
}
/* static */ bool AIRoad::IsRoadTile(TileIndex tile)
{
if (!::IsValidTile(tile)) return false;

View File

@@ -56,6 +56,14 @@ public:
ROADVEHTYPE_TRUCK, //!< Build objects useable for trucks and cargo trams
};
/**
* Determines whether a busstop or a truckstop is needed to transport a certain cargo.
* @param cargo_type The cargo to test.
* @pre AICargo::IsValidCargo(cargo_type).
* @return The road vehicle type needed to transport the cargo.
*/
static RoadVehicleType GetRoadVehicleTypeForCargo(CargoID cargo_type);
/**
* Checks whether the given tile is actually a tile with road that can be
* used to traverse a tile. This excludes road depots and 'normal' road

View File

@@ -46,6 +46,7 @@ void SQAIRoad_Register(Squirrel *engine) {
AIError::RegisterErrorMapString(AIRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD");
AIError::RegisterErrorMapString(AIRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS");
SQAIRoad.DefSQStaticMethod(engine, &AIRoad::GetRoadVehicleTypeForCargo, "GetRoadVehicleTypeForCargo", 2, ".i");
SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsRoadTile, "IsRoadTile", 2, ".i");
SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsRoadDepotTile, "IsRoadDepotTile", 2, ".i");
SQAIRoad.DefSQStaticMethod(engine, &AIRoad::IsRoadStationTile, "IsRoadStationTile", 2, ".i");

View File

@@ -11,6 +11,7 @@
#include "../../water_map.h"
#include "../../clear_map.h"
#include "../../town.h"
#include "../../landscape.h"
/* static */ bool AITile::IsBuildable(TileIndex tile)
{
@@ -72,14 +73,14 @@
/* static */ bool AITile::IsSteepSlope(Slope slope)
{
if (slope == SLOPE_INVALID) return false;
if ((slope & ~(SLOPE_ELEVATED | SLOPE_STEEP | SLOPE_HALFTILE_MASK)) != 0) return false;
return ::IsSteepSlope((::Slope)slope);
}
/* static */ bool AITile::IsHalftileSlope(Slope slope)
{
if (slope == SLOPE_INVALID) return false;
if ((slope & ~(SLOPE_ELEVATED | SLOPE_STEEP | SLOPE_HALFTILE_MASK)) != 0) return false;
return ::IsHalftileSlope((::Slope)slope);
}
@@ -123,20 +124,41 @@
/* static */ AITile::Slope AITile::GetComplementSlope(Slope slope)
{
if (slope == SLOPE_INVALID) return SLOPE_INVALID;
if (IsSteepSlope(slope)) return SLOPE_INVALID;
if (IsHalftileSlope(slope)) return SLOPE_INVALID;
if ((slope & ~SLOPE_ELEVATED) != 0) return SLOPE_INVALID;
return (Slope)::ComplementSlope((::Slope)slope);
}
/* static */ int32 AITile::GetHeight(TileIndex tile)
{
if (!::IsValidTile(tile)) return false;
if (!::IsValidTile(tile)) return -1;
return ::TileHeight(tile);
}
/* static */ int32 AITile::GetMinHeight(TileIndex tile)
{
if (!::IsValidTile(tile)) return -1;
return ::GetTileZ(tile) / ::TILE_HEIGHT;
}
/* static */ int32 AITile::GetMaxHeight(TileIndex tile)
{
if (!::IsValidTile(tile)) return -1;
return ::GetTileMaxZ(tile) / ::TILE_HEIGHT;
}
/* static */ int32 AITile::GetCornerHeight(TileIndex tile, Corner corner)
{
if (!::IsValidTile(tile) || !::IsValidCorner((::Corner)corner)) return -1;
uint z;
::Slope slope = ::GetTileSlope(tile, &z);
return (z + ::GetSlopeZInCorner(slope, (::Corner)corner)) / ::TILE_HEIGHT;
}
/* static */ AICompany::CompanyID AITile::GetOwner(TileIndex tile)
{
if (!::IsValidTile(tile)) return AICompany::COMPANY_INVALID;

View File

@@ -29,10 +29,28 @@ public:
/** Tile can't be lowered any lower */
ERR_TILE_TOO_LOW, // [STR_1003_ALREADY_AT_SEA_LEVEL]
/** The area was already flat */
ERR_AREA_ALREADY_FLAT, // [STR_ALREADY_LEVELLED]
/** There is a tunnel underneed */
ERR_EXCAVATION_WOULD_DAMAGE, // [STR_1002_EXCAVATION_WOULD_DAMAGE]
};
/**
* Enumeration for the slope-type (from slopes.h).
* Enumeration for corners of tiles.
*/
enum Corner {
CORNER_W = 0, //!< West corner
CORNER_S = 1, //!< South corner
CORNER_E = 2, //!< East corner
CORNER_N = 3, //!< North corner
CORNER_INVALID = 0xFF,
};
/**
* Enumeration for the slope-type.
*
* This enumeration use the chars N, E, S, W corresponding the
* direction North, East, South and West. The top corner of a tile
@@ -41,18 +59,18 @@ public:
enum Slope {
/* Values are important, as they represent the internal state of the game. */
SLOPE_FLAT = 0x00, //!< A flat tile
SLOPE_W = 0x01, //!< The west corner of the tile is raised
SLOPE_S = 0x02, //!< The south corner of the tile is raised
SLOPE_E = 0x04, //!< The east corner of the tile is raised
SLOPE_N = 0x08, //!< The north corner of the tile is raised
SLOPE_STEEP = 0x10, //!< Indicates the slope is steep
SLOPE_W = 1 << CORNER_W, //!< The west corner of the tile is raised
SLOPE_S = 1 << CORNER_S, //!< The south corner of the tile is raised
SLOPE_E = 1 << CORNER_E, //!< The east corner of the tile is raised
SLOPE_N = 1 << CORNER_N, //!< The north corner of the tile is raised
SLOPE_STEEP = 0x10, //!< Indicates the slope is steep (The corner opposite of the not-raised corner is raised two times)
SLOPE_NW = SLOPE_N | SLOPE_W, //!< North and west corner are raised
SLOPE_SW = SLOPE_S | SLOPE_W, //!< South and west corner are raised
SLOPE_SE = SLOPE_S | SLOPE_E, //!< South and east corner are raised
SLOPE_NE = SLOPE_N | SLOPE_E, //!< North and east corner are raised
SLOPE_EW = SLOPE_E | SLOPE_W, //!< East and west corner are raised
SLOPE_NS = SLOPE_N | SLOPE_S, //!< North and south corner are raised
SLOPE_ELEVATED = SLOPE_N | SLOPE_E | SLOPE_S | SLOPE_W, //!< All corner are raised, similar to SLOPE_FLAT
SLOPE_ELEVATED = SLOPE_N | SLOPE_E | SLOPE_S | SLOPE_W, //!< Bit mask containing all 'simple' slopes. Does not appear as a slope.
SLOPE_NWS = SLOPE_N | SLOPE_W | SLOPE_S, //!< North, west and south corner are raised
SLOPE_WSE = SLOPE_W | SLOPE_S | SLOPE_E, //!< West, south and east corner are raised
SLOPE_SEN = SLOPE_S | SLOPE_E | SLOPE_N, //!< South, east and north corner are raised
@@ -62,7 +80,7 @@ public:
SLOPE_STEEP_E = SLOPE_STEEP | SLOPE_SEN, //!< A steep slope falling to west (from east)
SLOPE_STEEP_N = SLOPE_STEEP | SLOPE_ENW, //!< A steep slope falling to south (from north)
SLOPE_INVALID = 0xFF, //!< An invalid slope
SLOPE_INVALID = 0xFFFF, //!< An invalid slope
};
/**
@@ -129,6 +147,7 @@ public:
/**
* Check if a tile has a steep slope.
* Steep slopes are slopes with a height difference of 2 across one diagonal of the tile.
* @param slope The slope to check on.
* @pre slope != SLOPE_INVALID.
* @return True if the slope is a steep slope.
@@ -137,9 +156,11 @@ public:
/**
* Check if a tile has a halftile slope.
* Halftile slopes appear on top of halftile foundations. E.g. the slope you get when building a horizontal railtrack on the top of a SLOPE_N or SLOPE_STEEP_N.
* @param slope The slope to check on.
* @pre slope != SLOPE_INVALID.
* @return True if the slope is a halftile slope.
* @note Currently there is no API function that would return or accept a halftile slope.
*/
static bool IsHalftileSlope(Slope slope);
@@ -193,9 +214,10 @@ public:
/**
* Get the slope of a tile.
* This is the slope of the bare tile. A possible foundation on the tile does not influence this slope.
* @param tile The tile to check on.
* @pre AIMap::IsValidTile(tile).
* @return 0 means flat, others indicate internal state of slope.
* @return Bit mask encoding the slope. See #Slope for a description of the returned values.
*/
static Slope GetSlope(TileIndex tile);
@@ -211,13 +233,43 @@ public:
static Slope GetComplementSlope(Slope slope);
/**
* Get the height of the tile.
* Get the height of the north corner of a tile.
* The returned height is the height of the bare tile. A possible foundation on the tile does not influence this height.
* @deprecated This function is deprecated and might be removed in future versions of the API. Use GetMinHeight(), GetMaxHeight() or GetCornerHeight() instead.
* @param tile The tile to check on.
* @pre AIMap::IsValidTile(tile).
* @return The height of the tile, ranging from 0 to 15.
* @return The height of the north corner of the tile, ranging from 0 to 15.
*/
static int32 GetHeight(TileIndex tile);
/**
* Get the minimal height on a tile.
* The returned height is the height of the bare tile. A possible foundation on the tile does not influence this height.
* @param tile The tile to check on.
* @pre AIMap::IsValidTile(tile).
* @return The height of the lowest corner of the tile, ranging from 0 to 15.
*/
static int32 GetMinHeight(TileIndex tile);
/**
* Get the maximal height on a tile.
* The returned height is the height of the bare tile. A possible foundation on the tile does not influence this height.
* @param tile The tile to check on.
* @pre AIMap::IsValidTile(tile).
* @return The height of the highest corner of the tile, ranging from 0 to 15.
*/
static int32 GetMaxHeight(TileIndex tile);
/**
* Get the height of a certain corner of a tile.
* The returned height is the height of the bare tile. A possible foundation on the tile does not influence this height.
* @param tile The tile to check on.
* @param corner The corner to query.
* @pre AIMap::IsValidTile(tile).
* @return The height of the lowest corner of the tile, ranging from 0 to 15.
*/
static int32 GetCornerHeight(TileIndex tile, Corner corner);
/**
* Get the owner of the tile.
* @param tile The tile to get the owner from.
@@ -288,7 +340,10 @@ public:
/**
* Raise the given corners of the tile. The corners can be combined,
* for example: SLOPE_N | SLOPE_W (= SLOPE_NW)
* for example: SLOPE_N | SLOPE_W (= SLOPE_NW) will raise the west and the north corner.
* @note The corners will be modified in the order west (first), south, east, north (last).
* Changing one corner might cause another corner to be changed too. So modifiing
* multiple corners may result in changing some corners by multiple steps.
* @param tile The tile to raise.
* @param slope Corners to raise (SLOPE_xxx).
* @pre tile < AIMap::GetMapSize().
@@ -301,7 +356,10 @@ public:
/**
* Lower the given corners of the tile. The corners can be combined,
* for example: SLOPE_N | SLOPE_W (= SLOPE_NW)
* for example: SLOPE_N | SLOPE_W (= SLOPE_NW) will lower the west and the north corner.
* @note The corners will be modified in the order west (first), south, east, north (last).
* Changing one corner might cause another corner to be changed too. So modifiing
* multiple corners may result in changing some corners by multiple steps.
* @param tile The tile to lower.
* @param slope Corners to lower (SLOPE_xxx).
* @pre tile < AIMap::GetMapSize().

View File

@@ -7,6 +7,8 @@ namespace SQConvert {
/* Allow enums to be used as Squirrel parameters */
template <> AITile::ErrorMessages GetParam(ForceType<AITile::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AITile::ErrorMessages)tmp; }
template <> int Return<AITile::ErrorMessages>(HSQUIRRELVM vm, AITile::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> AITile::Corner GetParam(ForceType<AITile::Corner>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AITile::Corner)tmp; }
template <> int Return<AITile::Corner>(HSQUIRRELVM vm, AITile::Corner res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> AITile::Slope GetParam(ForceType<AITile::Slope>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AITile::Slope)tmp; }
template <> int Return<AITile::Slope>(HSQUIRRELVM vm, AITile::Slope res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> AITile::TransportType GetParam(ForceType<AITile::TransportType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AITile::TransportType)tmp; }
@@ -25,42 +27,53 @@ void SQAITile_Register(Squirrel *engine) {
SQAITile.PreRegister(engine);
SQAITile.AddConstructor<void (AITile::*)(), 1>(engine, "x");
SQAITile.DefSQConst(engine, AITile::ERR_TILE_BASE, "ERR_TILE_BASE");
SQAITile.DefSQConst(engine, AITile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH");
SQAITile.DefSQConst(engine, AITile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
SQAITile.DefSQConst(engine, AITile::SLOPE_FLAT, "SLOPE_FLAT");
SQAITile.DefSQConst(engine, AITile::SLOPE_W, "SLOPE_W");
SQAITile.DefSQConst(engine, AITile::SLOPE_S, "SLOPE_S");
SQAITile.DefSQConst(engine, AITile::SLOPE_E, "SLOPE_E");
SQAITile.DefSQConst(engine, AITile::SLOPE_N, "SLOPE_N");
SQAITile.DefSQConst(engine, AITile::SLOPE_STEEP, "SLOPE_STEEP");
SQAITile.DefSQConst(engine, AITile::SLOPE_NW, "SLOPE_NW");
SQAITile.DefSQConst(engine, AITile::SLOPE_SW, "SLOPE_SW");
SQAITile.DefSQConst(engine, AITile::SLOPE_SE, "SLOPE_SE");
SQAITile.DefSQConst(engine, AITile::SLOPE_NE, "SLOPE_NE");
SQAITile.DefSQConst(engine, AITile::SLOPE_EW, "SLOPE_EW");
SQAITile.DefSQConst(engine, AITile::SLOPE_NS, "SLOPE_NS");
SQAITile.DefSQConst(engine, AITile::SLOPE_ELEVATED, "SLOPE_ELEVATED");
SQAITile.DefSQConst(engine, AITile::SLOPE_NWS, "SLOPE_NWS");
SQAITile.DefSQConst(engine, AITile::SLOPE_WSE, "SLOPE_WSE");
SQAITile.DefSQConst(engine, AITile::SLOPE_SEN, "SLOPE_SEN");
SQAITile.DefSQConst(engine, AITile::SLOPE_ENW, "SLOPE_ENW");
SQAITile.DefSQConst(engine, AITile::SLOPE_STEEP_W, "SLOPE_STEEP_W");
SQAITile.DefSQConst(engine, AITile::SLOPE_STEEP_S, "SLOPE_STEEP_S");
SQAITile.DefSQConst(engine, AITile::SLOPE_STEEP_E, "SLOPE_STEEP_E");
SQAITile.DefSQConst(engine, AITile::SLOPE_STEEP_N, "SLOPE_STEEP_N");
SQAITile.DefSQConst(engine, AITile::SLOPE_INVALID, "SLOPE_INVALID");
SQAITile.DefSQConst(engine, AITile::TRANSPORT_RAIL, "TRANSPORT_RAIL");
SQAITile.DefSQConst(engine, AITile::TRANSPORT_ROAD, "TRANSPORT_ROAD");
SQAITile.DefSQConst(engine, AITile::TRANSPORT_WATER, "TRANSPORT_WATER");
SQAITile.DefSQConst(engine, AITile::TRANSPORT_AIR, "TRANSPORT_AIR");
SQAITile.DefSQConst(engine, AITile::TRANSPORT_INVALID, "TRANSPORT_INVALID");
SQAITile.DefSQConst(engine, AITile::ERR_TILE_BASE, "ERR_TILE_BASE");
SQAITile.DefSQConst(engine, AITile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH");
SQAITile.DefSQConst(engine, AITile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
SQAITile.DefSQConst(engine, AITile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT");
SQAITile.DefSQConst(engine, AITile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE");
SQAITile.DefSQConst(engine, AITile::CORNER_W, "CORNER_W");
SQAITile.DefSQConst(engine, AITile::CORNER_S, "CORNER_S");
SQAITile.DefSQConst(engine, AITile::CORNER_E, "CORNER_E");
SQAITile.DefSQConst(engine, AITile::CORNER_N, "CORNER_N");
SQAITile.DefSQConst(engine, AITile::CORNER_INVALID, "CORNER_INVALID");
SQAITile.DefSQConst(engine, AITile::SLOPE_FLAT, "SLOPE_FLAT");
SQAITile.DefSQConst(engine, AITile::SLOPE_W, "SLOPE_W");
SQAITile.DefSQConst(engine, AITile::SLOPE_S, "SLOPE_S");
SQAITile.DefSQConst(engine, AITile::SLOPE_E, "SLOPE_E");
SQAITile.DefSQConst(engine, AITile::SLOPE_N, "SLOPE_N");
SQAITile.DefSQConst(engine, AITile::SLOPE_STEEP, "SLOPE_STEEP");
SQAITile.DefSQConst(engine, AITile::SLOPE_NW, "SLOPE_NW");
SQAITile.DefSQConst(engine, AITile::SLOPE_SW, "SLOPE_SW");
SQAITile.DefSQConst(engine, AITile::SLOPE_SE, "SLOPE_SE");
SQAITile.DefSQConst(engine, AITile::SLOPE_NE, "SLOPE_NE");
SQAITile.DefSQConst(engine, AITile::SLOPE_EW, "SLOPE_EW");
SQAITile.DefSQConst(engine, AITile::SLOPE_NS, "SLOPE_NS");
SQAITile.DefSQConst(engine, AITile::SLOPE_ELEVATED, "SLOPE_ELEVATED");
SQAITile.DefSQConst(engine, AITile::SLOPE_NWS, "SLOPE_NWS");
SQAITile.DefSQConst(engine, AITile::SLOPE_WSE, "SLOPE_WSE");
SQAITile.DefSQConst(engine, AITile::SLOPE_SEN, "SLOPE_SEN");
SQAITile.DefSQConst(engine, AITile::SLOPE_ENW, "SLOPE_ENW");
SQAITile.DefSQConst(engine, AITile::SLOPE_STEEP_W, "SLOPE_STEEP_W");
SQAITile.DefSQConst(engine, AITile::SLOPE_STEEP_S, "SLOPE_STEEP_S");
SQAITile.DefSQConst(engine, AITile::SLOPE_STEEP_E, "SLOPE_STEEP_E");
SQAITile.DefSQConst(engine, AITile::SLOPE_STEEP_N, "SLOPE_STEEP_N");
SQAITile.DefSQConst(engine, AITile::SLOPE_INVALID, "SLOPE_INVALID");
SQAITile.DefSQConst(engine, AITile::TRANSPORT_RAIL, "TRANSPORT_RAIL");
SQAITile.DefSQConst(engine, AITile::TRANSPORT_ROAD, "TRANSPORT_ROAD");
SQAITile.DefSQConst(engine, AITile::TRANSPORT_WATER, "TRANSPORT_WATER");
SQAITile.DefSQConst(engine, AITile::TRANSPORT_AIR, "TRANSPORT_AIR");
SQAITile.DefSQConst(engine, AITile::TRANSPORT_INVALID, "TRANSPORT_INVALID");
AIError::RegisterErrorMap(STR_1003_ALREADY_AT_SEA_LEVEL, AITile::ERR_TILE_TOO_HIGH);
AIError::RegisterErrorMap(STR_1003_ALREADY_AT_SEA_LEVEL, AITile::ERR_TILE_TOO_LOW);
AIError::RegisterErrorMap(STR_1003_ALREADY_AT_SEA_LEVEL, AITile::ERR_TILE_TOO_HIGH);
AIError::RegisterErrorMap(STR_1003_ALREADY_AT_SEA_LEVEL, AITile::ERR_TILE_TOO_LOW);
AIError::RegisterErrorMap(STR_ALREADY_LEVELLED, AITile::ERR_AREA_ALREADY_FLAT);
AIError::RegisterErrorMap(STR_1002_EXCAVATION_WOULD_DAMAGE, AITile::ERR_EXCAVATION_WOULD_DAMAGE);
AIError::RegisterErrorMapString(AITile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH");
AIError::RegisterErrorMapString(AITile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
AIError::RegisterErrorMapString(AITile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH");
AIError::RegisterErrorMapString(AITile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
AIError::RegisterErrorMapString(AITile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT");
AIError::RegisterErrorMapString(AITile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE");
SQAITile.DefSQStaticMethod(engine, &AITile::IsBuildable, "IsBuildable", 2, ".i");
SQAITile.DefSQStaticMethod(engine, &AITile::IsBuildableRectangle, "IsBuildableRectangle", 4, ".iii");
@@ -78,6 +91,9 @@ void SQAITile_Register(Squirrel *engine) {
SQAITile.DefSQStaticMethod(engine, &AITile::GetSlope, "GetSlope", 2, ".i");
SQAITile.DefSQStaticMethod(engine, &AITile::GetComplementSlope, "GetComplementSlope", 2, ".i");
SQAITile.DefSQStaticMethod(engine, &AITile::GetHeight, "GetHeight", 2, ".i");
SQAITile.DefSQStaticMethod(engine, &AITile::GetMinHeight, "GetMinHeight", 2, ".i");
SQAITile.DefSQStaticMethod(engine, &AITile::GetMaxHeight, "GetMaxHeight", 2, ".i");
SQAITile.DefSQStaticMethod(engine, &AITile::GetCornerHeight, "GetCornerHeight", 3, ".ii");
SQAITile.DefSQStaticMethod(engine, &AITile::GetOwner, "GetOwner", 2, ".i");
SQAITile.DefSQStaticMethod(engine, &AITile::HasTransportType, "HasTransportType", 3, ".ii");
SQAITile.DefSQStaticMethod(engine, &AITile::GetCargoAcceptance, "GetCargoAcceptance", 6, ".iiiii");

View File

@@ -23,14 +23,26 @@
/* If it's a tunnel alread, take the easy way out! */
if (IsTunnelTile(tile)) return ::GetOtherTunnelEnd(tile);
::DoCommand(tile, 0, 0, DC_AUTO, CMD_BUILD_TUNNEL);
return _build_tunnel_endtile == 0 ? INVALID_TILE : _build_tunnel_endtile;
uint start_z;
Slope start_tileh = ::GetTileSlope(tile, &start_z);
DiagDirection direction = ::GetInclinedSlopeDirection(start_tileh);
if (direction == INVALID_DIAGDIR) return INVALID_TILE;
TileIndexDiff delta = ::TileOffsByDiagDir(direction);
uint end_z;
do {
tile += delta;
if (!::IsValidTile(tile)) return INVALID_TILE;
::GetTileSlope(tile, &end_z);
} while (start_z != end_z);
return tile;
}
static void _DoCommandReturnBuildTunnel2(class AIInstance *instance)
{
if (!AITunnel::_BuildTunnelRoad2()) {
AIObject::SetLastCommandRes(false);
AIInstance::DoCommandReturn(instance);
return;
}
@@ -43,7 +55,6 @@ static void _DoCommandReturnBuildTunnel2(class AIInstance *instance)
static void _DoCommandReturnBuildTunnel1(class AIInstance *instance)
{
if (!AITunnel::_BuildTunnelRoad1()) {
AIObject::SetLastCommandRes(false);
AIInstance::DoCommandReturn(instance);
return;
}
@@ -62,7 +73,7 @@ static void _DoCommandReturnBuildTunnel1(class AIInstance *instance)
uint type = 0;
if (vehicle_type == AIVehicle::VT_ROAD) {
type |= (TRANSPORT_ROAD << 9);
type |= RoadTypeToRoadTypes((::RoadType)AIObject::GetRoadType());
type |= ::RoadTypeToRoadTypes((::RoadType)AIObject::GetRoadType());
} else {
type |= (TRANSPORT_RAIL << 9);
type |= AIRail::GetCurrentRailType();
@@ -74,10 +85,7 @@ static void _DoCommandReturnBuildTunnel1(class AIInstance *instance)
}
AIObject::SetCallbackVariable(0, start);
if (!AIObject::DoCommand(start, type, 0, CMD_BUILD_TUNNEL, NULL, &_DoCommandReturnBuildTunnel1)) return false;
/* In case of test-mode, test if we can build both road pieces */
return _BuildTunnelRoad1();
return AIObject::DoCommand(start, type, 0, CMD_BUILD_TUNNEL, NULL, &_DoCommandReturnBuildTunnel1);
}
/* static */ bool AITunnel::_BuildTunnelRoad1()
@@ -89,10 +97,7 @@ static void _DoCommandReturnBuildTunnel1(class AIInstance *instance)
DiagDirection dir_1 = (DiagDirection)((::TileX(start) == ::TileX(end)) ? (::TileY(start) < ::TileY(end) ? DIAGDIR_NW : DIAGDIR_SE) : (::TileX(start) < ::TileX(end) ? DIAGDIR_NE : DIAGDIR_SW));
DiagDirection dir_2 = ::ReverseDiagDir(dir_1);
if (!AIObject::DoCommand(start + ::TileOffsByDiagDir(dir_1), ::DiagDirToRoadBits(dir_2) | (AIObject::GetRoadType() << 4), 0, CMD_BUILD_ROAD, NULL, &_DoCommandReturnBuildTunnel2)) return false;
/* In case of test-mode, test the other road piece too */
return _BuildTunnelRoad2();
return AIObject::DoCommand(start + ::TileOffsByDiagDir(dir_1), ::DiagDirToRoadBits(dir_2) | (AIObject::GetRoadType() << 4), 0, CMD_BUILD_ROAD, NULL, &_DoCommandReturnBuildTunnel2);
}
/* static */ bool AITunnel::_BuildTunnelRoad2()

View File

@@ -46,11 +46,15 @@ public:
/**
* Get the tile that exits on the other end of a (would be) tunnel starting
* at tile.
* at tile. If there is no 'simple' inclined slope at the start tile,
* this function will return AIMap::TILE_INVALID.
* @param tile The tile that is an entrance to a tunnel or the tile where you may want to build a tunnel.
* @pre AIMap::IsValidTile(tile).
* @return The TileIndex that is the other end of the (would be) tunnel, or
* TILE_INVALID if no other end was found (can't build tunnel).
* AIMap::TILE_INVALID if no other end was found (can't build tunnel).
* @note Even if this function returns a valid tile, that is no guarantee
* that building a tunnel will succeed. Use BuildTunnel in AITestMode to
* check whether a tunnel can actually be build.
*/
static TileIndex GetOtherTunnelEnd(TileIndex tile);

View File

@@ -1,6 +1,75 @@
/* $Id$ */
/** @file ai_types.hpp Defines all the types of the game, like VehicleID, .... */
/** @file ai_types.hpp Defines all the types of the game, like IDs of various objects.
*
* IDs are used to identify certain objects. They are only unique within the object type, so for example a vehicle may have VehicleID 2009,
* while a station has StationID 2009 at the same time. Also IDs are assigned arbitrary, you cannot assume them to be consecutive.
* Also note, that some IDs are static and never change, while others are allocated dynamically and might be
* reused for other objects once they are released. So be careful, which IDs you store for which purpose and whether they stay valid all the time.
*
* <table>
* <tr><th>type </th><th> object </th>
* <th> acquired </th>
* <th> released </th>
* <th> reused </th></tr>
* <tr><td>#BridgeID </td><td> bridge type </td>
* <td> introduction \ref newgrf_changes "(1)" </td>
* <td> never \ref newgrf_changes "(1)" </td>
* <td> no \ref newgrf_changes "(1)" </td></tr>
* <tr><td>#CargoID </td><td> cargo type </td>
* <td> game start \ref newgrf_changes "(1)" </td>
* <td> never \ref newgrf_changes "(1)" </td>
* <td> no \ref newgrf_changes "(1)" </td></tr>
* <tr><td>#EngineID </td><td> engine type </td>
* <td> introduction, preview \ref dynamic_engines "(2)" </td>
* <td> engines retires \ref dynamic_engines "(2)" </td>
* <td> no \ref dynamic_engines "(2)" </td></tr>
* <tr><td>#GroupID </td><td> vehicle group </td>
* <td> creation </td>
* <td> deletion </td>
* <td> yes </td></tr>
* <tr><td>#IndustyID </td><td> industry </td>
* <td> construction </td>
* <td> closure </td>
* <td> yes </td></tr>
* <tr><td>#IndustyType</td><td> industry type </td>
* <td> game start \ref newgrf_changes "(1)" </td>
* <td> never \ref newgrf_changes "(1)" </td>
* <td> no </td></tr>
* <tr><td>#SignID </td><td> sign </td>
* <td> construction </td>
* <td> deletion </td>
* <td> yes </td></tr>
* <tr><td>#StationID </td><td> station </td>
* <td> construction </td>
* <td> expiration of 'grey' station sign after deletion </td>
* <td> yes </td></tr>
* <tr><td>#SubsidyID </td><td> subsidy </td>
* <td> offer announcement </td>
* <td> (offer) expiration </td>
* <td> yes </td></tr>
* <tr><td>#TileIndex </td><td> tile on map </td>
* <td> game start </td>
* <td> never </td>
* <td> no </td></tr>
* <tr><td>#TownID </td><td> town </td>
* <td> game start </td>
* <td> never </td>
* <td> no </td></tr>
* <tr><td>#VehicleID </td><td> vehicle </td>
* <td> construction, autorenew, autoreplace </td>
* <td> destruction, autorenew, autoreplace </td>
* <td> yes </td></tr>
* <tr><td>#WaypointID </td><td> waypoint </td>
* <td> construction </td>
* <td> destruction </td>
* <td> yes </td></tr>
* </table>
*
* @remarks
* \li \anchor newgrf_changes (1) in-game changes of newgrfs may reassign/invalidate IDs (will also cause other trouble though).
* \li \anchor dynamic_engines (2) engine IDs are reassigned/invalidated on changing 'allow multiple newgrf engine sets' (only allowed as long as no vehicles are built).
*/
#ifndef AI_TYPES_HPP
#define AI_TYPES_HPP

View File

@@ -160,6 +160,13 @@
return AIObject::DoCommand(0, vehicle_id, 0, GetCmdSendToDepot(::GetVehicle(vehicle_id)));
}
/* static */ bool AIVehicle::SendVehicleToDepotForServicing(VehicleID vehicle_id)
{
EnforcePrecondition(false, IsValidVehicle(vehicle_id));
return AIObject::DoCommand(0, vehicle_id, DEPOT_SERVICE, GetCmdSendToDepot(::GetVehicle(vehicle_id)));
}
/* static */ bool AIVehicle::IsInDepot(VehicleID vehicle_id)
{
if (!IsValidVehicle(vehicle_id)) return false;

View File

@@ -422,14 +422,25 @@ public:
static bool SellWagonChain(VehicleID vehicle_id, int wagon);
/**
* Sends the given vehicle to a depot.
* Sends the given vehicle to a depot. If the vehicle has already been
* sent to a depot it continues with its normal orders instead.
* @param vehicle_id The vehicle to send to a depot.
* @pre IsValidVehicle(vehicle_id).
* @exception AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT
* @return True if and only if the vehicle has been sent to a depot.
* @return True if the current order was changed.
*/
static bool SendVehicleToDepot(VehicleID vehicle_id);
/**
* Sends the given vehicle to a depot for servicing. If the vehicle has
* already been sent to a depot it continues with its normal orders instead.
* @param vehicle_id The vehicle to send to a depot for servicing.
* @pre IsValidVehicle(vehicle_id).
* @exception AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT
* @return True if the current order was changed.
*/
static bool SendVehicleToDepotForServicing(VehicleID vehicle_id);
/**
* Starts or stops the given vehicle depending on the current state.
* @param vehicle_id The vehicle to start/stop.

View File

@@ -98,47 +98,48 @@ void SQAIVehicle_Register(Squirrel *engine) {
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT");
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, ".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");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetWagonEngineType, "GetWagonEngineType", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetUnitNumber, "GetUnitNumber", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetAge, "GetAge", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetWagonAge, "GetWagonAge", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetMaxAge, "GetMaxAge", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetAgeLeft, "GetAgeLeft", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetCurrentSpeed, "GetCurrentSpeed", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetState, "GetState", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetRunningCost, "GetRunningCost", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetProfitThisYear, "GetProfitThisYear", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetProfitLastYear, "GetProfitLastYear", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetCurrentValue, "GetCurrentValue", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetVehicleType, "GetVehicleType", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetRoadType, "GetRoadType", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsInDepot, "IsInDepot", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsStoppedInDepot, "IsStoppedInDepot", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::BuildVehicle, "BuildVehicle", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::CloneVehicle, "CloneVehicle", 4, ".iib");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::MoveWagon, "MoveWagon", 5, ".iiii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::MoveWagonChain, "MoveWagonChain", 5, ".iiii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetRefitCapacity, "GetRefitCapacity", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::RefitVehicle, "RefitVehicle", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SellVehicle, "SellVehicle", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SellWagon, "SellWagon", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SellWagonChain, "SellWagonChain", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SendVehicleToDepot, "SendVehicleToDepot", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::StartStopVehicle, "StartStopVehicle", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SkipToVehicleOrder, "SkipToVehicleOrder", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::ReverseVehicle, "ReverseVehicle", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetCapacity, "GetCapacity", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetLength, "GetLength", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetCargoLoad, "GetCargoLoad", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetGroupID, "GetGroupID", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsArticulated, "IsArticulated", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::HasSharedOrders, "HasSharedOrders", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsValidVehicle, "IsValidVehicle", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetNumWagons, "GetNumWagons", 2, ".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");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetWagonEngineType, "GetWagonEngineType", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetUnitNumber, "GetUnitNumber", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetAge, "GetAge", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetWagonAge, "GetWagonAge", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetMaxAge, "GetMaxAge", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetAgeLeft, "GetAgeLeft", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetCurrentSpeed, "GetCurrentSpeed", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetState, "GetState", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetRunningCost, "GetRunningCost", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetProfitThisYear, "GetProfitThisYear", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetProfitLastYear, "GetProfitLastYear", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetCurrentValue, "GetCurrentValue", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetVehicleType, "GetVehicleType", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetRoadType, "GetRoadType", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsInDepot, "IsInDepot", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsStoppedInDepot, "IsStoppedInDepot", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::BuildVehicle, "BuildVehicle", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::CloneVehicle, "CloneVehicle", 4, ".iib");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::MoveWagon, "MoveWagon", 5, ".iiii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::MoveWagonChain, "MoveWagonChain", 5, ".iiii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetRefitCapacity, "GetRefitCapacity", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::RefitVehicle, "RefitVehicle", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SellVehicle, "SellVehicle", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SellWagon, "SellWagon", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SellWagonChain, "SellWagonChain", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SendVehicleToDepot, "SendVehicleToDepot", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SendVehicleToDepotForServicing, "SendVehicleToDepotForServicing", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::StartStopVehicle, "StartStopVehicle", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SkipToVehicleOrder, "SkipToVehicleOrder", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::ReverseVehicle, "ReverseVehicle", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetCapacity, "GetCapacity", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetLength, "GetLength", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetCargoLoad, "GetCargoLoad", 3, ".ii");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetGroupID, "GetGroupID", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsArticulated, "IsArticulated", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::HasSharedOrders, "HasSharedOrders", 2, ".i");
SQAIVehicle.PostRegister(engine);
}

View File

@@ -16,7 +16,7 @@ public:
static const char *GetClassName() { return "AIWaypoint"; }
enum SpecialWaypointIDs {
WAYPOINT_INVALID = -1, //!< An invalid WaypointID.
WAYPOINT_INVALID = 0xFFFF, //!< An invalid WaypointID.
};
/**

View File

@@ -5,7 +5,6 @@
#include "stdafx.h"
#include "train.h"
#include "roadveh.h"
#include "aircraft.h"
#include "newgrf_engine.h"
#include "vehicle_func.h"
@@ -52,22 +51,7 @@ static inline uint16 GetVehicleDefaultCapacity(EngineID engine, VehicleType type
CargoID cargo = (e->CanCarryCargo() ? e->GetDefaultCargoType() : (CargoID)CT_INVALID);
if (cargo_type != NULL) *cargo_type = cargo;
if (cargo == CT_INVALID) return 0;
switch (type) {
case VEH_TRAIN:
return GetEngineProperty(engine, 0x14, e->u.rail.capacity) + (e->u.rail.railveh_type == RAILVEH_MULTIHEAD ? e->u.rail.capacity : 0);
case VEH_ROAD:
return GetEngineProperty(engine, 0x0F, e->u.road.capacity);
case VEH_SHIP:
return GetEngineProperty(engine, 0x0D, e->u.ship.capacity);
case VEH_AIRCRAFT:
return AircraftDefaultCargoCapacity(cargo, &e->u.air);
default: NOT_REACHED();
}
return e->GetDisplayDefaultCapacity();
}
/**

View File

@@ -120,8 +120,8 @@ static int CDECL EngineReliabilitySorter(const void *a, const void *b)
static int CDECL EngineCostSorter(const void *a, const void *b)
{
int va = GetEngine(*(const EngineID*)a)->GetRunningCost();
int vb = GetEngine(*(const EngineID*)b)->GetRunningCost();
Money va = GetEngine(*(const EngineID*)a)->GetCost();
Money vb = GetEngine(*(const EngineID*)b)->GetCost();
int r = ClampToI32(va - vb);
/* Use EngineID to sort instead since we want consistent sorting */
@@ -225,8 +225,11 @@ static int CDECL RoadVehEngineCapacitySorter(const void *a, const void *b)
/* Ship vehicle sorting functions */
static int CDECL ShipEngineCapacitySorter(const void *a, const void *b)
{
int va = ShipVehInfo(*(const EngineID*)a)->capacity;
int vb = ShipVehInfo(*(const EngineID*)b)->capacity;
const Engine *e_a = GetEngine(*(const EngineID*)a);
const Engine *e_b = GetEngine(*(const EngineID*)b);
int va = e_a->GetDisplayDefaultCapacity();
int vb = e_b->GetDisplayDefaultCapacity();
int r = va - vb;
/* Use EngineID to sort instead since we want consistent sorting */
@@ -240,8 +243,8 @@ static int CDECL AircraftEngineCargoSorter(const void *a, const void *b)
const Engine *e_a = GetEngine(*(const EngineID*)a);
const Engine *e_b = GetEngine(*(const EngineID*)b);
int va = AircraftDefaultCargoCapacity(e_a->GetDefaultCargoType(), &e_a->u.air);
int vb = AircraftDefaultCargoCapacity(e_b->GetDefaultCargoType(), &e_b->u.air);
int va = e_a->GetDisplayDefaultCapacity();
int vb = e_b->GetDisplayDefaultCapacity();
int r = va - vb;
if (r == 0) {
@@ -383,7 +386,7 @@ static int DrawRailWagonPurchaseInfo(int x, int y, EngineID engine_number, const
/* Wagon weight - (including cargo) */
uint weight = e->GetDisplayWeight();
SetDParam(0, weight);
uint cargo_weight = (e->CanCarryCargo() ? GetCargo(e->GetDefaultCargoType())->weight * GetEngineProperty(engine_number, 0x14, rvi->capacity) >> 4 : 0);
uint cargo_weight = (e->CanCarryCargo() ? GetCargo(e->GetDefaultCargoType())->weight * e->GetDisplayDefaultCapacity() >> 4 : 0);
SetDParam(1, cargo_weight + weight);
DrawString(x, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT, TC_FROMSTRING);
y += 10;
@@ -482,7 +485,7 @@ static int DrawShipPurchaseInfo(int x, int y, EngineID engine_number, const Ship
/* Cargo type + capacity */
SetDParam(0, e->GetDefaultCargoType());
SetDParam(1, GetEngineProperty(engine_number, 0x0D, svi->capacity));
SetDParam(1, e->GetDisplayDefaultCapacity());
SetDParam(2, refittable ? STR_9842_REFITTABLE : STR_EMPTY);
DrawString(x, y, STR_PURCHASE_INFO_CAPACITY, TC_FROMSTRING);
y += 10;
@@ -509,14 +512,14 @@ static int DrawAircraftPurchaseInfo(int x, int y, EngineID engine_number, const
/* Cargo capacity */
if (cargo == CT_INVALID || cargo == CT_PASSENGERS) {
SetDParam(0, avi->passenger_capacity);
SetDParam(0, e->GetDisplayDefaultCapacity());
SetDParam(1, avi->mail_capacity);
DrawString(x, y, STR_PURCHASE_INFO_AIRCRAFT_CAPACITY, TC_FROMSTRING);
} else {
/* Note, if the default capacity is selected by the refit capacity
* callback, then the capacity shown is likely to be incorrect. */
SetDParam(0, cargo);
SetDParam(1, AircraftDefaultCargoCapacity(cargo, avi));
SetDParam(1, e->GetDisplayDefaultCapacity());
SetDParam(2, refittable ? STR_9842_REFITTABLE : STR_EMPTY);
DrawString(x, y, STR_PURCHASE_INFO_CAPACITY, TC_FROMSTRING);
}

View File

@@ -445,12 +445,11 @@ Company *DoStartupNewCompany(bool is_ai)
c->inaugurated_year = _cur_year;
RandomCompanyManagerFaceBits(c->face, (GenderEthnicity)Random(), false); // create a random company manager face
/* Engine renewal settings */
c->engine_renew_list = NULL;
c->renew_keep_length = false;
c->engine_renew = _settings_client.gui.autorenew;
c->engine_renew_months = _settings_client.gui.autorenew_months;
c->engine_renew_money = _settings_client.gui.autorenew_money;
/* Settings for non-ai companies are copied from the client settings later. */
if (is_ai) {
c->engine_renew_money = 100000;
c->engine_renew_months = 6;
}
GeneratePresidentName(c);
@@ -756,6 +755,9 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
/* This is the client (or non-dedicated server) who wants a new company */
if (cid == _network_own_client_id) {
/* Create p1 and p2 here because SetLocalCompany resets the gui.autorenew* settings. */
uint32 p1 = (_settings_client.gui.autorenew << 15 ) | (_settings_client.gui.autorenew_months << 16) | 4;
uint32 p2 = _settings_client.gui.autorenew_money;
assert(_local_company == COMPANY_SPECTATOR);
SetLocalCompany(c->index);
if (!StrEmpty(_settings_client.network.default_company_pass)) {
@@ -767,13 +769,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
/* Now that we have a new company, broadcast our autorenew settings to
* all clients so everything is in sync */
NetworkSend_Command(0,
(_settings_client.gui.autorenew << 15 ) | (_settings_client.gui.autorenew_months << 16) | 4,
_settings_client.gui.autorenew_money,
CMD_SET_AUTOREPLACE,
NULL,
NULL
);
NetworkSend_Command(0, p1, p2, CMD_SET_AUTOREPLACE, NULL, NULL);
MarkWholeScreenDirty();
}

View File

@@ -116,13 +116,13 @@ void IConsolePrint(ConsoleColour colour_code, const char *string)
* by any other means. Uses printf() style format, for more information look
* at IConsolePrint()
*/
void CDECL IConsolePrintF(ConsoleColour colour_code, const char *s, ...)
void CDECL IConsolePrintF(ConsoleColour colour_code, const char *format, ...)
{
va_list va;
char buf[ICON_MAX_STREAMSIZE];
va_start(va, s);
vsnprintf(buf, sizeof(buf), s, va);
va_start(va, format);
vsnprintf(buf, sizeof(buf), format, va);
va_end(va);
IConsolePrint(colour_code, buf);

View File

@@ -640,6 +640,11 @@ DEF_CONSOLE_CMD(ConJoinCompany)
return true;
}
if (company_id != COMPANY_SPECTATOR && GetCompany(company_id)->is_ai) {
IConsoleError("Cannot join AI company.");
return true;
}
/* Check if the company requires a password */
if (NetworkCompanyIsPassworded(company_id) && argc < 3) {
IConsolePrintF(CC_ERROR, "Company %d requires a password to join.", company_id + 1);
@@ -678,6 +683,11 @@ DEF_CONSOLE_CMD(ConMoveClient)
return true;
}
if (company_id != COMPANY_SPECTATOR && GetCompany(company_id)->is_ai) {
IConsoleError("You cannot move clients to AI companies.");
return true;
}
if (ci->client_id == CLIENT_ID_SERVER && _network_dedicated) {
IConsoleError("Silly boy, you cannot move the server!");
return true;
@@ -782,8 +792,8 @@ DEF_CONSOLE_CMD(ConNetworkConnect)
/* From a user pov 0 is a new company, internally it's different and all
* companies are offset by one to ease up on users (eg companies 1-8 not 0-7) */
if (_network_playas != COMPANY_SPECTATOR) {
if (_network_playas > MAX_COMPANIES) return false;
_network_playas--;
if (!IsValidCompanyID(_network_playas)) return false;
}
}
if (port != NULL) {
@@ -1189,7 +1199,7 @@ DEF_CONSOLE_CMD(ConInfoVar)
IConsolePrintF(CC_DEFAULT, "variable name: %s", var->name);
IConsolePrintF(CC_DEFAULT, "variable type: %s", _icon_vartypes[var->type]);
IConsolePrintF(CC_DEFAULT, "variable addr: 0x%X", var->addr);
IConsolePrintF(CC_DEFAULT, "variable addr: %p", var->addr);
if (var->hook.access) IConsoleWarning("variable is access hooked");
if (var->hook.pre) IConsoleWarning("variable is pre hooked");
@@ -1216,7 +1226,7 @@ DEF_CONSOLE_CMD(ConInfoCmd)
}
IConsolePrintF(CC_DEFAULT, "command name: %s", cmd->name);
IConsolePrintF(CC_DEFAULT, "command proc: 0x%X", cmd->proc);
IConsolePrintF(CC_DEFAULT, "command proc: %p", cmd->proc);
if (cmd->hook.access) IConsoleWarning("command is access hooked");
if (cmd->hook.pre) IConsoleWarning("command is pre hooked");
@@ -1421,7 +1431,7 @@ DEF_CONSOLE_CMD(ConCompanies)
const NetworkCompanyStats *stats = &company_stats[c->index];
GetString(buffer, STR_00D1_DARK_BLUE + _company_colours[c->index], lastof(buffer));
IConsolePrintF(CC_INFO, "#:%d(%s) Company Name: '%s' Year Founded: %d Money: %" OTTD_PRINTF64 "d Loan: %" OTTD_PRINTF64 "d Value: %" OTTD_PRINTF64 "d (T:%d, R:%d, P:%d, S:%d) %sprotected",
IConsolePrintF(CC_INFO, "#:%d(%s) Company Name: '%s' Year Founded: %d Money: " OTTD_PRINTF64 " Loan: " OTTD_PRINTF64 " Value: " OTTD_PRINTF64 " (T:%d, R:%d, P:%d, S:%d) %sprotected",
c->index + 1, buffer, company_name, c->inaugurated_year, (int64)c->money, (int64)c->current_loan, (int64)CalculateCompanyValue(c),
/* trains */ stats->num_vehicle[0],
/* lorry + bus */ stats->num_vehicle[1] + stats->num_vehicle[2],

View File

@@ -17,7 +17,7 @@ void IConsoleClose();
/* console output */
void IConsolePrint(ConsoleColour colour_code, const char *string);
void CDECL IConsolePrintF(ConsoleColour colour_code, const char *s, ...);
void CDECL IConsolePrintF(ConsoleColour colour_code, const char *format, ...) WARN_FORMAT(2, 3);
void IConsoleDebug(const char *dbg, const char *string);
void IConsoleWarning(const char *string);
void IConsoleError(const char *string);

View File

@@ -11,7 +11,7 @@
*/
void NORETURN MallocError(size_t size)
{
error("Out of memory. Cannot allocate %i bytes", size);
error("Out of memory. Cannot allocate " PRINTF_SIZE " bytes", size);
}
/**
@@ -20,5 +20,5 @@ void NORETURN MallocError(size_t size)
*/
void NORETURN ReallocError(size_t size)
{
error("Out of memory. Cannot reallocate %i bytes", size);
error("Out of memory. Cannot reallocate " PRINTF_SIZE " bytes", size);
}

View File

@@ -318,7 +318,7 @@ static FORCEINLINE T ROR(const T x, const uint8 n)
*/
static FORCEINLINE uint32 BSWAP32(uint32 x)
{
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ >= 3))
#if !defined(__ICC) && defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ >= 3))
/* GCC >= 4.3 provides a builtin, resulting in faster code */
return (uint32)__builtin_bswap32((int32)x);
#else

View File

@@ -86,7 +86,7 @@ public:
FORCEINLINE OverflowSafeInt operator * (const byte factor) const { OverflowSafeInt result = *this; result *= (int64)factor; return result; }
/* Operators for division */
FORCEINLINE OverflowSafeInt& operator /= (const int divisor) { this->m_value /= divisor; return *this; }
FORCEINLINE OverflowSafeInt& operator /= (const int64 divisor) { this->m_value /= divisor; return *this; }
FORCEINLINE OverflowSafeInt operator / (const OverflowSafeInt& divisor) const { OverflowSafeInt result = *this; result /= divisor.m_value; return result; }
FORCEINLINE OverflowSafeInt operator / (const int divisor) const { OverflowSafeInt result = *this; result /= divisor; return result; }
FORCEINLINE OverflowSafeInt operator / (const uint divisor) const { OverflowSafeInt result = *this; result /= (int)divisor; return result; }

View File

@@ -108,7 +108,7 @@ static FORCEINLINE uint32 InteractiveRandomRange(uint16 max)
* Checks if a given randomize-number is below a given probability.
*
* This function is used to check if the given probability by the fraction of (a/b)
* is greater than low 16 bits of the given randomize-number v.
* is greater than low 16 bits of the given randomize-number r.
*
* Do not use this function twice on the same random 16 bits as it will yield
* the same result. One can use a random number for two calls to Chance16I,
@@ -117,12 +117,12 @@ static FORCEINLINE uint32 InteractiveRandomRange(uint16 max)
* @param a The numerator of the fraction
* @param b The denominator of the fraction, must of course not be null
* @param r The given randomize-number
* @return True if v is less or equals (a/b)
* @return True if the probability given by r is less or equal to (a/b)
*/
static FORCEINLINE bool Chance16I(const uint a, const uint b, const uint32 r)
{
assert(b != 0);
return (uint16)r < (uint16)(((a << 16) + b / 2) / b);
return (((uint16)r * b + b / 2) >> 16) < a;
}
/**

View File

@@ -10,40 +10,40 @@
#include "table/strings.h"
/* exchange rate prefix symbol_pos
* | separator | postfix |
* | | Euro year | | | name
* | | | | | | | */
/* exchange rate prefix symbol_pos
* | separator | postfix |
* | | Euro year | | | name
* | | | | | | | */
static const CurrencySpec origin_currency_specs[NUM_CURRENCY] = {
{ 1, ',', CF_NOEURO, "£", "", 0, STR_CURR_GBP }, ///< british pounds
{ 2, ',', CF_NOEURO, "$", "", 0, STR_CURR_USD }, ///< us dollars
{ 2, ',', CF_ISEURO, "", "", 0, STR_CURR_EUR }, ///< Euro
{ 220, ',', CF_NOEURO, "¥", "", 0, STR_CURR_YEN }, ///< yen
{ 20, ',', 2002, "", " S.", 1, STR_CURR_ATS }, ///< austrian schilling
{ 59, ',', 2002, "BEF ", "", 0, STR_CURR_BEF }, ///< belgian franc
{ 2, ',', CF_NOEURO, "CHF ", "", 0, STR_CURR_CHF }, ///< swiss franc
{ 41, ',', CF_NOEURO, "", "", 1, STR_CURR_CZK }, ///< czech koruna
{ 3, '.', 2002, "DM ", "", 0, STR_CURR_DEM }, ///< deutsche mark
{ 11, '.', CF_NOEURO, "", " kr", 1, STR_CURR_DKK }, ///< danish krone
{ 245, '.', 2002, "Pts ", "", 0, STR_CURR_ESP }, ///< spanish pesetas
{ 9, ',', 2002, "", " mk", 1, STR_CURR_FIM }, ///< finnish markka
{ 10, '.', 2002, "FF ", "", 0, STR_CURR_FRF }, ///< french francs
{ 500, ',', 2002, "", "Dr.", 1, STR_CURR_GRD }, ///< greek drachma
{ 378, ',', CF_NOEURO, "", " Ft", 1, STR_CURR_HUF }, ///< hungarian forint
{ 130, '.', CF_NOEURO, "", " Kr", 1, STR_CURR_ISK }, ///< icelandic krona
{ 2850, ',', 2002, "", " L.", 1, STR_CURR_ITL }, ///< italian lira
{ 3, ',', 2002, "NLG ", "", 0, STR_CURR_NLG }, ///< dutch gulden
{ 12, '.', CF_NOEURO, "", " Kr", 1, STR_CURR_NOK }, ///< norwegian krone
{ 6, ' ', CF_NOEURO, "", " zl", 1, STR_CURR_PLN }, ///< polish zloty
{ 5, '.', CF_NOEURO, "", " Lei", 1, STR_CURR_ROL }, ///< romanian Lei
{ 50, ' ', CF_NOEURO, "", " p", 1, STR_CURR_RUR }, ///< russian rouble
{ 352, '.', 2007, "", " SIT", 1, STR_CURR_SIT }, ///< slovenian tolar
{ 13, '.', CF_NOEURO, "", " Kr", 1, STR_CURR_SEK }, ///< swedish krona
{ 3, '.', CF_NOEURO, "", " TL", 1, STR_CURR_TRY }, ///< turkish lira
{ 52, ',', 2009, "", " Sk", 1, STR_CURR_SKK }, ///< slovak koruna
{ 4, ',', CF_NOEURO, "R$ ", "", 0, STR_CURR_BRL }, ///< brazil real
{ 20, '.', CF_NOEURO, "", " EEK", 1, STR_CURR_EEK }, ///< estonian krooni
{ 1, ' ', CF_NOEURO, "", "", 2, STR_CURR_CUSTOM }, ///< custom currency
{ 1, ',', CF_NOEURO, "\xC2\xA3", "", 0, STR_CURR_GBP }, ///< british pounds
{ 2, ',', CF_NOEURO, "$", "", 0, STR_CURR_USD }, ///< us dollars
{ 2, ',', CF_ISEURO, "\xE2\x82\xAC", "", 0, STR_CURR_EUR }, ///< Euro
{ 220, ',', CF_NOEURO, "\xC2\xA5", "", 0, STR_CURR_YEN }, ///< yen
{ 20, ',', 2002, "", " S.", 1, STR_CURR_ATS }, ///< austrian schilling
{ 59, ',', 2002, "BEF ", "", 0, STR_CURR_BEF }, ///< belgian franc
{ 2, ',', CF_NOEURO, "CHF ", "", 0, STR_CURR_CHF }, ///< swiss franc
{ 41, ',', CF_NOEURO, "", " K\xC4\x8D", 1, STR_CURR_CZK }, ///< czech koruna
{ 3, '.', 2002, "DM ", "", 0, STR_CURR_DEM }, ///< deutsche mark
{ 11, '.', CF_NOEURO, "", " kr", 1, STR_CURR_DKK }, ///< danish krone
{ 245, '.', 2002, "Pts ", "", 0, STR_CURR_ESP }, ///< spanish pesetas
{ 9, ',', 2002, "", " mk", 1, STR_CURR_FIM }, ///< finnish markka
{ 10, '.', 2002, "FF ", "", 0, STR_CURR_FRF }, ///< french francs
{ 500, ',', 2002, "", "Dr.", 1, STR_CURR_GRD }, ///< greek drachma
{ 378, ',', CF_NOEURO, "", " Ft", 1, STR_CURR_HUF }, ///< hungarian forint
{ 130, '.', CF_NOEURO, "", " Kr", 1, STR_CURR_ISK }, ///< icelandic krona
{ 2850, ',', 2002, "", " L.", 1, STR_CURR_ITL }, ///< italian lira
{ 3, ',', 2002, "NLG ", "", 0, STR_CURR_NLG }, ///< dutch gulden
{ 12, '.', CF_NOEURO, "", " Kr", 1, STR_CURR_NOK }, ///< norwegian krone
{ 6, ' ', CF_NOEURO, "", " zl", 1, STR_CURR_PLN }, ///< polish zloty
{ 5, '.', CF_NOEURO, "", " Lei", 1, STR_CURR_RON }, ///< romanian Lei
{ 50, ' ', CF_NOEURO, "", " p", 1, STR_CURR_RUR }, ///< russian rouble
{ 352, '.', 2007, "", " SIT", 1, STR_CURR_SIT }, ///< slovenian tolar
{ 13, '.', CF_NOEURO, "", " Kr", 1, STR_CURR_SEK }, ///< swedish krona
{ 3, '.', CF_NOEURO, "", " TL", 1, STR_CURR_TRY }, ///< turkish lira
{ 52, ',', 2009, "", " Sk", 1, STR_CURR_SKK }, ///< slovak koruna
{ 4, ',', CF_NOEURO, "R$ ", "", 0, STR_CURR_BRL }, ///< brazil real
{ 20, '.', CF_NOEURO, "", " EEK", 1, STR_CURR_EEK }, ///< estonian krooni
{ 1, ' ', CF_NOEURO, "", "", 2, STR_CURR_CUSTOM }, ///< custom currency
};
/* Array of currencies used by the system */
@@ -76,7 +76,7 @@ enum {
CURR_NLG,
CURR_NOK,
CURR_PLN,
CURR_ROL,
CURR_RON,
CURR_RUR,
CURR_SIT,
CURR_SEK,

View File

@@ -92,15 +92,13 @@ static void debug_print(const char *dbg, const char *buf)
}
}
void CDECL debug(const char *dbg, ...)
void CDECL debug(const char *dbg, const char *format, ...)
{
va_list va;
va_start(va, dbg);
const char *s;
char buf[1024];
s = va_arg(va, const char*);
vsnprintf(buf, lengthof(buf), s, va);
va_list va;
va_start(va, format);
vsnprintf(buf, lengthof(buf), format, va);
va_end(va);
debug_print(dbg, buf);
@@ -149,7 +147,7 @@ void SetDebugString(const char *s)
if (p != NULL) {
*p = v;
} else {
ShowInfoF("Unknown debug level '%.*s'", s - t, t);
ShowInfoF("Unknown debug level '%.*s'", (int)(s - t), t);
return;
}
}

View File

@@ -50,19 +50,12 @@
extern int _debug_gamelog_level;
extern int _debug_desync_level;
void CDECL debug(const char *dbg, ...);
void CDECL debug(const char *dbg, const char *format, ...) WARN_FORMAT(2, 3);
#endif /* NO_DEBUG_MESSAGES */
void SetDebugString(const char *s);
const char *GetDebugString();
/* MSVCRT of course has to have a different syntax for long long *sigh* */
#if defined(_MSC_VER) || defined(__MINGW32__)
#define OTTD_PRINTF64 "I64"
#else
#define OTTD_PRINTF64 "ll"
#endif
/* Used for profiling
*
* Usage:
@@ -100,6 +93,6 @@ const char *GetDebugString();
}
void ShowInfo(const char *str);
void CDECL ShowInfoF(const char *str, ...);
void CDECL ShowInfoF(const char *str, ...) WARN_FORMAT(1, 2);
#endif /* DEBUG_H */

View File

@@ -566,6 +566,12 @@ static void DisasterTick_Big_Ufo(Vehicle *v)
return;
}
if (!IsValidTile(v->dest_tile)) {
/* Make sure we don't land outside the map. */
delete v;
return;
}
z = GetSlopeZ(v->x_pos, v->y_pos);
if (z < v->z_pos) {
SetDisasterVehiclePos(v, v->x_pos, v->y_pos, v->z_pos - 1);
@@ -885,7 +891,7 @@ static void Disaster_Submarine_Init(DisasterSubType subtype)
int x = TileX(r) * TILE_SIZE + TILE_SIZE / 2;
if (HasBit(r, 31)) {
y = MapMaxX() * TILE_SIZE - TILE_SIZE / 2 - 1;
y = MapMaxY() * TILE_SIZE - TILE_SIZE / 2 - 1;
dir = DIR_NW;
} else {
y = TILE_SIZE / 2;

View File

@@ -177,6 +177,36 @@ bool Engine::CanCarryCargo() const
return this->GetDefaultCargoType() != CT_INVALID;
}
/**
* Determines the default cargo capacity of an engine for display purposes.
*
* For planes carrying both passenger and mail this is the passenger capacity.
* For multiheaded engines this is the capacity of both heads.
* For articulated engines use GetCapacityOfArticulatedParts
*
* @return The default capacity
* @see GetDefaultCargoType
*/
uint Engine::GetDisplayDefaultCapacity() const
{
if (!this->CanCarryCargo()) return 0;
switch (type) {
case VEH_TRAIN:
return GetEngineProperty(this->index, 0x14, this->u.rail.capacity) + (this->u.rail.railveh_type == RAILVEH_MULTIHEAD ? this->u.rail.capacity : 0);
case VEH_ROAD:
return GetEngineProperty(this->index, 0x0F, this->u.road.capacity);
case VEH_SHIP:
return GetEngineProperty(this->index, 0x0D, this->u.ship.capacity);
case VEH_AIRCRAFT:
return AircraftDefaultCargoCapacity(this->GetDefaultCargoType(), &this->u.air);
default: NOT_REACHED();
}
}
Money Engine::GetRunningCost() const
{
switch (this->type) {

View File

@@ -53,6 +53,7 @@ struct Engine : PoolItem<Engine, EngineID, &_Engine_pool> {
CargoID GetDefaultCargoType() const;
bool CanCarryCargo() const;
uint GetDisplayDefaultCapacity() const;
Money GetRunningCost() const;
Money GetCost() const;
uint GetDisplayMaxSpeed() const;

View File

@@ -14,7 +14,6 @@
#include "engine_gui.h"
#include "articulated_vehicles.h"
#include "rail.h"
#include "aircraft.h"
#include "table/strings.h"
#include "table/sprites.h"
@@ -151,7 +150,7 @@ static void DrawAircraftEngineInfo(EngineID engine, int x, int y, int maxw)
if (cargo == CT_INVALID || cargo == CT_PASSENGERS) {
SetDParam(0, e->GetCost());
SetDParam(1, e->GetDisplayMaxSpeed());
SetDParam(2, e->u.air.passenger_capacity);
SetDParam(2, e->GetDisplayDefaultCapacity());
SetDParam(3, e->u.air.mail_capacity);
SetDParam(4, e->GetRunningCost());
@@ -160,7 +159,7 @@ static void DrawAircraftEngineInfo(EngineID engine, int x, int y, int maxw)
SetDParam(0, e->GetCost());
SetDParam(1, e->GetDisplayMaxSpeed());
SetDParam(2, cargo);
SetDParam(3, AircraftDefaultCargoCapacity(cargo, &e->u.air));
SetDParam(3, e->GetDisplayDefaultCapacity());
SetDParam(4, e->GetRunningCost());
DrawStringMultiCenter(x, y, STR_982E_COST_MAX_SPEED_CAPACITY, maxw);
@@ -187,13 +186,12 @@ static void DrawRoadVehEngineInfo(EngineID engine, int x, int y, int maxw)
static void DrawShipEngineInfo(EngineID engine, int x, int y, int maxw)
{
const ShipVehicleInfo *svi = ShipVehInfo(engine);
const Engine *e = GetEngine(engine);
SetDParam(0, e->GetCost());
SetDParam(1, e->GetDisplayMaxSpeed());
SetDParam(2, e->GetDefaultCargoType());
SetDParam(3, GetEngineProperty(engine, 0x0D, svi->capacity));
SetDParam(3, e->GetDisplayDefaultCapacity());
SetDParam(4, e->GetRunningCost());
DrawStringMultiCenter(x, y, STR_982E_COST_MAX_SPEED_CAPACITY, maxw);
}

View File

@@ -363,7 +363,7 @@ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir,
char resolved_name[MAX_RESOLVED_LENGTH];
/* Filenames in tars are always forced to be lowercase */
strcpy(resolved_name, filename);
strecpy(resolved_name, filename, lastof(resolved_name));
strtolower(resolved_name);
size_t resolved_len = strlen(resolved_name);
@@ -376,9 +376,9 @@ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir,
/* Apply link */
char resolved_name2[MAX_RESOLVED_LENGTH];
const std::string &dest = link->second;
strcpy(resolved_name2, &(resolved_name[len]));
strcpy(resolved_name, dest.c_str());
strcpy(&(resolved_name[dest.length()]), resolved_name2);
strecpy(resolved_name2, &(resolved_name[len]), lastof(resolved_name2));
strecpy(resolved_name, dest.c_str(), lastof(resolved_name));
strecpy(&(resolved_name[dest.length()]), resolved_name2, lastof(resolved_name));
break; // Only resolve one level
}
}
@@ -595,7 +595,7 @@ bool TarListAddFile(const char *filename)
/* Calculate the size of the file.. for some strange reason this is stored as a string */
memcpy(buf, th.size, sizeof(th.size));
buf[sizeof(th.size)] = '\0';
int skip = strtol(buf, &end, 8);
size_t skip = strtoul(buf, &end, 8);
switch (th.typeflag) {
case '\0':
@@ -614,7 +614,7 @@ bool TarListAddFile(const char *filename)
/* Convert to lowercase and our PATHSEPCHAR */
SimplifyFileName(name);
DEBUG(misc, 6, "Found file in tar: %s (%d bytes, %d offset)", name, skip, pos);
DEBUG(misc, 6, "Found file in tar: %s (" PRINTF_SIZE " bytes, " PRINTF_SIZE " offset)", name, skip, pos);
if (_tar_filelist.insert(TarFileList::value_type(name, entry)).second) num++;
break;
@@ -640,7 +640,7 @@ bool TarListAddFile(const char *filename)
/* Process relative path.
* Note: The destination of links must not contain any directory-links. */
strcpy(dest, name);
strecpy(dest, name, lastof(dest));
char *destpos = strrchr(dest, PATHSEPCHAR);
if (destpos == NULL) destpos = dest;
*destpos = '\0';
@@ -702,7 +702,7 @@ bool TarListAddFile(const char *filename)
pos += skip;
}
DEBUG(misc, 1, "Found tar '%s' with %d new files", filename, num);
DEBUG(misc, 1, "Found tar '%s' with " PRINTF_SIZE " new files", filename, num);
fclose(f);
/* Resolve file links and store directory links.
@@ -829,7 +829,7 @@ void ChangeWorkingDirectory(const char *exe)
void DetermineBasePaths(const char *exe)
{
char tmp[MAX_PATH];
#if defined(__MORPHOS__) || defined(__AMIGA__) || defined(DOS) || !defined(WITH_PERSONAL_DIR)
#if defined(__MORPHOS__) || defined(__AMIGA__) || defined(DOS) || defined(OS2) || !defined(WITH_PERSONAL_DIR)
_searchpaths[SP_PERSONAL_DIR] = NULL;
#else
const char *homedir = getenv("HOME");
@@ -867,7 +867,7 @@ void DetermineBasePaths(const char *exe)
AppendPathSeparator(tmp, MAX_PATH);
_searchpaths[SP_BINARY_DIR] = strdup(tmp);
#if defined(__MORPHOS__) || defined(__AMIGA__) || defined(DOS)
#if defined(__MORPHOS__) || defined(__AMIGA__) || defined(DOS) || defined(OS2)
_searchpaths[SP_INSTALLATION_DIR] = NULL;
#else
snprintf(tmp, MAX_PATH, "%s", GLOBAL_DATA_DIR);

View File

@@ -8,6 +8,7 @@
#include "openttd.h"
#include "fios.h"
#include "fileio_func.h"
#include "tar_type.h"
#include "string_func.h"
#include <sys/stat.h>
@@ -469,7 +470,31 @@ static FiosType FiosGetHeightmapListCallback(SaveLoadDialogMode mode, const char
if (strcasecmp(ext, ".bmp") == 0) type = FIOS_TYPE_BMP;
if (type != FIOS_TYPE_INVALID) GetFileTitle(file, title, last);
if (type == FIOS_TYPE_INVALID) return FIOS_TYPE_INVALID;
TarFileList::iterator it = _tar_filelist.find(file);
if (it != _tar_filelist.end()) {
/* If the file is in a tar and that tar is not in a heightmap
* directory we are for sure not supposed to see it.
* Examples of this are pngs part of documentation within
* collections of NewGRFs or 32 bpp graphics replacement PNGs.
*/
bool match = false;
Searchpath sp;
FOR_ALL_SEARCHPATHS(sp) {
char buf[MAX_PATH];
FioAppendDirectory(buf, sizeof(buf), sp, HEIGHTMAP_DIR);
if (strncmp(buf, it->second.tar_filename, strlen(buf)) == 0) {
match = true;
break;
}
}
if (!match) return FIOS_TYPE_INVALID;
}
GetFileTitle(file, title, last);
return type;
}

View File

@@ -172,6 +172,8 @@ static FT_Error GetFontByFaceName(const char *font_name, FT_Face *face)
if (err != FT_Err_Ok) break;
if (strncasecmp(font_name, (*face)->family_name, strlen((*face)->family_name)) == 0) break;
/* Try english name if font name failed */
if (strncasecmp(font_name + strlen(font_name) + 1, (*face)->family_name, strlen((*face)->family_name)) == 0) break;
err = FT_Err_Cannot_Open_Resource;
} while ((FT_Long)++index != (*face)->num_faces);
@@ -204,42 +206,47 @@ static const char *GetEnglishFontName(const ENUMLOGFONTEX *logfont)
static char font_name[MAX_PATH];
const char *ret_font_name = NULL;
uint pos = 0;
HDC dc;
HGDIOBJ oldfont;
byte *buf;
DWORD dw;
uint16 format, count, stringOffset, platformId, encodingId, languageId, nameId, length, offset;
HFONT font = CreateFontIndirect(&logfont->elfLogFont);
if (font == NULL) goto err1;
HDC dc = GetDC(NULL);
HGDIOBJ oldfont = SelectObject(dc, font);
DWORD dw = GetFontData(dc, 'eman', 0, NULL, 0);
dc = GetDC(NULL);
oldfont = SelectObject(dc, font);
dw = GetFontData(dc, 'eman', 0, NULL, 0);
if (dw == GDI_ERROR) goto err2;
byte *buf = MallocT<byte>(dw);
buf = MallocT<byte>(dw);
dw = GetFontData(dc, 'eman', 0, buf, dw);
if (dw == GDI_ERROR) goto err3;
uint16 format = buf[pos++] << 8;
format = buf[pos++] << 8;
format += buf[pos++];
assert(format == 0);
uint16 count = buf[pos++] << 8;
count = buf[pos++] << 8;
count += buf[pos++];
uint16 stringOffset = buf[pos++] << 8;
stringOffset = buf[pos++] << 8;
stringOffset += buf[pos++];
for (uint i = 0; i < count; i++) {
uint16 platformId = buf[pos++] << 8;
platformId = buf[pos++] << 8;
platformId += buf[pos++];
uint16 encodingId = buf[pos++] << 8;
encodingId = buf[pos++] << 8;
encodingId += buf[pos++];
uint16 languageId = buf[pos++] << 8;
languageId = buf[pos++] << 8;
languageId += buf[pos++];
uint16 nameId = buf[pos++] << 8;
nameId = buf[pos++] << 8;
nameId += buf[pos++];
if (nameId != 1) {
pos += 4; // skip length and offset
continue;
}
uint16 length = buf[pos++] << 8;
length = buf[pos++] << 8;
length += buf[pos++];
uint16 offset = buf[pos++] << 8;
offset = buf[pos++] << 8;
offset += buf[pos++];
/* Don't buffer overflow */
@@ -296,12 +303,18 @@ static int CALLBACK EnumFontCallback(const ENUMLOGFONTEX *logfont, const NEWTEXT
if ((fs.fsCsb[0] & info->locale.lsCsbSupported[0]) == 0 && (fs.fsCsb[1] & info->locale.lsCsbSupported[1]) == 0) return 1;
}
const char *font_name = GetEnglishFontName(logfont);
DEBUG(freetype, 1, "Fallback font: %s", font_name);
const char *english_name = GetEnglishFontName(logfont);
const char *font_name = WIDE_TO_MB((const TCHAR*)logfont->elfFullName);
DEBUG(freetype, 1, "Fallback font: %s (%s)", font_name, english_name);
strecpy(info->settings->small_font, font_name, lastof(info->settings->small_font));
strecpy(info->settings->medium_font, font_name, lastof(info->settings->medium_font));
strecpy(info->settings->large_font, font_name, lastof(info->settings->large_font));
/* Add english name after font name */
strecpy(info->settings->small_font + strlen(info->settings->small_font) + 1, english_name, lastof(info->settings->small_font));
strecpy(info->settings->medium_font + strlen(info->settings->medium_font) + 1, english_name, lastof(info->settings->medium_font));
strecpy(info->settings->large_font + strlen(info->settings->large_font) + 1, english_name, lastof(info->settings->large_font));
return 0; // stop enumerating
}

View File

@@ -85,6 +85,8 @@ enum {
static int _dbgofs = 0; ///< offset in current output buffer
static void AddDebugText(char *buf, const char *s, ...) WARN_FORMAT(2, 3);
static void AddDebugText(char *buf, const char *s, ...)
{
if (GAMELOG_BUF_LEN <= _dbgofs) return;
@@ -135,6 +137,7 @@ static const char *la_text[] = {
"cheat was used",
"settings changed",
"GRF bug triggered",
"emergency savegame",
};
assert_compile(lengthof(la_text) == GLAT_END);
@@ -249,6 +252,9 @@ void GamelogPrint(GamelogPrintProc *proc)
PrintGrfFilename(buf, lc->grfbug.grfid);
break;
}
case GLCT_EMERGENCY:
break;
}
proc(buf);
@@ -273,7 +279,7 @@ static int _gamelog_print_level = 0; ///< gamelog debug level we need to print s
static void GamelogPrintDebugProc(const char *s)
{
DEBUG(gamelog, _gamelog_print_level, s);
DEBUG(gamelog, _gamelog_print_level, "%s", s);
}
@@ -317,6 +323,31 @@ static LoggedChange *GamelogChange(GamelogChangeType ct)
}
/** Logs a emergency savegame
*/
void GamelogEmergency()
{
assert(_gamelog_action_type == GLAT_EMERGENCY);
GamelogChange(GLCT_EMERGENCY);
}
/** Finds out if current game is a loaded emergency savegame.
*/
bool GamelogTestEmergency()
{
const LoggedChange *emergency = NULL;
const LoggedAction *laend = &_gamelog_action[_gamelog_actions];
for (const LoggedAction *la = _gamelog_action; la != laend; la++) {
const LoggedChange *lcend = &la->change[la->changes];
for (const LoggedChange *lc = la->change; lc != lcend; lc++) {
if (lc->ct == GLCT_EMERGENCY) emergency = lc;
}
}
return (emergency != NULL);
}
/** Logs a change in game revision
* @param revision new revision string
*/

View File

@@ -14,6 +14,7 @@ enum GamelogActionType {
GLAT_CHEAT, ///< Cheat was used
GLAT_SETTING, ///< Setting changed
GLAT_GRFBUG, ///< GRF bug was triggered
GLAT_EMERGENCY, ///< Emergency savegame
GLAT_END, ///< So we know how many GLATs are there
GLAT_NONE = 0xFF, ///< No logging active; in savegames, end of list
};
@@ -29,6 +30,9 @@ void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 / WINCE crash.log
void GamelogPrintDebug(int level);
void GamelogPrintConsole();
void GamelogEmergency();
bool GamelogTestEmergency();
void GamelogRevision();
void GamelogMode();
void GamelogOldver();

View File

@@ -19,6 +19,7 @@ enum GamelogChangeType {
GLCT_GRFPARAM, ///< GRF parameter changed
GLCT_GRFMOVE, ///< GRF order changed
GLCT_GRFBUG, ///< GRF bug triggered
GLCT_EMERGENCY, ///< Emergency savegame
GLCT_END, ///< So we know how many GLCTs are there
GLCT_NONE = 0xFF, ///< In savegames, end of list
};

View File

@@ -47,32 +47,10 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date);
* in the genworld.h and genworld.c! -- TrueLight */
gw_info _gw;
/**
* Set the status of the Paint flag.
* If it is true, the thread will hold with any futher generating till
* the drawing of the screen is done. This is handled by
* SetGeneratingWorldProgress(), so calling that function will stall
* from time to time.
*/
void SetGeneratingWorldPaintStatus(bool status)
{
_gw.wait_for_draw = status;
}
/**
* Returns true if the thread wants the main program to do a (full) paint.
* If this returns false, please do not update the screen. Because we are
* writing in a thread, it can cause damaged data (reading and writing the
* same tile at the same time).
*/
bool IsGeneratingWorldReadyForPaint()
{
/* If we are in quit_thread mode, ignore this and always return false. This
* forces the screen to not be drawn, and the GUI not to wait for a draw. */
if (!_gw.active || _gw.quit_thread || !_gw.threaded) return false;
return _gw.wait_for_draw;
}
/** Rights for the map generation */
ThreadMutex *_genworld_mapgen_mutex = ThreadMutex::New();
/** Rights for the painting */
ThreadMutex *_genworld_paint_mutex = ThreadMutex::New();
/**
* Tells if the world generation is done in a thread or not.
@@ -100,6 +78,7 @@ static void CleanupGeneration()
DeleteWindowById(WC_GENERATE_PROGRESS_WINDOW, 0);
MarkWholeScreenDirty();
_genworld_mapgen_mutex->EndCritical();
}
/**
@@ -109,6 +88,7 @@ static void _GenerateWorld(void *arg)
{
try {
_generating_world = true;
_genworld_mapgen_mutex->BeginCritical();
if (_network_dedicated) DEBUG(net, 0, "Generating map, please wait...");
/* Set the Random() seed to generation_seed so we produce the same map with the same seed */
if (_settings_game.game_creation.generation_seed == GENERATE_NEW_SEED) _settings_game.game_creation.generation_seed = _settings_newgame.game_creation.generation_seed = InteractiveRandom();
@@ -194,6 +174,7 @@ static void _GenerateWorld(void *arg)
}
} catch (...) {
_generating_world = false;
_genworld_mapgen_mutex->EndCritical();
throw;
}
}
@@ -223,11 +204,16 @@ void GenerateWorldSetAbortCallback(gw_abort_proc *proc)
void WaitTillGeneratedWorld()
{
if (_gw.thread == NULL) return;
_genworld_mapgen_mutex->EndCritical();
_genworld_paint_mutex->EndCritical();
_gw.quit_thread = true;
_gw.thread->Join();
delete _gw.thread;
_gw.thread = NULL;
_gw.threaded = false;
_genworld_mapgen_mutex->BeginCritical();
_genworld_paint_mutex->BeginCritical();
}
/**
@@ -280,7 +266,6 @@ void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y)
_gw.abort = false;
_gw.abortp = NULL;
_gw.lc = _local_company;
_gw.wait_for_draw = false;
_gw.quit_thread = false;
_gw.threaded = true;
@@ -315,7 +300,9 @@ void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y)
!ThreadObject::New(&_GenerateWorld, NULL, &_gw.thread)) {
DEBUG(misc, 1, "Cannot create genworld thread, reverting to single-threaded mode");
_gw.threaded = false;
_genworld_mapgen_mutex->EndCritical();
_GenerateWorld(NULL);
_genworld_mapgen_mutex->BeginCritical();
return;
}

View File

@@ -16,6 +16,8 @@ enum {
LG_TERRAGENESIS = 1, ///< TerraGenesis Perlin landscape generator
GENERATE_NEW_SEED = UINT_MAX, ///< Create a new random seed
GENWORLD_REDRAW_TIMEOUT = 200, ///< Timeout between redraws
};
/* Modes for GenerateWorld */
@@ -32,7 +34,6 @@ typedef void gw_abort_proc();
struct gw_info {
bool active; ///< Is generating world active
bool abort; ///< Whether to abort the thread ASAP
bool wait_for_draw; ///< Are we waiting on a draw event
bool quit_thread; ///< Do we want to quit the active thread
bool threaded; ///< Whether we run _GenerateWorld threaded
GenerateWorldMode mode;///< What mode are we making a world in
@@ -69,8 +70,6 @@ static inline bool IsGeneratingWorld()
}
/* genworld.cpp */
void SetGeneratingWorldPaintStatus(bool status);
bool IsGeneratingWorldReadyForPaint();
bool IsGenerateWorldThreaded();
void GenerateWorldSetCallback(gw_done_proc *proc);
void GenerateWorldSetAbortCallback(gw_abort_proc *proc);
@@ -89,4 +88,7 @@ void StartNewGameWithoutGUI(uint seed);
void ShowCreateScenario();
void StartScenarioEditor();
extern class ThreadMutex *_genworld_mapgen_mutex;
extern class ThreadMutex *_genworld_paint_mutex;
#endif /* GENWORLD_H */

View File

@@ -26,6 +26,7 @@
#include "landscape_type.h"
#include "querystring_gui.h"
#include "town.h"
#include "thread.h"
#include "table/strings.h"
#include "table/sprites.h"
@@ -1037,8 +1038,8 @@ static void _SetGeneratingWorldProgress(gwp_class cls, uint progress, uint total
_tp.percent = percent_table[cls];
}
/* Don't update the screen too often. So update it once in every 200ms */
if (!_network_dedicated && _tp.timer != 0 && _realtime_tick - _tp.timer < 200) return;
/* Don't update the screen too often. So update it once in every once in a while... */
if (!_network_dedicated && _tp.timer != 0 && _realtime_tick - _tp.timer < GENWORLD_REDRAW_TIMEOUT) return;
/* Percentage is about the number of completed tasks, so 'current - 1' */
_tp.percent = percent_table[cls] + (percent_table[cls + 1] - percent_table[cls]) * (_tp.current == 0 ? 0 : _tp.current - 1) / _tp.total;
@@ -1064,12 +1065,15 @@ static void _SetGeneratingWorldProgress(gwp_class cls, uint progress, uint total
InvalidateWindow(WC_GENERATE_PROGRESS_WINDOW, 0);
MarkWholeScreenDirty();
SetGeneratingWorldPaintStatus(true);
/* We wait here till the paint is done, so we don't read and write
* on the same tile at the same moment. Nasty hack, but that happens
* if you implement threading afterwards */
while (IsGeneratingWorldReadyForPaint()) { CSleep(10); }
/* Release the rights to the map generator, and acquire the rights to the
* paint thread. The 'other' thread already has the paint thread rights so
* this ensures us that we are waiting until the paint thread is done
* before we reacquire the mapgen rights */
_genworld_mapgen_mutex->EndCritical();
_genworld_paint_mutex->BeginCritical();
_genworld_mapgen_mutex->BeginCritical();
_genworld_paint_mutex->EndCritical();
_tp.timer = _realtime_tick;
}

View File

@@ -18,6 +18,7 @@
#include "core/sort_func.hpp"
#include "landscape_type.h"
#include "network/network_func.h"
#include "thread.h"
#include "table/palettes.h"
#include "table/sprites.h"
@@ -1285,6 +1286,9 @@ void ScreenSizeChanged()
void UndrawMouseCursor()
{
/* Don't undraw the mouse cursor if the screen is not ready */
if (_screen.dst_ptr == NULL) return;
if (_cursor.visible) {
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
_cursor.visible = false;
@@ -1300,6 +1304,9 @@ void DrawMouseCursor()
return;
#endif
/* Don't draw the mouse cursor if the screen is not ready */
if (_screen.dst_ptr == NULL) return;
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
int x;
int y;
@@ -1386,7 +1393,18 @@ void DrawDirtyBlocks()
int x;
int y;
if (IsGeneratingWorld() && !IsGeneratingWorldReadyForPaint()) return;
if (IsGeneratingWorld()) {
/* We are generating the world, so release our rights to the map and
* painting while we are waiting a bit. */
_genworld_paint_mutex->EndCritical();
_genworld_mapgen_mutex->EndCritical();
/* Wait a while and update _realtime_tick so we are given the rights */
CSleep(GENWORLD_REDRAW_TIMEOUT);
_realtime_tick += GENWORLD_REDRAW_TIMEOUT;
_genworld_paint_mutex->BeginCritical();
_genworld_mapgen_mutex->BeginCritical();
}
y = 0;
do {
@@ -1454,12 +1472,6 @@ void DrawDirtyBlocks()
_invalid_rect.top = h;
_invalid_rect.right = 0;
_invalid_rect.bottom = 0;
/* If we are generating a world, and waiting for a paint run, mark it here
* as done painting, so we can continue generating. */
if (IsGeneratingWorld() && IsGeneratingWorldReadyForPaint()) {
SetGeneratingWorldPaintStatus(false);
}
}
/*!

View File

@@ -250,7 +250,7 @@ void CheckExternalFiles()
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(error_msg);
if (add_pos != error_msg) ShowInfoF("%s", error_msg);
}

View File

@@ -554,7 +554,7 @@ static const Widget _performance_history_widgets[] = {
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 475, 0, 13, STR_7051_COMPANY_PERFORMANCE_RATINGS, STR_018C_WINDOW_TITLE_DRAG_THIS},
{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_GREY, 526, 575, 0, 13, STR_704C_KEY, STR_704D_SHOW_KEY_TO_GRAPHS},
{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_GREY, 476, 525, 0, 13, STR_PERFORMANCE_DETAIL_KEY, STR_704D_SHOW_KEY_TO_GRAPHS},
{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_GREY, 476, 525, 0, 13, STR_PERFORMANCE_DETAIL_KEY, STR_SHOW_DETAILED_PERFORMANCE_RATINGS},
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 575, 14, 237, 0x0, STR_NULL},
{ WIDGETS_END},
};

View File

@@ -1872,6 +1872,9 @@ static void MaybeNewIndustry(void)
}
}
/* Abort if there is no industry buildable */
if (probability_max == 0) return;
/* Find a random type, with maximum being what has been evaluate above*/
rndtype = RandomRange(probability_max);
for (j = 0; j < NUM_INDUSTRYTYPES; j++) {
@@ -2211,8 +2214,9 @@ static void ChangeIndustryProduction(Industry *i, bool monthly)
/* Recalculate production_rate
* For non-smooth economy these should always be synchronized with prod_level */
if (recalculate_multipliers) {
i->production_rate[0] = min(indspec->production_rate[0] * i->prod_level / PRODLEVEL_DEFAULT, 0xFF);
i->production_rate[1] = min(indspec->production_rate[1] * i->prod_level / PRODLEVEL_DEFAULT, 0xFF);
/* Rates are rounded up, so e.g. oilrig always produces some passengers */
i->production_rate[0] = min((indspec->production_rate[0] * i->prod_level + PRODLEVEL_DEFAULT - 1) / PRODLEVEL_DEFAULT, 0xFF);
i->production_rate[1] = min((indspec->production_rate[1] * i->prod_level + PRODLEVEL_DEFAULT - 1) / PRODLEVEL_DEFAULT, 0xFF);
}
/* Close if needed and allowed */

View File

@@ -815,8 +815,6 @@ static void GenerateTerrain(int type, uint flag)
} while (--w != 0);
break;
}
FixSlopes();
}
@@ -930,6 +928,7 @@ void GenerateLandscape(byte mode)
}
}
FixSlopes();
ConvertGroundTilesIntoWaterTiles();
if (_settings_game.game_creation.landscape == LT_TROPIC) CreateDesertOrRainForest();

View File

@@ -657,7 +657,6 @@ STR_FULL :Vol
STR_02BA :{SILVER}- - {COMPANY} - -
STR_02BB_TOWN_DIRECTORY :Dorp gids
STR_02BD :{BLACK}{STRING}
STR_02BF_CUSTOM :Bestelling
STR_CHECKMARK :{CHECKMARK}
############ range for menu starts
@@ -774,7 +773,7 @@ STR_TOWNNAME_SWEDISH :Sweeds
STR_TOWNNAME_DUTCH :Hollands
STR_TOWNNAME_FINNISH :Finnish
STR_TOWNNAME_POLISH :Polish
STR_TOWNNAME_SLOVAKISH :Slovakish
STR_TOWNNAME_SLOVAK :Slovak
STR_TOWNNAME_NORWEGIAN :Norwegian
STR_TOWNNAME_HUNGARIAN :Hungarian
STR_TOWNNAME_AUSTRIAN :Austrian
@@ -807,7 +806,7 @@ STR_CURR_ITL :Italian Lira (I
STR_CURR_NLG :Dutch Guilder (NLG)
STR_CURR_NOK :Norwegian Krone (NOK)
STR_CURR_PLN :Polish Zloty (PLN)
STR_CURR_ROL :Romanian Leu (ROL)
STR_CURR_RON :Romanian Leu (RON)
STR_CURR_RUR :Russian Rubles (RUR)
STR_CURR_SIT :Slovenian Tolar (SIT)
STR_CURR_SEK :Swedish Krona (SEK)
@@ -1640,6 +1639,7 @@ STR_200B_CENTER_THE_MAIN_VIEW_ON :{BLACK}Senter s
STR_200C_CHANGE_TOWN_NAME :{BLACK}Verander dorp naam
STR_200D_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passasiers verlede maand: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA}
STR_200E_MAIL_LAST_MONTH_MAX :{BLACK}Pos verlede maand: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA}
STR_CARGO_FOR_TOWNGROWTH_LAST_MONTH :{SETX 20}{ORANGE}{CARGO}{BLACK} gelewer laas maand
STR_200F_TALL_OFFICE_BLOCK :Hoog kantoor blok
STR_2010_OFFICE_BLOCK :Kantoor blok
STR_2011_SMALL_BLOCK_OF_FLATS :Klein blok van woonstelle
@@ -1947,6 +1947,7 @@ STR_INDUSTRY_PROD_GODOWN :{BLACK}{BIGFONT
##id 0x5000
STR_5003_ANOTHER_TUNNEL_IN_THE_WAY :{WHITE}Ander tonnel in die pad
STR_TUNNEL_THROUGH_MAP_BORDER :{WHITE}Tonnel so op die einde van die kaart eindig
STR_5005_UNABLE_TO_EXCAVATE_LAND :{WHITE}Kan nie daal vir ander einde van tonnel te uitgrawe nie
STR_5006_MUST_DEMOLISH_TUNNEL_FIRST :{WHITE}Moet eers tonnel afbreek
STR_5007_MUST_DEMOLISH_BRIDGE_FIRST :{WHITE}Moet eers brug afbreek
@@ -2076,6 +2077,7 @@ STR_NUM_VERY_LOW :Baie laag
STR_6816_LOW :Laag
STR_6817_NORMAL :Normaal
STR_6818_HIGH :Hoog
STR_02BF_CUSTOM :Bestelling
STR_6819 :{BLACK}{SMALLLEFTARROW}
STR_681A :{BLACK}{SMALLRIGHTARROW}
STR_681B_VERY_SLOW :Baie Stadig
@@ -2225,6 +2227,8 @@ STR_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Herbou m
STR_7071_CAN_T_BUILD_COMPANY_HEADQUARTERS :{WHITE}Maatskappy hoofkwartiers kan nie hier gebou word nie...
STR_7072_VIEW_HQ :{BLACK}Wys HK
STR_RELOCATE_HQ :{BLACK}Beweeg HQ
STR_COMPANY_JOIN :{BLACK}Bind
STR_COMPANY_JOIN_TIP :{BLACK}Bind en speel as maatskapy
STR_COMPANY_PASSWORD :{BLACK}Wagwoord
STR_COMPANY_PASSWORD_TOOLTIP :{BLACK}Wagwoord-beskerm jou maatskappy om onmagtig gebruikers te belet van verbinding
STR_SET_COMPANY_PASSWORD :{BLACK}Stel maatskappy wagwoord
@@ -3036,6 +3040,7 @@ STR_PERFORMANCE_DETAIL_LOAN_TIP :{BLACK}Die bedr
STR_PERFORMANCE_DETAIL_TOTAL_TIP :{BLACK}Totaale punte uit van moontlike punte
STR_NEWGRF_SETTINGS_BUTTON :{BLACK}NewGRF Stellings
STR_NEWGRF_SETTINGS_BUTTON_TIP :{BLACK}Wys NewGRF stellings
STR_NEWGRF_SETTINGS_CAPTION :{WHITE}NewGRF stellings
STR_NEWGRF_APPLY_CHANGES :{BLACK}Wend aan veranderings
STR_NEWGRF_TOGGLE_PALETTE :{BLACK}Tokkel pallet
@@ -3066,6 +3071,11 @@ STR_NEWGRF_ERROR_INVALID_ID :Pooging om onvo
STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} het 'n korrupte "sprite". Alle korrupte "sprites" sal gewys word as 'n rooi vraag teken (?).
STR_NEWGRF_PRESET_LIST_TIP :{BLACK}Laai die gekose voorafstel
STR_NEWGRF_PRESET_SAVE :{BLACK}Stoor voorafstel
STR_NEWGRF_PRESET_SAVE_TIP :{BLACK}Stoor die huidige lys as 'n voorafstel
STR_NEWGRF_PRESET_SAVE_QUERY :{BLACK}Sleutel 'n naam vir die voorafstel in
STR_NEWGRF_PRESET_DELETE :{BLACK}Vee voorafstel uit
STR_NEWGRF_PRESET_DELETE_TIP :{BLACK}Vee die huidige gekose voorafstel uit
STR_NEWGRF_ADD :{BLACK}Voeg
STR_NEWGRF_ADD_TIP :{BLACK}Voeg 'n NewGRF na die lys
STR_NEWGRF_REMOVE :{BLACK}Verwyder
@@ -3165,7 +3175,7 @@ STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Toon aan
STR_REPLACE_REMOVE_WAGON :{BLACK}Wa verwydering: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Maak autoreplace hou die lengte van 'n trein dieselfde deur verwyder waens (begin by die voor), indien vervang die enjin sal die trein langer maak
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Vervang: {ORANGE}{SKIP}{SKIP}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} EKSPERIMENTELE KENMERK {} Skakel tussen enjin en wa vervang vensters. {} Wa vervang sal alleen gedoen word indien die nuwe wa kan wees herpas binne-in dra dieselfde tipe van cargo as die ou een. Hierdie is gemerk vir elke wa wanneer die vervang plaasvind.
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Skakel tussen enjin en wa vervang vensters
STR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Voertuig is nie beskikbaar nie
STR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Voertuig is nie beskikbaar nie
STR_SHIP_NOT_AVAILABLE :{WHITE}Skip is nie beskikbaar
@@ -3233,6 +3243,7 @@ STR_RANDOM_HELP :{BLACK}Verander
STR_WORLD_GENERATION_CAPTION :{WHITE}Wêreld generasie
STR_RANDOM_SEED :{BLACK}Lukraak Saad:
STR_RANDOM_SEED_HELP :{BLACK}Kliek om 'n lukraak saad in te voeg
STR_RANDOM_SEED_OSKTITLE :{BLACK}Sleutel 'n lukraak saad in
STR_LAND_GENERATOR :{BLACK}Daal genereerder:
STR_TREE_PLACER :{BLACK}Boom algoritme:
STR_HEIGHTMAP_ROTATION :{BLACK}Hoogtekaart rotasie:
@@ -3280,12 +3291,15 @@ STR_SMALLMAP_CENTER :{BLACK}Senter d
STR_SMALLMAP_INDUSTRY :{TINYFONT}{STRING} ({NUM})
# Strings for map borders at game generation
STR_BORDER_TYPE :{BLACK}Kaart kante:
STR_NORTHWEST :{BLACK}Noordwes
STR_NORTHEAST :{BLACK}Noordoos
STR_SOUTHEAST :{BLACK}Suidoos
STR_SOUTHWEST :{BLACK}Suidwes
STR_BORDER_FREEFORM :{BLACK}Vryeform
STR_BORDER_WATER :{BLACK}Water
STR_BORDER_RANDOM :{BLACK}Lukraak
STR_BORDER_RANDOMIZE :{BLACK}Lukraak
########### String for new airports
STR_SMALL_AIRPORT :{BLACK}Klein
@@ -3476,6 +3490,9 @@ STR_CONTENT_DETAIL_SUBTITLE_UNSELECTED :{SILVER}Jy het
STR_CONTENT_DETAIL_SUBTITLE_SELECTED :{SILVER}Jy het dit geselekeer om af te laai
STR_CONTENT_DETAIL_SUBTITLE_ALREADY_HERE :{SILVER}Jy het hierdie reeds
STR_JUST_DATE_TINY :{DATE_TINY}
STR_JUST_DATE_LONG :{DATE_LONG}
STR_JUST_DATE_ISO :{DATE_ISO}
########

View File

@@ -668,7 +668,6 @@ STR_FULL :ممتلئ
STR_02BA :{SILVER}- - {COMPANY} - -
STR_02BB_TOWN_DIRECTORY :دليل المدن
STR_02BD :{BLACK}{STRING}
STR_02BF_CUSTOM :اختياري
STR_CHECKMARK :{CHECKMARK}
############ range for menu starts
@@ -787,7 +786,7 @@ STR_TOWNNAME_SWEDISH :سويدي
STR_TOWNNAME_DUTCH :هولندي
STR_TOWNNAME_FINNISH :فنلندي
STR_TOWNNAME_POLISH :بلغاري
STR_TOWNNAME_SLOVAKISH :سلوفاكي
STR_TOWNNAME_SLOVAK :سلوفاكي
STR_TOWNNAME_NORWEGIAN :نرويجي
STR_TOWNNAME_HUNGARIAN :هنغاري
STR_TOWNNAME_AUSTRIAN :نمساوي
@@ -820,7 +819,7 @@ STR_CURR_ITL :ليرة ايط
STR_CURR_NLG :غلدر هولندي (NLG)
STR_CURR_NOK :كرونا نرويجية (NOK)
STR_CURR_PLN :زلوتي بولندي (PLN)
STR_CURR_ROL :لور يوناني (ROL)
STR_CURR_RON :لور يوناني (RON)
STR_CURR_RUR :روبل روسي (RUR)
STR_CURR_SIT :تولار سوفاني (SIT)
STR_CURR_SEK :كرونا سويدية (SEK)
@@ -1199,6 +1198,7 @@ STR_CANT_REMOVE_TRAIN_WAYPOINT :{WHITE}لا ي
STR_BUILD_AUTORAIL_TIP :{BLACK}بناء سكة القطار باستخدام البناء التلقائي
STR_NO_TOWN_IN_SCENARIO :{WHITE}... لا يوجد مدن في هذه الخريطة
STR_COULD_NOT_CREATE_TOWN :{WHITE}مولد الخريطة توقف ... {} ... لا يوجد مواقع مناسبة للمدن
STR_MANY_RANDOM_TOWNS :{BLACK}العديد من المدن العشوائية
STR_RANDOM_TOWNS_TIP :{BLACK}غطي الخريطة عشوائيا بمدن
@@ -2130,6 +2130,7 @@ STR_NUM_VERY_LOW :منخفض جد
STR_6816_LOW :قليل
STR_6817_NORMAL :طبيعي
STR_6818_HIGH :عالي
STR_02BF_CUSTOM :اختياري
STR_6819 :{BLACK}{SMALLLEFTARROW}
STR_681A :{BLACK}{SMALLRIGHTARROW}
STR_681B_VERY_SLOW :بطيء جدا
@@ -2241,6 +2242,7 @@ STR_704A_SELECT_FEMALE_FACES :{BLACK}اختر
STR_704B_GENERATE_RANDOM_NEW_FACE :{BLACK}اختر وجة عشوائي
STR_704C_KEY :{BLACK}مفتاح
STR_704D_SHOW_KEY_TO_GRAPHS :{BLACK}اظهار مفتاح الرسم البياني
STR_SHOW_DETAILED_PERFORMANCE_RATINGS :{BLACK}عرض كامل تفاصيل الأداء
STR_704E_KEY_TO_COMPANY_GRAPHS :{WHITE}مفتاح الشركات في الرسم البياني
STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY :{BLACK}اضغط لعرض/اخفاء الشركة في الرسم
STR_7050_UNITS_OF_CARGO_DELIVERED :{WHITE}عدد الوحدات المنقولة
@@ -2802,7 +2804,7 @@ STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER :{BLACK} الت
STR_885C_BROKEN_DOWN :{RED} متعطل
STR_885D_AGE_RUNNING_COST_YR :{BLACK}العمر: {LTBLUE}{STRING}{BLACK} تكلفة التشغيل: {LTBLUE}{CURRENCY}/سنة
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK} الوزن: {LTBLUE}{WEIGHT_S} {BLACK} الطاقة: {LTBLUE}{POWER}{BLACK} السرعة القصوى: {LTBLUE}{VELOCITY}
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK} الوزن: {LTBLUE}{WEIGHT_S} {BLACK} الطاقة: {LTBLUE}{POWER}{BLACK} السرعة القصوى: {LTBLUE}{VELOCITY} {BLACK} قدرة السحب القصوى: {LTBLUE}{FORCE}
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK} الوزن {LTBLUE}{WEIGHT_S} {BLACK} القوة {LTBLUE}{POWER}{BLACK} السرعة القصوى {LTBLUE}{VELOCITY} {BLACK} قوة السحب القصوى {LTBLUE}{FORCE}
STR_885F_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK} الدخل هذه السنة: {LTBLUE}{CURRENCY} (السنة السابقة{CURRENCY})
STR_8860_RELIABILITY_BREAKDOWNS :{BLACK}الصلاحية: {LTBLUE}{COMMA}% {BLACK} مرات التعطيل منذ الصيانة السابقة: {LTBLUE}{COMMA}
STR_8861_STOPPED :{RED} متوقف
@@ -2855,7 +2857,7 @@ STR_9004_NEW_VEHICLES :{BLACK}عربا
STR_9006_NEW_ROAD_VEHICLES :{WHITE}عربات جديدة
STR_9007_BUILD_VEHICLE :{BLACK}شراء عربة
STR_9009_CAN_T_BUILD_ROAD_VEHICLE :{WHITE}لا يمكن شراء عربة ...
STR_900C_DETAILS :{WHITE}{VEHICLE} )التفاصيل(
STR_900C_DETAILS :{WHITE}{VEHICLE} (التفاصيل)
STR_900D_AGE_RUNNING_COST_YR :{BLACK}العمر: {LTBLUE}{STRING}{BLACK} تكلفة التشغيل: {LTBLUE}{CURRENCY}/سنة
STR_900E_MAX_SPEED :{BLACK}السرعة القصوى: {LTBLUE}{VELOCITY}
STR_900F_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}الدخل هذة السنة: {LTBLUE}{CURRENCY} (السنة الماضية{CURRENCY})
@@ -3170,6 +3172,10 @@ STR_NEWGRF_BROKEN :{WHITE}حركا
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}يغير طول العربة من '{1:ENGINE}' عندما تكون داخل المستودع
STR_BROKEN_VEHICLE_LENGTH :{WHITE} قطار '{VEHICLE}' المملوك ل'{COMPANY}' لدية طول غير مسرح . غالبا نتج عن مشكلة في NewGRF. اللعبة قد تتوقف او تتعطل .
STR_NEWGRF_BUGGY :{WHITE} الرسوميات الجديدة '{0:STRING}' تعطي معلومات غير صحيحة.
STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE} التكلفة \ السعة ل '{1:ENGINE}' تختلف ما بين قائمة الشراء و مابعد البناء. قد يتسبب هذا في فشل التبديل الذاتي.
STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' تسبب بدورة غير منتهية في نداء الانتاج
STR_LOADGAME_REMOVED_TRAMS :{WHITE}اللعبة حفظت بنسخة لا تدعم الترام. كل ما يتعلق بالترام حذف.
STR_CURRENCY_WINDOW :{WHITE}عمله مخصصه
@@ -3239,7 +3245,7 @@ STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK} اعر
STR_REPLACE_REMOVE_WAGON :{BLACK} ازالة العربات: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK} المحافظة على طول القطار بازالة عربات ابتداء من المقدمة عند التبديل - عندما يكون التبدل ينتج قطارا اطول.
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK} تبديل: {ORANGE}{SKIP}{SKIP}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} المميزات التجريبية {} بدل بين اطار المحركات و اطار العربات {} تبديل العربات سوف يكون ممكنا اذا كان يحمل نفس نوع الشحنة السابقة. هذا سيكون لكل العربات عند بدأ التبديل.
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} بدل بين نافذة استبدال المحركات و العربات
STR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}العربة غير متاحة
STR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE} العربات غير متاحة
STR_SHIP_NOT_AVAILABLE :{WHITE} السفن غير متاحة
@@ -3580,6 +3586,7 @@ STR_AI_RANDOM_AI :ذكاء صنا
STR_AI_SETTINGS_CAPTION :{WHITE} خصائص الذكاء الصناعي
STR_AI_AUTHOR :المحرر:
STR_AI_VERSION :النسخة:
STR_AI_PLEASE_REPORT_CRASH :{WHITE} واحد من الذكاء الصناعي فشل. الرجاء ابلاغ المبرمج عنه مصحوبا بصورة من شاشة مصحح الاخطاء.
########
############ town controlled noise level

View File

@@ -608,6 +608,7 @@ STR_CANNOT_GENERATE_TOWN :{WHITE}Impossí
STR_NO_SPACE_FOR_TOWN :{WHITE}...não há mais espaço no mapa
STR_023B_INCREASE_SIZE_OF_TOWN :{BLACK}Aumentar o tamanho da cidade
STR_023C_EXPAND :{BLACK}Expandir
STR_TOWN_EXPAND_WARN_NO_ROADS :{WHITE}A cidade não irá construir estradas. Você pode ativar essa opção através de Config. Avançadas>Economia>Cidades.
STR_023D_RANDOM_TOWN :{BLACK}Cidade Aleatória
STR_023E_BUILD_TOWN_IN_RANDOM_LOCATION :{BLACK}Construir cidade num local aleatório
STR_0285_CAN_T_BUILD_HERE :{WHITE}Impossível construir {STRING} aqui...
@@ -667,7 +668,6 @@ STR_FULL :Completo
STR_02BA :{SILVER}- - {COMPANY} - -
STR_02BB_TOWN_DIRECTORY :Lista de cidades
STR_02BD :{BLACK}{STRING}
STR_02BF_CUSTOM :Personalizado
STR_CHECKMARK :{CHECKMARK}
############ range for menu starts
@@ -786,7 +786,7 @@ STR_TOWNNAME_SWEDISH :Sueco
STR_TOWNNAME_DUTCH :Holandês
STR_TOWNNAME_FINNISH :Finlandês
STR_TOWNNAME_POLISH :Polaco
STR_TOWNNAME_SLOVAKISH :Eslovaco
STR_TOWNNAME_SLOVAK :Eslovaco
STR_TOWNNAME_NORWEGIAN :Noreguês
STR_TOWNNAME_HUNGARIAN :Húngaro
STR_TOWNNAME_AUSTRIAN :Austríaco
@@ -819,7 +819,7 @@ STR_CURR_ITL :Lira Italiana (
STR_CURR_NLG :Guilda Holandesa (NLG)
STR_CURR_NOK :Coroa Norueguesa (NOK)
STR_CURR_PLN :Zloty Polaco (PLN)
STR_CURR_ROL :Lei Romeno (ROL)
STR_CURR_RON :Lei Romeno (RON)
STR_CURR_RUR :Rublo Russo (RUR)
STR_CURR_SIT :Tolar Eslovênio (SIT)
STR_CURR_SEK :Coroa Sueca (SEK)
@@ -1198,6 +1198,7 @@ STR_CANT_REMOVE_TRAIN_WAYPOINT :{WHITE}Impossí
STR_BUILD_AUTORAIL_TIP :{BLACK}Construir ferrovias usando o modo automático
STR_NO_TOWN_IN_SCENARIO :{WHITE}...não existe cidade neste cenário
STR_COULD_NOT_CREATE_TOWN :{WHITE}Geração do mapa abortada... {}... não há locais para criação de cidades
STR_MANY_RANDOM_TOWNS :{BLACK}Várias cidades aleatórias
STR_RANDOM_TOWNS_TIP :{BLACK}Cobrir o mapa com cidades colocadas aleatoriamente
@@ -2129,6 +2130,7 @@ STR_NUM_VERY_LOW :Muito baixo
STR_6816_LOW :Baixo
STR_6817_NORMAL :Normal
STR_6818_HIGH :Alto
STR_02BF_CUSTOM :Personalizado
STR_6819 :{BLACK}{SMALLLEFTARROW}
STR_681A :{BLACK}{SMALLRIGHTARROW}
STR_681B_VERY_SLOW :Muito Lento
@@ -2240,6 +2242,7 @@ STR_704A_SELECT_FEMALE_FACES :{BLACK}Rostos f
STR_704B_GENERATE_RANDOM_NEW_FACE :{BLACK}Gerar novo rosto aleatoriamente
STR_704C_KEY :{BLACK}Legenda
STR_704D_SHOW_KEY_TO_GRAPHS :{BLACK}Exibir legenda dos gráficos
STR_SHOW_DETAILED_PERFORMANCE_RATINGS :{BLACK}Exibir avaliações de performance detalhadas
STR_704E_KEY_TO_COMPANY_GRAPHS :{WHITE}Legendas dos gráficos da empresa
STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY :{BLACK}Clique aqui para alternar exibir/ocultar empresas no gráfico
STR_7050_UNITS_OF_CARGO_DELIVERED :{WHITE}Unidades de carga entregues
@@ -2801,7 +2804,7 @@ STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER :{BLACK}Custo: {
STR_885C_BROKEN_DOWN :{RED}Quebrado
STR_885D_AGE_RUNNING_COST_YR :{BLACK}Idade: {LTBLUE}{STRING}{BLACK} Custo de circulação: {LTBLUE}{CURRENCY}/ano
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Peso: {LTBLUE}{WEIGHT_S} {BLACK}Potência: {LTBLUE}{POWER}{BLACK} Velocidade Máx.: {LTBLUE}{VELOCITY}
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Peso: {LTBLUE}{WEIGHT_S} {BLACK}Potência: {LTBLUE}{POWER}{BLACK} Velocidade: {LTBLUE}{VELOCITY} {BLACK}Manutenção.: {LTBLUE}{FORCE}
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Peso: {LTBLUE}{WEIGHT_S} {BLACK}Força: {LTBLUE}{POWER}{BLACK} Velocidade Max: {LTBLUE}{VELOCITY} {BLACK}Max. T.E.: {LTBLUE}{FORCE}
STR_885F_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Lucro anual: {LTBLUE}{CURRENCY} (último ano: {CURRENCY})
STR_8860_RELIABILITY_BREAKDOWNS :{BLACK}Confiabilidade: {LTBLUE}{COMMA}% {BLACK}Quebras desde a última manutenção: {LTBLUE}{COMMA}
STR_8861_STOPPED :{RED}Parado
@@ -3169,6 +3172,10 @@ STR_NEWGRF_BROKEN :{WHITE} '{0:STR
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Muda o tamanho de um veículo para '{1:ENGINE}' apesar de não estar em um depósito.
STR_BROKEN_VEHICLE_LENGTH :{WHITE}Trem '{VEHICLE}' de '{COMPANY}' tem um tamanho inválido. Provavelmente causado por um NewGRF. O jogo pode travar ou sair de sincronia.
STR_NEWGRF_BUGGY :{WHITE}O NewGRF '{0:STRING}' retorna informação incorreta.
STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}A informação de adaptação para '{1:ENGINE}' difere da lista de compras após a construção. Isso pode causar erros na autosubstituição/autoadaptação.
STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' causou um loop infinito no callback da produção.
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Jogo foi salvo numa versão sem suporte a bondes. Todos os bondes foram removidos.
STR_CURRENCY_WINDOW :{WHITE}Moeda Modificada
@@ -3238,7 +3245,7 @@ STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Exibe o
STR_REPLACE_REMOVE_WAGON :{BLACK}Remoção de vagões: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Faz autosubstituição manter o tamanho do trem removendo vagões (começando pela frente), se ao substituir a locomotiva o trem ficar maior.
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Substituindo: {ORANGE}{SKIP}{SKIP}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} EXPERIMENTAL {}Troca entre substituir máquinas e substituir vagões.{} Só haverá a substituição se puder haver o reacondicionamento para carregar o mesmo tipo de carga. Essa checagem ocorre para cada vagão enquanto a substituição ocorre.
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Troca entre substituir máquinas e substituir vagões
STR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Trem não disponível
STR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Automóvel não disponível
STR_SHIP_NOT_AVAILABLE :{WHITE}Embarcação não disponível
@@ -3579,6 +3586,7 @@ STR_AI_RANDOM_AI :IA Randômica
STR_AI_SETTINGS_CAPTION :{WHITE}Parâmetros da IA
STR_AI_AUTHOR :Progamador:
STR_AI_VERSION :Versão:
STR_AI_PLEASE_REPORT_CRASH :{WHITE}Uma das IA's travou. Favor relatar ao autor da IA com uma screenshot da Janela de Debug da IA.
########
############ town controlled noise level

View File

@@ -668,7 +668,6 @@ STR_FULL :Пълно
STR_02BA :{SILVER}- - {COMPANY} - -
STR_02BB_TOWN_DIRECTORY :Списък от градовете
STR_02BD :{BLACK}{STRING}
STR_02BF_CUSTOM :Изборен
STR_CHECKMARK :{CHECKMARK}
############ range for menu starts
@@ -786,7 +785,7 @@ STR_TOWNNAME_SWEDISH :шведски
STR_TOWNNAME_DUTCH :холандски
STR_TOWNNAME_FINNISH :финландски
STR_TOWNNAME_POLISH :полски
STR_TOWNNAME_SLOVAKISH :словашки
STR_TOWNNAME_SLOVAK :словашки
STR_TOWNNAME_NORWEGIAN :норвежки
STR_TOWNNAME_HUNGARIAN :унгарски
STR_TOWNNAME_AUSTRIAN :австрийски
@@ -819,7 +818,7 @@ STR_CURR_ITL :италиан
STR_CURR_NLG :холандски гулден (NLG)
STR_CURR_NOK :норвежка крона (NOK)
STR_CURR_PLN :полска злота (PLN)
STR_CURR_ROL :румънска лея (ROL)
STR_CURR_RON :румънска лея (RON)
STR_CURR_RUR :руска рубла (RUR)
STR_CURR_SIT :словенски толар (SIT)
STR_CURR_SEK :шведска крона (SEK)
@@ -916,6 +915,8 @@ STR_CONFIG_SETTING_AUTOSLOPE :{LTBLUE}Тер
STR_CONFIG_SETTING_CATCHMENT :{LTBLUE}По-реалистична зона за обслужване: {ORANGE}{STRING}
STR_CONFIG_SETTING_EXTRADYNAMITE :{LTBLUE}Разрушаване на повече градска собственост: {ORANGE}{STRING.n}
STR_CONFIG_SETTING_MAMMOTHTRAINS :{LTBLUE}Много дълги влакове: {ORANGE}{STRING.p}
STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL_ORIGINAL :Оригинален
STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL_REALISTIC :Реалистичен
STR_CONFIG_SETTING_FORBID_90_DEG :{LTBLUE}Забрана 90 градусови завои: {ORANGE}{STRING.f}{LTBLUE} (трябва NPF)
STR_CONFIG_SETTING_JOINSTATIONS :{LTBLUE}Обединяване на гари построени една до друга: {ORANGE}{STRING}
STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :{LTBLUE}Позволено е присъединяването на станции, които не се допират: {ORANGE}{STRING}
@@ -1059,6 +1060,7 @@ STR_CONFIG_SETTING_DISABLE_ELRAILS :{LTBLUE}Без
STR_CONFIG_SETTING_COLOURED_NEWS_YEAR :{LTBLUE}Цветни нови се появяват през: {ORANGE}{STRING}
STR_CONFIG_SETTING_STARTING_YEAR :{LTBLUE}Начална година: {ORANGE}{STRING}
STR_CONFIG_SETTING_ALLOW_SHARES :{LTBLUE}Разреши купуване на акции от други компании: {ORANGE}{STRING}
STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :{LTBLUE}Поставяне семафори всеки: {ORANGE}{STRING} плочк{P а и}
STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE :{LTBLUE}Поставяне на семафори преди: {ORANGE}{STRING} година
STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI :{LTBLUE}Инструменти за сигналите: {ORANGE}{STRING.p}
@@ -1071,11 +1073,13 @@ STR_CONFIG_SETTING_CYCLE_SIGNAL_NORMAL :Само нор
STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :Само напреднат
STR_CONFIG_SETTING_CYCLE_SIGNAL_ALL :Всички
STR_CONFIG_SETTING_TOWN_LAYOUT :{LTBLUE}Пътно оформление за нови градове: {ORANGE}{STRING}
STR_CONFIG_SETTING_TOWN_LAYOUT_DEFAULT :default
STR_CONFIG_SETTING_TOWN_LAYOUT_BETTER_ROADS :по-добри пътища
STR_CONFIG_SETTING_TOWN_LAYOUT_2X2_GRID :2х2 мрежа
STR_CONFIG_SETTING_TOWN_LAYOUT_3X3_GRID :3х3 мрежа
STR_CONFIG_SETTING_TOWN_LAYOUT_RANDOM :случаен
STR_CONFIG_SETTING_ALLOW_TOWN_ROADS :{LTBLUE}Градове са разрешени да изграждат пътища: {ORANGE}{STRING}
STR_CONFIG_SETTING_NOISE_LEVEL :{LTBLUE}Градовете контролират нивото на шум от летищата: {ORANGE}{STRING}
STR_CONFIG_SETTING_TOOLBAR_POS :{LTBLUE}Позиция на лентата за инструменти: {ORANGE}{STRING}
@@ -1102,6 +1106,15 @@ STR_CONFIG_SETTING_VEHICLES :{ORANGE}Авт
STR_CONFIG_SETTING_STATIONS :{ORANGE}Станции
STR_CONFIG_SETTING_ECONOMY :{ORANGE}Икономика
STR_CONFIG_SETTING_AI :{ORANGE}Съперници
STR_CONFIG_SETTING_DISPLAY_OPTIONS :{ORANGE}Покажи опциите
STR_CONFIG_SETTING_INTERACTION :{ORANGE}Взаимодействие
STR_CONFIG_SETTING_CONSTRUCTION_SIGNALS :{ORANGE}Сигнали
STR_CONFIG_SETTING_STATIONS_CARGOHANDLING :{ORANGE}Обработката на товари
STR_CONFIG_SETTING_AI_NPC :{ORANGE}Компютърни играчи
STR_CONFIG_SETTING_VEHICLES_ROUTING :{ORANGE}Маршрутизация
STR_CONFIG_SETTING_VEHICLES_TRAINS :{ORANGE}Влакове
STR_CONFIG_SETTING_ECONOMY_TOWNS :{ORANGE}Градове
STR_CONFIG_SETTING_ECONOMY_INDUSTRIES :{ORANGE}Индустрии
STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS :{LTBLUE}Пътенамирач за влакове: {ORANGE}{STRING}
STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS_NTP :NTP {RED}(не се препоръчва)
@@ -1407,6 +1420,7 @@ STR_NETWORK_GIVE_MONEY_CAPTION :{WHITE}Въве
STR_NETWORK_NEED_GAME_PASSWORD_CAPTION :{WHITE}Сървъра е защитен. Въведете парола
STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}Компанията е защитена. Въведете парола
STR_NETWORK_CLIENT_LIST :{WHITE}Списък с играчите
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Нова Фирма
STR_NETWORK_ERR_NOTAVAILABLE :{WHITE} Не са открити мрежови устройства или е компилирано без ENABLE_NETWORK
STR_NETWORK_ERR_NOSERVER :{WHITE} Не може да открия мрежови игри
@@ -1655,6 +1669,7 @@ STR_200B_CENTER_THE_MAIN_VIEW_ON :{BLACK}Цент
STR_200C_CHANGE_TOWN_NAME :{BLACK}Промяна на име на град
STR_200D_PASSENGERS_LAST_MONTH_MAX :{BLACK}Пасажери през последния месец: {ORANGE}{COMMA}{BLACK} максимум: {ORANGE}{COMMA}
STR_200E_MAIL_LAST_MONTH_MAX :{BLACK}Поща през последния месец: {ORANGE}{COMMA}{BLACK} максимум: {ORANGE}{COMMA}
STR_CARGO_FOR_TOWNGROWTH_REQUIRED :{SETX 20}{ORANGE}{STRING}{BLACK} необходим
STR_200F_TALL_OFFICE_BLOCK :Висока офис сграда
STR_2010_OFFICE_BLOCK :Офис сграда
STR_2011_SMALL_BLOCK_OF_FLATS :Малък жилищен блок
@@ -2095,6 +2110,7 @@ STR_NUM_VERY_LOW :мн. малк
STR_6816_LOW :малко
STR_6817_NORMAL :нормално
STR_6818_HIGH :голямо
STR_02BF_CUSTOM :Изборен
STR_6819 :{BLACK}{SMALLLEFTARROW}
STR_681A :{BLACK}{SMALLRIGHTARROW}
STR_681B_VERY_SLOW :много бавно
@@ -3063,6 +3079,7 @@ STR_PERFORMANCE_DETAIL_LOAN_TIP :{BLACK}Сума
STR_PERFORMANCE_DETAIL_TOTAL_TIP :{BLACK}Натрупани точки от общия възможен брой
STR_NEWGRF_SETTINGS_BUTTON :{BLACK}NewGRF настройки
STR_NEWGRF_SETTINGS_BUTTON_TIP :{BLACK}Покажи NewGRF настройки
STR_NEWGRF_SETTINGS_CAPTION :{WHITE}Newgrf настройки
STR_NEWGRF_APPLY_CHANGES :{BLACK}Прилагане на промените
STR_NEWGRF_TOGGLE_PALETTE :{BLACK}Превключване на палитрата
@@ -3092,6 +3109,7 @@ STR_NEWGRF_ERROR_UNEXPECTED_SPRITE :Unexpected spri
STR_NEWGRF_ERROR_UNKNOWN_PROPERTY :Unknown Action 0 property.
STR_NEWGRF_ERROR_INVALID_ID :Attempt to use invalid ID.
STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} съдържа повреден обект. Вскички повредени обекти ще бъдат показани като червена въпросителна (?).
STR_NEWGRF_ERROR_MULTIPLE_ACTION_8 :Съдържа множество Действие 8 вписвания.
STR_NEWGRF_PRESET_LIST_TIP :{BLACK}Зареди избрания шаблон
STR_NEWGRF_PRESET_SAVE :{BLACK}Запиши шаблон
@@ -3132,6 +3150,8 @@ STR_NEWGRF_BROKEN :{WHITE}Пове
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Смяна на дължината на превозното средство '{1:ENGINE}', когато не е в депо.
STR_BROKEN_VEHICLE_LENGTH :{WHITE}Влак '{VEHICLE}' на '{COMPANY}' има невалидна дължина. Това вероятно е породено от проблеми с NewGRFs. Играта може да загуби синхронизация или да забие.
STR_NEWGRF_BUGGY :{WHITE}NewGRF '{STRING}' дава невярна информация.
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Играта бе записана във версия без поддръжка на трамваи. Всички трамваи са изтрити.
STR_CURRENCY_WINDOW :{WHITE}Парична единица
@@ -3201,7 +3221,7 @@ STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Пока
STR_REPLACE_REMOVE_WAGON :{BLACK}Премахване на вагон: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Автоматичната замяна ще запази дължината на влака като премахне вагони (започвайки от предните), ако замяната довежда до по-дълъг влак.
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Замяна: {ORANGE}{SKIP}{SKIP}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} ЕКСПЕРИМЕНТАЛНА ВЪЗМОЖНОСТ {}Превключване между замяна на локомотиви и вагони.{}Замяната на вагони ще бъде направена само ако новия тип вагони може да се преустрои да превозва същия тип товар като старите. Това се проверява за всеки вагон когато замяната се случва.
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Превключване между замяна на локомотиви и вагони
STR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Превозното средство не е на разположение
STR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Превозното средство не е на разположение
STR_SHIP_NOT_AVAILABLE :{WHITE}Корабът не е на разположение
@@ -3318,6 +3338,13 @@ STR_SMALLMAP_CENTER :{BLACK}Цент
STR_SMALLMAP_INDUSTRY :{TINYFONT}{STRING} ({NUM})
# Strings for map borders at game generation
STR_NORTHWEST :{BLACK}Северозапад
STR_NORTHEAST :{BLACK}Североизток
STR_SOUTHEAST :{BLACK}Югоизток
STR_SOUTHWEST :{BLACK}Югозапад
STR_BORDER_WATER :{BLACK}Вода
STR_BORDER_RANDOM :{BLACK}Случаен
STR_BORDER_RANDOMIZE :{BLACK}Случаен
########### String for new airports
STR_SMALL_AIRPORT :{BLACK}Малко
@@ -3506,6 +3533,25 @@ STR_OSK_KEYBOARD_LAYOUT_CAPS :~!?+"%=:/_№І
########
############ AI GUI
STR_AI_SETTINGS_BUTTON :{BLACK}AI Настройки
STR_AI_SETTINGS_BUTTON_TIP :{BLACK}Покажи AI настройки
STR_AI_DEBUG_NAME_TIP :{BLACK}Име на AI
STR_AI_DEBUG_RELOAD :{BLACK}Презареждане AI
STR_AI_CONFIG_CAPTION :{WHITE}AI Конфигурация
STR_AI_CHANGE :{BLACK}Изберете AI
STR_AI_CONFIGURE :{BLACK}Конфигуриране
STR_AI_CHANGE_TIP :{BLACK}Зареди друг AI
STR_AI_CONFIGURE_TIP :{BLACK}Конфигурирайте параметрите на AI
STR_AI_AILIST_TIP :{BLACK}Кликнете за да изберете AI
STR_AI_ACCEPT :{BLACK}Приеми
STR_AI_CANCEL :{BLACK}Отмени
STR_AI_CANCEL_TIP :{BLACK}Не променяй AI
STR_AI_CLOSE :{BLACK}Затвари
STR_AI_HUMAN_PLAYER :Човешки играч
STR_AI_RANDOM_AI :Случаен AI
STR_AI_SETTINGS_CAPTION :{WHITE}AI Параметри
STR_AI_AUTHOR :Автор:
STR_AI_VERSION :Версия:
########
############ town controlled noise level
@@ -3514,6 +3560,38 @@ STR_STATION_NOISE :{BLACK}Прои
########
############ Downloading of content from the central server
STR_CONTENT_TYPE_NEWGRF :NewGRF
STR_CONTENT_TYPE_AI :AI
STR_CONTENT_TYPE_AI_LIBRARY :AI библиотека
STR_CONTENT_TYPE_SCENARIO :Сценарий
STR_CONTENT_TYPE_CAPTION :{BLACK}Вид
STR_CONTENT_TYPE_CAPTION_TIP :{BLACK}Вид на съдържанието
STR_CONTENT_NAME_CAPTION :{BLACK}Име
STR_CONTENT_NAME_CAPTION_TIP :{BLACK}Име на съдържанието
STR_CONTENT_MATRIX_TIP :{BLACK}Кликни върху линията за да видиш детайлите{}Сложи отметка за да избереш за сваляне
STR_CONTENT_SELECT_ALL_CAPTION :{BLACK}Избери всички
STR_CONTENT_SELECT_ALL_CAPTION_TIP :{BLACK}Избери всичко за сваляне
STR_CONTENT_SELECT_UPDATES_CAPTION :{BLACK}Избери обновявания
STR_CONTENT_SELECT_UPDATES_CAPTION_TIP :{BLACK}Избери всичко, което ще обновнови вече инстралирани компоненти
STR_CONTENT_UNSELECT_ALL_CAPTION :{BLACK}Премахнете всички
STR_CONTENT_UNSELECT_ALL_CAPTION_TIP :{BLACK}Размаркирай всичко
STR_CONTENT_FILTER_OSKTITLE :{BLACK}Въведете филтър
STR_CONTENT_FILTER_TIP :{BLACK}Въведете ключова дума за филтър на списъка
STR_CONTENT_FILTER_TITLE :{BLACK}Филтър по таг/име:
STR_CONTENT_DOWNLOAD_CAPTION :{BLACK}Сваляне
STR_CONTENT_DOWNLOAD_CAPTION_TIP :{BLACK}Започни свалянето на избраните модули
STR_CONTENT_TOTAL_DOWNLOAD_SIZE :{SILVER}Общо за сваляне: {WHITE}{BYTES}
STR_CONTENT_DETAIL_TITLE :{SILVER}ИНФОРМАЦИЯ
STR_CONTENT_DETAIL_SUBTITLE_UNSELECTED :{SILVER}Не сте избрали този модул за сваляне
STR_CONTENT_DETAIL_SUBTITLE_ALREADY_HERE :{SILVER}Вие вече имате това
STR_CONTENT_DETAIL_UPDATE :{SILVER}Това е подмяна на съществуващ {STRING}
STR_CONTENT_DETAIL_NAME :{SILVER}Име: {WHITE}{STRING}
STR_CONTENT_DETAIL_VERSION :{SILVER}Версия: {WHITE}{STRING}
STR_CONTENT_DETAIL_DESCRIPTION :{SILVER}Описание: {WHITE}{STRING}
STR_CONTENT_DETAIL_URL :{SILVER}URL: {WHITE}{STRING}
STR_CONTENT_DETAIL_TYPE :{SILVER}Вид: {WHITE}{STRING}
STR_CONTENT_DETAIL_SELECTED_BECAUSE_OF :{SILVER}Избрани поради: {WHITE}{STRING}
STR_CONTENT_DETAIL_DEPENDENCIES :{SILVER}Зависимости: {WHITE}{STRING}

View File

@@ -785,7 +785,7 @@ STR_TOWNNAME_SWEDISH :Suec
STR_TOWNNAME_DUTCH :Holandès
STR_TOWNNAME_FINNISH :Finès
STR_TOWNNAME_POLISH :Polonès
STR_TOWNNAME_SLOVAKISH :Eslovac
STR_TOWNNAME_SLOVAK :Eslovac
STR_TOWNNAME_NORWEGIAN :Noruec
STR_TOWNNAME_HUNGARIAN :Hongarès
STR_TOWNNAME_AUSTRIAN :Austríac
@@ -818,7 +818,7 @@ STR_CURR_ITL :Lires Italianes
STR_CURR_NLG :Florins Holandesos (NLG)
STR_CURR_NOK :Corones Noruegues (NOK)
STR_CURR_PLN :Zloty Polonès (PLN)
STR_CURR_ROL :Leu Romanès (ROL)
STR_CURR_RON :Leu Romanès (RON)
STR_CURR_RUR :Rubles Russos (RUR)
STR_CURR_SIT :Tòlar Eslovè (SIT)
STR_CURR_SEK :Corones Sueques (SEK)
@@ -2241,6 +2241,7 @@ STR_704A_SELECT_FEMALE_FACES :{BLACK}Seleccio
STR_704B_GENERATE_RANDOM_NEW_FACE :{BLACK}Genera una nova cara aleatòria
STR_704C_KEY :{BLACK}Llegenda
STR_704D_SHOW_KEY_TO_GRAPHS :{BLACK}Mostra la llegenda als gràfics
STR_SHOW_DETAILED_PERFORMANCE_RATINGS :{BLACK}Mostra ratis de rendiment detallats
STR_704E_KEY_TO_COMPANY_GRAPHS :{WHITE}Llegenda dels gràfics de la companyia
STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY :{BLACK}Clica aquí per activar/desactivar l'entrada als gràfics de la companyia
STR_7050_UNITS_OF_CARGO_DELIVERED :{WHITE}Unitats de càrrega entregada
@@ -2615,18 +2616,18 @@ STR_ORDER_GO_TO :Ves a
STR_ORDER_GO_NON_STOP_TO :Ves sense parar a
STR_ORDER_GO_VIA :Ves via
STR_ORDER_GO_NON_STOP_VIA :Ves sense parar via
STR_ORDER_TOGGLE_FULL_LOAD :{BLACK}Càrrega completa de qualsevol càrrega
STR_ORDER_TOGGLE_FULL_LOAD :{BLACK}Carrega del tot qualsevol càrrega
STR_ORDER_DROP_LOAD_IF_POSSIBLE :Carrega si està disponible
STR_ORDER_DROP_FULL_LOAD_ALL :Carrega del tot totes les càrregues
STR_ORDER_DROP_FULL_LOAD_ANY :Càrrega completa de qualsevol càrrega
STR_ORDER_DROP_FULL_LOAD_ANY :Carrega del tot qualsevol càrrega
STR_ORDER_DROP_NO_LOADING :No carreguis
STR_ORDER_TOGGLE_UNLOAD :{BLACK}Descarrega tot
STR_ORDER_DROP_UNLOAD_IF_ACCEPTED :Descarrega si s'accepta
STR_ORDER_DROP_UNLOAD :Descarrega tot
STR_ORDER_DROP_TRANSFER :Transfereix
STR_ORDER_DROP_NO_UNLOADING :No descarreguis
STR_ORDER_FULL_LOAD :(Càrrega completa)
STR_ORDER_FULL_LOAD_ANY :(Càrrega completa de qualsevol càrrega)
STR_ORDER_FULL_LOAD :(Carrega del tot)
STR_ORDER_FULL_LOAD_ANY :(Carrega del tot qualsevol càrrega)
STR_ORDER_NO_LOAD :(No carregar)
STR_ORDER_UNLOAD :(Descarrega i agafa la càrrega)
STR_ORDER_UNLOAD_FULL_LOAD :(Descarrega i espera carregar del tot)
@@ -2802,7 +2803,7 @@ STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER :{BLACK}Cost: {C
STR_885C_BROKEN_DOWN :{RED}Avariat
STR_885D_AGE_RUNNING_COST_YR :{BLACK}Edat: {LTBLUE}{STRING}{BLACK} Cost de Circulació: {LTBLUE}{CURRENCY}/any
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Pes: {LTBLUE}{WEIGHT_S} {BLACK}Potència: {LTBLUE}{POWER}{BLACK} Vel. Max.: {LTBLUE}{VELOCITY}
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Pes: {LTBLUE}{WEIGHT_S} {BLACK}Potència: {LTBLUE}{POWER}{BLACK} Velocitat Max.: {LTBLUE}{VELOCITY} {BLACK}Max. T.E.: {LTBLUE}{FORCE}
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Pes: {LTBLUE}{WEIGHT_S} {BLACK}Potència: {LTBLUE}{POWER}{BLACK} Vel. Max: {LTBLUE}{VELOCITY} {BLACK}T.E. Max.: {LTBLUE}{FORCE}
STR_885F_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Benefici enguany: {LTBLUE}{CURRENCY} (darrer any: {CURRENCY})
STR_8860_RELIABILITY_BREAKDOWNS :{BLACK}Rendibilitat: {LTBLUE}{COMMA}% {BLACK}Avaries des de l'últim manteniment: {LTBLUE}{COMMA}
STR_8861_STOPPED :{RED}Parat
@@ -3172,6 +3173,7 @@ STR_BROKEN_VEHICLE_LENGTH :{WHITE}El tren
STR_NEWGRF_BUGGY :{WHITE}El NewGRF '{0:STRING}' està donant informació incorrecta.
STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}La informació de càrrega/remodelació per '{1:ENGINE}' no encaixa amb la llista de compres després de la construcció. Això podria causar un mal funcionament de autorenov/-substitueix.
STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' ha provocat un bucle infinit en la crida de producció.
STR_LOADGAME_REMOVED_TRAMS :{WHITE}El joc s'ha desat en una versió sense suport de tramvies. Tots els tramvies s'han eliminat.
@@ -3242,7 +3244,7 @@ STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Mostra q
STR_REPLACE_REMOVE_WAGON :{BLACK}Treure vagons: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Fer que la substitució automàtica mantingui la llargària del tren eliminant vagons (començant pel front), si substituint la màquina el tren es fa més llarg
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Substituint: {ORANGE}{SKIP}{SKIP}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} CARACTERÍSTICA EXPERIMENTAL {}Alterna entre finestres de substitució de vagons i de motors{}La substitució del vagó només tindrà lloc si el nou vagó pot ser remodelat per admetre el mateix tipus de càrrega que el vell. Això es comprova per a cada vagó quan la substitució es produeix.
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Alterna entre finestres de substitució de vagons i de motors
STR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}El tren no està disponible
STR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}El vehicle no està disponible
STR_SHIP_NOT_AVAILABLE :{WHITE}El vaixell no està disponible

View File

@@ -672,6 +672,7 @@ STR_CANNOT_GENERATE_TOWN :{WHITE}Nije mog
STR_NO_SPACE_FOR_TOWN :{WHITE}...nema više mjesta na karti
STR_023B_INCREASE_SIZE_OF_TOWN :{BLACK}Povećaj veličinu grada
STR_023C_EXPAND :{BLACK}Proširi
STR_TOWN_EXPAND_WARN_NO_ROADS :{WHITE}Grad neće graditi ceste. Možete uključiti gradnju cesta putem Naprednih postavki -> Ekonomija -> Gradovi
STR_023D_RANDOM_TOWN :{BLACK}Nasumičan grad
STR_023E_BUILD_TOWN_IN_RANDOM_LOCATION :{BLACK}Izgradi grad na nasumično odabranom pložaju
STR_0285_CAN_T_BUILD_HERE :{WHITE}Ovdje nije moguće izgraditi {STRING}...
@@ -731,7 +732,6 @@ STR_FULL :Puno
STR_02BA :{SILVER}- - {COMPANY} - -
STR_02BB_TOWN_DIRECTORY :Popis gradova
STR_02BD :{BLACK}{STRING}
STR_02BF_CUSTOM :Proizvoljno
STR_CHECKMARK :{CHECKMARK}
############ range for menu starts
@@ -850,7 +850,7 @@ STR_TOWNNAME_SWEDISH :Švedski
STR_TOWNNAME_DUTCH :Nizozemski
STR_TOWNNAME_FINNISH :Finski
STR_TOWNNAME_POLISH :Poljski
STR_TOWNNAME_SLOVAKISH :Slovački
STR_TOWNNAME_SLOVAK :Slovački
STR_TOWNNAME_NORWEGIAN :Norveški
STR_TOWNNAME_HUNGARIAN :Mađarski
STR_TOWNNAME_AUSTRIAN :Austrijski
@@ -883,7 +883,7 @@ STR_CURR_ITL :Talijanska lira
STR_CURR_NLG :Nizozemski gulden (NLG)
STR_CURR_NOK :Norveška kruna (NOK)
STR_CURR_PLN :Poljski zloti (PLN)
STR_CURR_ROL :Rumunjski lev (ROL)
STR_CURR_RON :Rumunjski lev (RON)
STR_CURR_RUR :Ruske rublje (RUR)
STR_CURR_SIT :Slovenski tolar (SIT)
STR_CURR_SEK :Švedska kruna (SEK)
@@ -1012,8 +1012,10 @@ STR_CONFIG_SETTING_NONUNIFORM_STATIONS :{LTBLUE}Neujedn
STR_CONFIG_SETTING_FREIGHT_TRAINS :{LTBLUE}Težinski množitelj za teret za simulaciju teških vlakova: {ORANGE}{STRING}
STR_CONFIG_SETTING_PLANE_SPEED :{LTBLUE}Faktor brzine zrakoplova: {ORANGE}1/{STRING}
STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :{LTBLUE}Dopusti prolazne postaje na cestama u vlasništvu gradova: {ORANGE}{STRING}
STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :{LTBLUE}Dozboli prolazne znakove na cestama koje su vlasništvo konkurencije: {ORANGE}{STRING}
STR_CONFIG_SETTING_ADJACENT_STATIONS :{LTBLUE}Dopusti izgradnju pridruženih postaja: {ORANGE}{STRING}
STR_CONFIG_SETTING_DYNAMIC_ENGINES :{LTBLUE}Omogući više NewGRF setova strojeva: {ORANGE}{STRING}
STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Mjenjanje ovih postavki nije moguće kad postoje vozila
STR_CONFIG_SETTING_SMALL_AIRPORTS :{LTBLUE}Uvijek dopusti male zračne luke: {ORANGE}{STRING}
@@ -1261,6 +1263,7 @@ STR_CANT_REMOVE_TRAIN_WAYPOINT :{WHITE}Nije mog
STR_BUILD_AUTORAIL_TIP :{BLACK}Izgradi željezničku prugu koristeći Autorail način
STR_NO_TOWN_IN_SCENARIO :{WHITE}...u ovom scenariju nema gradova
STR_COULD_NOT_CREATE_TOWN :{WHITE}Generiranje karte prekinuto...{}...ne postoje prigodne lokacije za gradove
STR_MANY_RANDOM_TOWNS :{BLACK}Mnogo nasumičnih gradova
STR_RANDOM_TOWNS_TIP :{BLACK}Popuni kartu nasumično raspoređenim gradovima
@@ -1749,6 +1752,9 @@ STR_200B_CENTER_THE_MAIN_VIEW_ON :{BLACK}Centrira
STR_200C_CHANGE_TOWN_NAME :{BLACK}Promijeni ime grada
STR_200D_PASSENGERS_LAST_MONTH_MAX :{BLACK}Putnika prošli mjesec: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA}
STR_200E_MAIL_LAST_MONTH_MAX :{BLACK}Pošte prošli mjesec: {ORANGE}{COMMA}{BLACK} maks: {ORANGE}{COMMA}
STR_CARGO_FOR_TOWNGROWTH :{BLACK}Potrebno tereta za rast grada:
STR_CARGO_FOR_TOWNGROWTH_REQUIRED :{SETX 20}{ORANGE}{STRING}{BLACK} potrebno
STR_CARGO_FOR_TOWNGROWTH_LAST_MONTH :{SETX 20}{ORANGE}{CARGO}{BLACK} isporučeno prošli mjesec
STR_200F_TALL_OFFICE_BLOCK :Visoki uredski blok
STR_2010_OFFICE_BLOCK :Uredski blok
STR_2011_SMALL_BLOCK_OF_FLATS :Mali stambeni blok
@@ -2189,6 +2195,7 @@ STR_NUM_VERY_LOW :Vrlo nisko
STR_6816_LOW :Nisko
STR_6817_NORMAL :Normalno
STR_6818_HIGH :Visoko
STR_02BF_CUSTOM :Proizvoljno
STR_6819 :{BLACK}{SMALLLEFTARROW}
STR_681A :{BLACK}{SMALLRIGHTARROW}
STR_681B_VERY_SLOW :Vrlo sporo
@@ -3229,6 +3236,9 @@ STR_NEWGRF_BROKEN :{WHITE}Ponašan
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Ovo mijenja dužinu vozila za '{1:ENGINE}' kada vozilo nije unutar spremišta.
STR_BROKEN_VEHICLE_LENGTH :{WHITE}Vlak'{VEHICLE}' koji pripada tvrtci '{COMPANY}' neispravne je dužine. Uzrok problema je vjerojatno u NewGRF-ovima. Igra će se možda deharmonizirati ili srušiti.
STR_NEWGRF_BUGGY :{WHITE}NewGRF '{0:STRING}' daje netočne informacije.
STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Informacija tereta/obnavljanja za '{1:ENGINE}' je različita od kupovne liste nakon konstrukcije. Zbog toga bi automatsko obnavljanje/zamjena mogla biti neuspješna
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Igra je bila spremljena u verziji bez podrške za tramvaje. Zbog toga su svi tramvaji uklonjeni.
STR_CURRENCY_WINDOW :{WHITE}Proizvoljna valuta
@@ -3298,7 +3308,7 @@ STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Prikazuj
STR_REPLACE_REMOVE_WAGON :{BLACK}Uklanjanje vagona: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Ukoliko bi zamjena lokomotive učinla vlak dužim, neka automatska zamjena zadrži istu dužinu vlaka tako da ukloni suvišne vagone (počevši od naprijed).
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Zamjenjujem:{ORANGE}{SKIP}{SKIP}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} POKUSNA FUNKCIJA {} Prebaci između prozora za izmjenu lokomotiva i vagona.{}Izmjena vagona izvršit će se samo ako novi vagon može biti prenamijenjen za prijevoz istog tipa tereta kao i stari vagon. Ovo se provjerava za svaki vagon kada se stvarna zamjena odvija.
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Prebaci između prozora za izmjenu lokomotiva i vagona
STR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Vozilo nije dostupno
STR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Vozilo nije dostupno
STR_SHIP_NOT_AVAILABLE :{WHITE}Brod nije dostupan
@@ -3639,6 +3649,7 @@ STR_AI_RANDOM_AI :Nasumična UI
STR_AI_SETTINGS_CAPTION :{WHITE}Parametri UI
STR_AI_AUTHOR :Autor:
STR_AI_VERSION :Verzija:
STR_AI_PLEASE_REPORT_CRASH :{WHITE}Jedan od igrača sa UI se srušio. Molimo vas da prijavite ovo autoru UI sa screenshotom AI Debug prozora
########
############ town controlled noise level

View File

@@ -3,7 +3,7 @@
##isocode cs_CZ
##winlangid 0x0405
##grflangid 0x15
##plural 6
##plural 10
##case nom gen dat acc voc loc ins big small
##gender m f n
@@ -853,7 +853,7 @@ STR_TOWNNAME_SWEDISH :Švédská
STR_TOWNNAME_DUTCH :Holandská
STR_TOWNNAME_FINNISH :Finská
STR_TOWNNAME_POLISH :Polská
STR_TOWNNAME_SLOVAKISH :Slovenská
STR_TOWNNAME_SLOVAK :Slovenská
STR_TOWNNAME_NORWEGIAN :Norská
STR_TOWNNAME_HUNGARIAN :Maďarská
STR_TOWNNAME_AUSTRIAN :Rakouská
@@ -886,7 +886,7 @@ STR_CURR_ITL :Italská lira (
STR_CURR_NLG :Holandský gulden (NLG)
STR_CURR_NOK :Norská koruna (NOK)
STR_CURR_PLN :Polský zlotý (PLN)
STR_CURR_ROL :Rumunský lei (ROL)
STR_CURR_RON :Rumunský lei (RON)
STR_CURR_RUR :Ruský rubl (RUR)
STR_CURR_SIT :Slovinský tolar (SIT)
STR_CURR_SEK :Švédská koruna (SEK)
@@ -1022,9 +1022,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Toto nas
STR_CONFIG_SETTING_SMALL_AIRPORTS :{LTBLUE}Malá letiště se budou moci stále stavět: {ORANGE}{STRING}
STR_CONFIG_SETTING_WARN_LOST_TRAIN :{LTBLUE}Varovat, pokud vlak nenajde cestu: {ORANGE}{STRING}
STR_CONFIG_SETTING_ORDER_REVIEW :{LTBLUE}Obnovení příkazů vozidla: {ORANGE}{STRING}
STR_CONFIG_SETTING_ORDER_REVIEW :{LTBLUE}Kontrolovat příkazy vozidel: {ORANGE}{STRING}
STR_CONFIG_SETTING_ORDER_REVIEW_OFF :ne
STR_CONFIG_SETTING_ORDER_REVIEW_EXDEPOT :ano, kromě zastavených vozidel (v depu)
STR_CONFIG_SETTING_ORDER_REVIEW_EXDEPOT :ano, kromě zastavených vozidel
STR_CONFIG_SETTING_ORDER_REVIEW_ON :ano, u všech vozidel
STR_CONFIG_SETTING_WARN_INCOME_LESS :{LTBLUE}Varovat, pokud vozidlo prodělává: {ORANGE}{STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :{LTBLUE}Vozidlům se nikdy nezastaví výroba ('nezastarají'): {ORANGE}{STRING}
@@ -1211,8 +1211,8 @@ STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_OPF :původní {BLUE
STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_NPF :NPF
STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_YAPF :YAPF {RED}(nedoporučuje se)
STR_CONFIG_SETTING_MAP_X :{LTBLUE}Rozmer X mapy: {ORANGE}{STRING}
STR_CONFIG_SETTING_MAP_Y :{LTBLUE}Rozmer Y mapy: {ORANGE}{STRING}
STR_CONFIG_SETTING_MAP_X :{LTBLUE}Šířka mapy: {ORANGE}{STRING}
STR_CONFIG_SETTING_MAP_Y :{LTBLUE}Výška mapy: {ORANGE}{STRING}
############ generic strings for settings
STR_CONFIG_SETTING_DISABLED :vypnuto
@@ -1553,7 +1553,7 @@ STR_NETWORK_SERVER_MESSAGE_GAME_UNPAUSED_CONNECT_FAIL :Hra pozastavena
STR_NETWORK_CLIENT_LEAVING :odpojování
STR_NETWORK_CLIENT_JOINED :*** {STRING} jde hrát
STR_NETWORK_CLIENT_COMPANY_JOIN :*** {STRING} se přidává ke společnosti č. {2:NUM}
STR_NETWORK_CLIENT_COMPANY_SPECTATE :*** {STRING} má nové pozorovatele
STR_NETWORK_CLIENT_COMPANY_SPECTATE :*** {STRING} se stává pozorovatelem
STR_NETWORK_CLIENT_COMPANY_NEW :*** {STRING} zakládá novou společnost (č. {2:NUM})
STR_NETWORK_CLIENT_LEFT :*** {STRING} opouští hru ({2:STRING})
STR_NETWORK_NAME_CHANGE :*** {STRING} si mění jméno na {STRING}
@@ -2309,6 +2309,7 @@ STR_704A_SELECT_FEMALE_FACES :{BLACK}Zvolit
STR_704B_GENERATE_RANDOM_NEW_FACE :{BLACK}Vytvořit náhodnou novou tvář
STR_704C_KEY :{BLACK}Legenda
STR_704D_SHOW_KEY_TO_GRAPHS :{BLACK}Ukázat legendu ke grafům
STR_SHOW_DETAILED_PERFORMANCE_RATINGS :{BLACK}Zobrazit podrobné hodnocení výkonu
STR_704E_KEY_TO_COMPANY_GRAPHS :{WHITE}Legenda ke grafům společností
STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY :{BLACK}Klepni zde pro přepnuti zobrazení společnosti na grafu
STR_7050_UNITS_OF_CARGO_DELIVERED :{WHITE}Doručeno jednotek zboží
@@ -3183,7 +3184,7 @@ STR_NEWGRF_FILENAME :{BLACK}Jméno s
STR_NEWGRF_PALETTE :{BLACK}Paleta: {SILVER}{STRING}
STR_NEWGRF_GRF_ID :{BLACK}ID GRF: {SILVER}{STRING}
STR_NEWGRF_MD5SUM :{BLACK}MD5sum: {SILVER}{STRING}
STR_NEWGRF_CONFIRMATION_TEXT :{YELLOW}Právě se chystáš změnit nastavení grafik za běžící hry; může to shodit OpenTTD.{}Jsi si s tím opravdu jist/a?
STR_NEWGRF_CONFIRMATION_TEXT :{YELLOW}Právě se chystáš změnit nastavení grafik za běžící hry; může to shodit OpenTTD.{}Jsi si tím opravdu jist(a)?
STR_NEWGRF_ERROR_MSG_INFO :{SILVER}{STRING}
STR_NEWGRF_ERROR_MSG_WARNING :{RED}Varování: {SILVER}{STRING}
@@ -3246,6 +3247,7 @@ STR_BROKEN_VEHICLE_LENGTH :{WHITE}Vlak '{V
STR_NEWGRF_BUGGY :{WHITE}Grafika '{0:STRING}' poskytuje neplatné informace.
STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Informace o nákladu/možnosti přestavby pro '{1:ENGINE}' se po nákupu změnily. To může způsobit problémy při automatické výměně vozidel.
STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' způsobil(a) nekonečnou smyčku v callbacku produkce průmyslu.
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Hra byla uložena ve verzi bez podpory tramvají. Všechny tramvaje se odstraní.
@@ -3316,7 +3318,7 @@ STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Tady je
STR_REPLACE_REMOVE_WAGON :{BLACK}Odebírání vagonů: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Funkce automatického vylepšování vlaků může udržovat stejnou délku vlaku odstraňovaním vagonů (od začátku vlaku), pokud by změna mašiny vlak prodloužila.
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Vyměňování: {ORANGE}{SKIP}{SKIP}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} EXPERIMENTÁLNÍ VLASTNOST {}Přepne mezi okny na výměnu lokomotiv a vagonů.{}Vagon se vymění, jen když je nový vagon schopen vozit stejnou komoditu, jako ten starý. Toto se ověřuje pro každý vagon.
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Přepne mezi okny na výměnu lokomotiv a vagonů
STR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Vozidlo není dostupné
STR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Vůz není dostupné
STR_SHIP_NOT_AVAILABLE :{WHITE}Loď není dostupná

View File

@@ -416,8 +416,8 @@ STR_STICKY_BUTTON :{BLACK}Marker d
STR_RESIZE_BUTTON :{BLACK}Klik og træk for at ændre vinduets størrelse
STR_SAVELOAD_HOME_BUTTON :{BLACK}Klik her for at gå til det nuværende standard gemme/hente bibliotek
STR_018D_DEMOLISH_BUILDINGS_ETC :{BLACK}Nedriv bygninger osv. på et stykke land
STR_018E_LOWER_A_CORNER_OF_LAND :{BLACK}Sænk et hjørne af landet
STR_018F_RAISE_A_CORNER_OF_LAND :{BLACK}Hæv et hjørne af landet
STR_018E_LOWER_A_CORNER_OF_LAND :{BLACK}Sænk punkter i landskabet
STR_018F_RAISE_A_CORNER_OF_LAND :{BLACK}Hæv punkter i landskabet
STR_0190_SCROLL_BAR_SCROLLS_LIST :{BLACK}Scrollbar - scroller listen op/ned
STR_HSCROLL_BAR_SCROLLS_LIST :{BLACK}Scroll bar - flytter listen mod venstre/højre
STR_0191_SHOW_LAND_CONTOURS_ON_MAP :{BLACK}Vis landskabskonturer på kortet
@@ -607,6 +607,7 @@ STR_CANNOT_GENERATE_TOWN :{WHITE}Kan ikke
STR_NO_SPACE_FOR_TOWN :{WHITE}...der er ikke mere plads på kortet
STR_023B_INCREASE_SIZE_OF_TOWN :{BLACK}Forøg størrelsen af byen
STR_023C_EXPAND :{BLACK}Udvid
STR_TOWN_EXPAND_WARN_NO_ROADS :{WHITE}Byen vil ikke kunne bygge veje. Du kan tillade byer at bygge veje via Avancerede indstillinger->Økonomi->Byer.
STR_023D_RANDOM_TOWN :{BLACK}Tilfældig by
STR_023E_BUILD_TOWN_IN_RANDOM_LOCATION :{BLACK}Byg en by på en tilfældig placering
STR_0285_CAN_T_BUILD_HERE :{WHITE}Kan ikke bygge {STRING} her...
@@ -688,6 +689,7 @@ STR_TRANSPARENT_SIGNS :{SETX 12}Gennem
STR_02D5_LAND_BLOCK_INFO :Landområde information
STR_02D6 :
STR_CONSOLE_SETTING :Tænd/Sluk konsol
STR_AI_DEBUG_MENU :Computerspiller-debug
STR_02D7_SCREENSHOT_CTRL_S :Skærmbillede (Ctrl-S)
STR_02D8_GIANT_SCREENSHOT_CTRL_G :Kæmpe skærmbillede (Ctrl-G)
STR_02D9_ABOUT_OPENTTD :Om 'OpenTTD'
@@ -698,14 +700,14 @@ STR_02DA_ON :{BLACK}Til
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Vis tilskudsordninger
STR_02DD_SUBSIDIES :Tilskudsordninger
STR_02DE_MAP_OF_WORLD :Kort over verden
STR_EXTRA_VIEW_PORT :Flere lokalitetsvinduer
STR_EXTRA_VIEW_PORT :Nyt lokalitetsvindue
STR_SIGN_LIST :Liste over skilte
STR_02DF_TOWN_DIRECTORY :Byoversigt
STR_TOWN_POPULATION :{BLACK}Verdens befolkning: {COMMA}
STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Lokalitetsvindue {COMMA}
STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Gå til lokalitetsvindue
STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Hent global
STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Hent lokalitet fra global visning
STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Hent fra lokalitetsvindue
STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Sæt global
STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Kopier lokaliteten af dette vindue til det globale vindue
STR_02E0_CURRENCY_UNITS :{BLACK}Valutaenhed
@@ -783,7 +785,7 @@ STR_TOWNNAME_SWEDISH :Svenske
STR_TOWNNAME_DUTCH :Hollandske
STR_TOWNNAME_FINNISH :Finske
STR_TOWNNAME_POLISH :Polske
STR_TOWNNAME_SLOVAKISH :Slovakiske
STR_TOWNNAME_SLOVAK :Slovakiske
STR_TOWNNAME_NORWEGIAN :Norske
STR_TOWNNAME_HUNGARIAN :Ungarske
STR_TOWNNAME_AUSTRIAN :Østrigske
@@ -816,7 +818,7 @@ STR_CURR_ITL :Italienske Lire
STR_CURR_NLG :Hollandske Guilder (NLG)
STR_CURR_NOK :Norske Kroner (NOK)
STR_CURR_PLN :Polske Zloty (PLN)
STR_CURR_ROL :Rumænske Lei (ROL)
STR_CURR_RON :Rumænske Lei (RON)
STR_CURR_RUR :Russiske Rubel (RUR)
STR_CURR_SIT :Slovenske Tolare (SIT)
STR_CURR_SEK :Svenske Kroner (SEK)
@@ -936,7 +938,7 @@ STR_CONFIG_SETTING_SIGNALSIDE :{LTBLUE}Vis sig
STR_CONFIG_SETTING_SHOWFINANCES :{LTBLUE}Vis finansvinduet i slutningen af året: {ORANGE}{STRING}
STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT :{LTBLUE}Nye ordrer er 'uden stop' som standard: {ORANGE}{STRING}
STR_CONFIG_SETTING_ROADVEH_QUEUE :{LTBLUE}Kødannelse af køretøjer (med kvanteeffekt): {ORANGE}{STRING}
STR_CONFIG_SETTING_AUTOSCROLL :{LTBLUE}Pannorer vindue når musen er ved kanten: {ORANGE}{STRING}
STR_CONFIG_SETTING_AUTOSCROLL :{LTBLUE}Panorér vindue når musen er ved kanten: {ORANGE}{STRING}
STR_CONFIG_SETTING_BRIBE :{LTBLUE}Tillad bestikkelse af de lokale myndigheder: {ORANGE}{STRING}
STR_CONFIG_SETTING_ALLOW_EXCLUSIVE :{LTBLUE}Tillad køb af eksklusive transportrettigheder: {ORANGE}{STRING}
STR_CONFIG_SETTING_ALLOW_GIVE_MONEY :{LTBLUE}Tillad at sende penge til andre firmaer: {ORANGE}{STRING}
@@ -944,6 +946,7 @@ STR_CONFIG_SETTING_NONUNIFORM_STATIONS :{LTBLUE}Ikke un
STR_CONFIG_SETTING_FREIGHT_TRAINS :{LTBLUE}Vægtfaktor for fragt for at simulere tunge tog: {ORANGE}{STRING}
STR_CONFIG_SETTING_PLANE_SPEED :{LTBLUE}Fly-hastighedsfaktor: {ORANGE}1 / {STRING}
STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :{LTBLUE}Tillad gennemkørsels-stop på veje ejet af en by: {ORANGE}{STRING}
STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :{LTBLUE}Tillad gennemkørsels-stoppesteder på veje ejet af konkurrenter: {ORANGE}{STRING}
STR_CONFIG_SETTING_ADJACENT_STATIONS :{LTBLUE}Tillad bygning af tilstødende stationer: {ORANGE}{STRING}
STR_CONFIG_SETTING_DYNAMIC_ENGINES :{LTBLUE}Muliggør flere NewGRF køretøjssæt: {ORANGE}{STRING}
STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Denne indstilling kan ikke ændres, når der er køretøjer.
@@ -1049,6 +1052,8 @@ STR_CONFIG_SETTING_AI_BUILDS_ROADVEH :{LTBLUE}Deaktiv
STR_CONFIG_SETTING_AI_BUILDS_AIRCRAFT :{LTBLUE}Deaktiver fly for computeren: {ORANGE}{STRING}
STR_CONFIG_SETTING_AI_BUILDS_SHIPS :{LTBLUE}Deaktiver skibe for computeren: {ORANGE}{STRING}
STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :{LTBLUE}Tillad computerspillere i netværksspil: {ORANGE}{STRING}
STR_CONFIG_SETTING_AI_MAX_OPCODES :{LTBLUE}Antal instruktioner før computerspilleren standses: {ORANGE}{STRING}
STR_CONFIG_SETTING_SERVINT_ISPERCENT :{LTBLUE}Service intervaller er i procent: {ORANGE}{STRING}
STR_CONFIG_SETTING_SERVINT_TRAINS :{LTBLUE}Standard service interval for tog: {ORANGE}{STRING} dage/%
@@ -1192,6 +1197,7 @@ STR_CANT_REMOVE_TRAIN_WAYPOINT :{WHITE}Kan ikke
STR_BUILD_AUTORAIL_TIP :{BLACK}Byg jernbane med auto-jernbane-værktøj
STR_NO_TOWN_IN_SCENARIO :{WHITE}...der er ingen byer i dette scenarie
STR_COULD_NOT_CREATE_TOWN :{WHITE}Kortgenerering afbrudt...{}...ingen brugbare lokaliteter til byer
STR_MANY_RANDOM_TOWNS :{BLACK}Mange tilfældige byer
STR_RANDOM_TOWNS_TIP :{BLACK}Dæk kortet med tilfældigt placerede byer
@@ -2235,6 +2241,7 @@ STR_704A_SELECT_FEMALE_FACES :{BLACK}Vælg kv
STR_704B_GENERATE_RANDOM_NEW_FACE :{BLACK}Generer nyt tilfældigt ansigt
STR_704C_KEY :{BLACK}Nøgle
STR_704D_SHOW_KEY_TO_GRAPHS :{BLACK}Viser nøglen til grafen
STR_SHOW_DETAILED_PERFORMANCE_RATINGS :{BLACK}Vis detaljeret præstationsoversigt
STR_704E_KEY_TO_COMPANY_GRAPHS :{WHITE}Nøgle til selskabsgraf
STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY :{BLACK}Klik her for at vise/skjule selskabets graf
STR_7050_UNITS_OF_CARGO_DELIVERED :{WHITE}Afleveret last
@@ -2609,19 +2616,19 @@ STR_ORDER_GO_TO :Gå til
STR_ORDER_GO_NON_STOP_TO :Gå uden stop til
STR_ORDER_GO_VIA :Gå via
STR_ORDER_GO_NON_STOP_VIA :Gå uden stop via
STR_ORDER_TOGGLE_FULL_LOAD :{BLACK}Fuld last af hvilken som helst type
STR_ORDER_DROP_LOAD_IF_POSSIBLE :Åbn hvis tilgængelig
STR_ORDER_TOGGLE_FULL_LOAD :{BLACK}Vilkårlig fuld last
STR_ORDER_DROP_LOAD_IF_POSSIBLE :Last hvis muligt
STR_ORDER_DROP_FULL_LOAD_ALL :Fuld last af alt gods
STR_ORDER_DROP_FULL_LOAD_ANY :Fuld last af hvilket som helst gods
STR_ORDER_DROP_NO_LOADING :Ingen lastning
STR_ORDER_DROP_FULL_LOAD_ANY :Fuld last vilkårligt gods
STR_ORDER_DROP_NO_LOADING :Ingen last
STR_ORDER_TOGGLE_UNLOAD :{BLACK}Los alt
STR_ORDER_DROP_UNLOAD_IF_ACCEPTED :Los hvis gods accepteres
STR_ORDER_DROP_UNLOAD :Aflæs alt
STR_ORDER_DROP_TRANSFER :Overfør
STR_ORDER_DROP_NO_UNLOADING :Ingen losning
STR_ORDER_FULL_LOAD :(Fuld last)
STR_ORDER_FULL_LOAD_ANY :(Fuld last af hvilket som helst gods)
STR_ORDER_NO_LOAD :(Ingen lastning)
STR_ORDER_FULL_LOAD_ANY :(Fuld last vilkårligt gods)
STR_ORDER_NO_LOAD :(Ingen last)
STR_ORDER_UNLOAD :(Los og medtag gods)
STR_ORDER_UNLOAD_FULL_LOAD :(Los og vent på fuld last)
STR_ORDER_UNLOAD_FULL_LOAD_ANY :(Los og vent på fuld last af hvilket som helst gods)
@@ -2796,7 +2803,7 @@ STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER :{BLACK}Pris: {C
STR_885C_BROKEN_DOWN :{RED}Gået i stykker
STR_885D_AGE_RUNNING_COST_YR :{BLACK}Alder: {LTBLUE}{STRING}{BLACK} Driftsomkostninger: {LTBLUE}{CURRENCY}/år
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Vægt: {LTBLUE}{WEIGHT_S} {BLACK}Styrke: {LTBLUE}{POWER}{BLACK} Maks. hastighed: {LTBLUE}{VELOCITY}
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Vægt: {LTBLUE}{WEIGHT_S} {BLACK}Kraft: {LTBLUE}{POWER}{BLACK} Maks. hast.: {LTBLUE}{VELOCITY} {BLACK}Maks. t.k.: {LTBLUE}{FORCE}
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Vægt: {LTBLUE}{WEIGHT_S} {BLACK}Effekt: {LTBLUE}{POWER}{BLACK} Maks. hast.: {LTBLUE}{VELOCITY} {BLACK}Maks. trækkraft: {LTBLUE}{FORCE}
STR_885F_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Afkast i år: {LTBLUE}{CURRENCY} (sidste år: {CURRENCY})
STR_8860_RELIABILITY_BREAKDOWNS :{BLACK}Pålidelighed {LTBLUE}{COMMA}% {BLACK}nedbrud siden sidste service: {LTBLUE}{COMMA}
STR_8861_STOPPED :{RED}Stoppet
@@ -3164,6 +3171,9 @@ STR_NEWGRF_BROKEN :{WHITE}Denne Ne
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Den ændrer toglængden for '{1:ENGINE}' mens den ikke er i depot.
STR_BROKEN_VEHICLE_LENGTH :{WHITE}Toget '{VEHICLE}' fra firmaet '{COMPANY}' har ugyldig længde. Det skyldes sandsynligvis at problem med en NewGRF. Spillet går muligvis ned.
STR_NEWGRF_BUGGY :{WHITE}NewGRF '{0:STRING}' indeholder forkert information.
STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Gods-/ombygningsinformation for '{1:ENGINE}' afviger fra indkøbslisten efter konstruktion. Dette kan medføre, at autofornyelse ikke fungerer korrekt.
STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' forårsagede en uendelig løkke i produktions-callback'en.
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Spillet er gemt i en version uden sporveje. Alle sporveje er blevet fjernet.
@@ -3234,7 +3244,7 @@ STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Viser hv
STR_REPLACE_REMOVE_WAGON :{BLACK}Fjern vogn: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Få autoudskift til at bevare længden af tog ved at fjerne vogne (startende fra fronten), hvis autoudskiftningen gør toget længere.
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Udskifter: {ORANGE}{SKIP}{SKIP}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} EKSPERIMENTEL EGENSKAB {}Skift imellem lokomotiv- og vogn-udskiftningsvindue.{}Vognudskiftning vil kun finde sted hvis den nye vogn kan ændres til at transportere samme godstype som den gamle vogn. Dette bliver checket for hver vogn, når udskiftningen finder sted.
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Skift imellem lokomotiv- og vogn-udskiftningsvindue
STR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Tog er ikke tilgængeligt
STR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Vejkøretøj er ikke tilgængeligt
STR_SHIP_NOT_AVAILABLE :{WHITE}Skib er ikke tilgængeligt
@@ -3549,10 +3559,33 @@ STR_OSK_KEYBOARD_LAYOUT_CAPS :~!@#$%^&*()_+|Q
########
############ AI GUI
STR_AI_SETTINGS_BUTTON :{BLACK}Computerspiller-indstillinger
STR_AI_SETTINGS_BUTTON_TIP :{BLACK}Vis indstillinger for computerstyrede spillere
STR_AI_DEBUG :{WHITE}Computerspiller-debug
STR_AI_DEBUG_NAME_TIP :{BLACK}Navn på computerspilleren
STR_AI_DEBUG_RELOAD :{BLACK}Genindlæs computerspiller
STR_AI_DEBUG_RELOAD_TIP :{BLACK}Stop computerspilleren, genindlæs scriptet og genstart computerspilleren
STR_AI_DEBUG_SERVER_ONLY :{YELLOW}Computerspiller-debugvindue er kun tilgængeligt på serveren
STR_AI_CONFIG_CAPTION :{WHITE}Computerspiller-konfiguration
STR_AI_CHANGE :{BLACK}Vælg computerspiller
STR_AI_CONFIGURE :{BLACK}Konfigurer computerspiller
STR_AI_CHANGE_TIP :{BLACK}Indlæs en anden computerspiller
STR_AI_CONFIGURE_TIP :{BLACK}Konfigurer parametre for computerspiller
STR_AI_LIST_TIP :{BLACK}Alle computerstyrede spillere der vil blive indlæst i næste spil
STR_AI_LIST_CAPTION :{WHITE}Tilgængelige computerspillere
STR_AI_AILIST_TIP :{BLACK}Klik for at vælge en computerstyret spiller
STR_AI_ACCEPT :{BLACK}Accepter
STR_AI_ACCEPT_TIP :{BLACK}Vælg markeret computerstyret spiller
STR_AI_CANCEL :{BLACK}Afbryd
STR_AI_CANCEL_TIP :{BLACK}Skift ikke computerstyret spiller
STR_AI_CLOSE :{BLACK}Luk
STR_AI_RESET :{BLACK}Nulstil
STR_AI_HUMAN_PLAYER :Menneskelig spiller
STR_AI_RANDOM_AI :Tilfældig computerspiller
STR_AI_SETTINGS_CAPTION :{WHITE}Computerspiller-parametre
STR_AI_AUTHOR :Skaber:
STR_AI_VERSION :Version:
STR_AI_PLEASE_REPORT_CRASH :{WHITE}En computerstyret spiller gik ned. Rapporter det venligst til udvikleren af computerspilleren med et skærmbilledet af computerspiller-debugvinduet.
########
############ town controlled noise level
@@ -3565,6 +3598,8 @@ STR_CONTENT_NO_ZLIB :{WHITE}OpenTTD
STR_CONTENT_NO_ZLIB_SUB :{WHITE}... det er ikke muligt at downloade indhold!
STR_CONTENT_TYPE_BASE_GRAPHICS :Basisgrafik
STR_CONTENT_TYPE_NEWGRF :NewGRF
STR_CONTENT_TYPE_AI :Computerspiller
STR_CONTENT_TYPE_AI_LIBRARY :Computerspiller-resourcefil
STR_CONTENT_TYPE_SCENARIO :Scenarie
STR_CONTENT_TYPE_HEIGHTMAP :Højdekort
STR_CONTENT_TITLE :{WHITE}Download af indhold

View File

@@ -785,7 +785,7 @@ STR_TOWNNAME_SWEDISH :Zweeds
STR_TOWNNAME_DUTCH :Nederlands
STR_TOWNNAME_FINNISH :Fins
STR_TOWNNAME_POLISH :Pools
STR_TOWNNAME_SLOVAKISH :Slowaaks
STR_TOWNNAME_SLOVAK :Slowaaks
STR_TOWNNAME_NORWEGIAN :Noors
STR_TOWNNAME_HUNGARIAN :Hongaars
STR_TOWNNAME_AUSTRIAN :Oostenrijks
@@ -818,7 +818,7 @@ STR_CURR_ITL :Italiaanse Lier
STR_CURR_NLG :Nederlandse Gulden (NLG)
STR_CURR_NOK :Noorse Kronen (NOK)
STR_CURR_PLN :Poolse Zloty (PLN)
STR_CURR_ROL :Roemeense Leu (ROL)
STR_CURR_RON :Roemeense Leu (RON)
STR_CURR_RUR :Russische Rubel (RUR)
STR_CURR_SIT :Sloveense Tolar (SIT)
STR_CURR_SEK :Zweedse Kronen (SEK)
@@ -973,7 +973,7 @@ STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :{LTBLUE}Max afs
STR_CONFIG_SETTING_SNOWLINE_HEIGHT :{LTBLUE}Sneeuwhoogte: {ORANGE}{STRING}
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :{LTBLUE}Ruwheid van het terrein (alleen Terra Genesis) : {ORANGE}{STRING}
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_SMOOTH :Erg vlak
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_SMOOTH :vlak
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_SMOOTH :Vlak
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_ROUGH :Ruig
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_ROUGH :Erg ruig
STR_CONFIG_SETTING_TREE_PLACER :{LTBLUE}Boomplaatser algoritme: {ORANGE}{STRING}
@@ -1197,6 +1197,7 @@ STR_CANT_REMOVE_TRAIN_WAYPOINT :{WHITE}Kan hier
STR_BUILD_AUTORAIL_TIP :{BLACK}Bouw spoor met de Autorail-methode
STR_NO_TOWN_IN_SCENARIO :{WHITE}...er is geen stad in dit scenario
STR_COULD_NOT_CREATE_TOWN :{WHITE}Map maken afgebroken...{}...geen geschikte dorplokaties
STR_MANY_RANDOM_TOWNS :{BLACK}Veel willekeurige steden
STR_RANDOM_TOWNS_TIP :{BLACK}Bedek de kaart met willekeurig geplaatste steden
@@ -2240,6 +2241,7 @@ STR_704A_SELECT_FEMALE_FACES :{BLACK}Selectee
STR_704B_GENERATE_RANDOM_NEW_FACE :{BLACK}Genereer willekeurig nieuw gezicht
STR_704C_KEY :{BLACK}Legenda
STR_704D_SHOW_KEY_TO_GRAPHS :{BLACK}Laat grafieklegenda zien
STR_SHOW_DETAILED_PERFORMANCE_RATINGS :{BLACK}Toon gedetaileerde prestatiewaarderingen
STR_704E_KEY_TO_COMPANY_GRAPHS :{WHITE}Legenda voor bedrijfsgrafieken
STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY :{BLACK}Klik hier om dit bedrijf weer te geven of te verbergen op de grafiek
STR_7050_UNITS_OF_CARGO_DELIVERED :{WHITE}Eenheden van goederen afgeleverd
@@ -3169,6 +3171,10 @@ STR_NEWGRF_BROKEN :{WHITE}Gedrag v
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Het verandert de lengte van voertuig '{1:ENGINE}' wanneer niet in een depot.
STR_BROKEN_VEHICLE_LENGTH :{WHITE}Trein '{VEHICLE}' behorend bij '{COMPANY}' heeft een ongeldige lengte. Het is waarschijnlijk veroorzaakt door problemen metNewGRFs. Het spel kan desync krijgen of crash.
STR_NEWGRF_BUGGY :{WHITE}NewGRF '{STRING}' geeft onjuiste informatie.
STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}vracht/ombouw informatie voor '{1:ENGINE}' wijkt af van aanschaflijst na het bouwen. Dit kan resulteren in problemen bij ombouwen door autovernieuw/-vervang
STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' Een eindeloze loop gevonden in de productie-callback.
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Spel was opgeslagen in een versie zonder tram ondersteuning. Alle trams zijn verwijderd.
STR_CURRENCY_WINDOW :{WHITE}Aangepaste valuta
@@ -3238,7 +3244,7 @@ STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Dit geef
STR_REPLACE_REMOVE_WAGON :{BLACK}Wagons verwijderen: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}De te vervangen trein behoudt zijn lengte door wagons weg te halen (startend aan de voorkant), als het vervangen de trein langer zou maken
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Aan het vervangen: {ORANGE}{SKIP}{SKIP}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} EXPERIMENTEEL {}Wissel tussen motor- en wagonvervangvensters.{}Wagonvervanging wordt alleen uitgevoerd als de nieuwe wagon omgebouwd kan worden om hetzelfde ladingtype te dragen als de oude wagon. Dit wordt gecontroleerd voor elke wagon wanneer de daadwerkelijke vervanging plaats vindt.
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Wissel tussen motor- en wagonvervangvensters
STR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Trein is niet beschikbaar
STR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Voertuig is niet beschikbaar
STR_SHIP_NOT_AVAILABLE :{WHITE}Schip is niet beschikbaar
@@ -3579,6 +3585,7 @@ STR_AI_RANDOM_AI :Willekeurige AI
STR_AI_SETTINGS_CAPTION :{WHITE}AI Parameters
STR_AI_AUTHOR :Maker:
STR_AI_VERSION :Versie:
STR_AI_PLEASE_REPORT_CRASH :{WHITE}Een van de draaiende AI's is gecrashed. Meldt dit bij de schrijver van deze AI met een schermprint van het AI Debugscherm.
########
############ town controlled noise level

View File

@@ -785,7 +785,7 @@ STR_TOWNNAME_SWEDISH :Swedish
STR_TOWNNAME_DUTCH :Dutch
STR_TOWNNAME_FINNISH :Finnish
STR_TOWNNAME_POLISH :Polish
STR_TOWNNAME_SLOVAKISH :Slovakish
STR_TOWNNAME_SLOVAK :Slovak
STR_TOWNNAME_NORWEGIAN :Norwegian
STR_TOWNNAME_HUNGARIAN :Hungarian
STR_TOWNNAME_AUSTRIAN :Austrian
@@ -818,7 +818,7 @@ STR_CURR_ITL :Italian Lira (I
STR_CURR_NLG :Dutch Guilder (NLG)
STR_CURR_NOK :Norwegian Krone (NOK)
STR_CURR_PLN :Polish Zloty (PLN)
STR_CURR_ROL :Romanian Leu (ROL)
STR_CURR_RON :Romanian Leu (RON)
STR_CURR_RUR :Russian Rubles (RUR)
STR_CURR_SIT :Slovenian Tolar (SIT)
STR_CURR_SEK :Swedish Krona (SEK)
@@ -2241,6 +2241,7 @@ STR_704A_SELECT_FEMALE_FACES :{BLACK}Select f
STR_704B_GENERATE_RANDOM_NEW_FACE :{BLACK}Generate random new face
STR_704C_KEY :{BLACK}Key
STR_704D_SHOW_KEY_TO_GRAPHS :{BLACK}Show key to graphs
STR_SHOW_DETAILED_PERFORMANCE_RATINGS :{BLACK}Show detailed performance ratings
STR_704E_KEY_TO_COMPANY_GRAPHS :{WHITE}Key to company graphs
STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY :{BLACK}Click here to toggle company's entry on graph on/off
STR_7050_UNITS_OF_CARGO_DELIVERED :{WHITE}Units of cargo delivered
@@ -3172,6 +3173,7 @@ STR_BROKEN_VEHICLE_LENGTH :{WHITE}Train '{
STR_NEWGRF_BUGGY :{WHITE}NewGRF '{0:RAW_STRING}' provides incorrect information.
STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Cargo/refit information for '{1:ENGINE}' differs from purchase list after construction. This might cause autorenew/-replace to fail refitting correctly.
STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' caused an endless loop in the production callback.
STR_LOADGAME_REMOVED_TRAMS :{WHITE}Game was saved in version without tram support. All trams have been removed.
@@ -3242,7 +3244,7 @@ STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Displays
STR_REPLACE_REMOVE_WAGON :{BLACK}Wagon removal: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Make autoreplace keep the length of a train the same by removing wagons (starting at the front), if replacing the engine would make the train longer.
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Replacing: {ORANGE}{SKIP}{SKIP}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} EXPERIMENTAL FEATURE {}Switch between engine and wagon replacement windows.{}Wagon replacement will only be done if the new wagon can be refitted into carrying the same type of cargo as the old one. This is checked for each wagon when the actual replacement takes place.
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Switch between engine and wagon replacement windows
STR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Vehicle is not available
STR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Vehicle is not available
STR_SHIP_NOT_AVAILABLE :{WHITE}Ship is not available
@@ -3583,6 +3585,7 @@ STR_AI_RANDOM_AI :Random AI
STR_AI_SETTINGS_CAPTION :{WHITE}AI Parameters
STR_AI_AUTHOR :Author:
STR_AI_VERSION :Version:
STR_AI_URL :URL: {RAW_STRING}
STR_AI_PLEASE_REPORT_CRASH :{WHITE}One of the running AIs crashed. Please report this to the AI author with a screenshot of the AI Debug Window.
########

Some files were not shown because too many files have changed in this diff Show More