summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-08Change: always allow to click on the toolbar icons for road/rail/dock/airportPatric Stout
This change allows a user to see what is available and what will become available before it is available, instead of only disabling the button with no further explanation. It also always allows building roads and canals, even if no vehicles are available for road / water. For rail/road/tram, a dropdown with available types is shown. If none are available, it reads "None". If the type is not yet available, it is greyed out. For dock/airport, this always open the toolbar, but building airports, docks, and depots buttons are disabled till vehicles are available for those. Road is the only exception, with the primary road always being available. Here too, stations and depots are disabled till vehicles become available. It does mean you can now always build roads to for example help towns grow.
2021-01-08Fix #8153: Report incompatible cargo/order when autoreplace fails (#8169)Chris Stevens
2021-01-08Fix #7972: show invalid orders to stations that don't accept your vehicle ↵Patric Stout
(#8516) Before it was shown as a normal order, but the vehicle was skipping it. This was rather unclear to the user. Now it is red and contains text with some hints what is going on. The text is prefixed rather than post-fixed, as we have many post-fixes already.
2021-01-08Revert c1fddb9, 639cfa4: "Codechange: Check if access __attribute__ is ↵Patric Stout
supported before trying to use it." (#8526) This reverts commit c1fddb9a6ae5c3af6865461a7295788a341011a2 and 639cfa43d23aa142cabbf2f08ec20a2133b0503e. access_mode "none" is only supported by GCC11, but introduced after it branched. So there are GCC11.0s out there that do not support it. We will have to wait for GCC11.1 to hit before we can re-add this.
2021-01-08Fix: [Actions] circumvent Windows tar warning about read-only files (#8524)Patric Stout
Because certain files are read-only, the "restore-cache" step fails, as Windows tar refuses to overwrite those files (even if they are identical). Instead of hoping upstream fixes "restore-cache", just remove the read-only flag on these files instead.
2021-01-08Fix: for arctic and tropic, make sure we have at least a few hills (#8513)Patric Stout
Without hills, not all industries can be generated, which means that with a default configuration you get errors. This is far from optimal, of course. This now forces that there is at least some hills, even when you are using very-flat. This is a stopgap solution, but a proper solution requires a full rewrite of the terrain generator, which is not a 2 minute (or even 2 week) job. To make sure flat is still flat-ish, reduce the default snow-line-height to 10, making it look a lot better on smaller maps. This is a compromise between being able to have flat maps and still having all industries on arctic.
2021-01-08Fix #7656: destroying a tunnel/bridge now first removes the tracks for cost ↵Patric Stout
calculation This means that for rail tunnel/bridges, the rail is first sold, and the tunnel/bridge is destroyed after. This means destroying tunnels/ bridges now often makes you money, instead of costing. Similar, with road/tram tracks. Destroying a road+tram tunnel/bridge now costs the same amount of money as first removing the tram tracks and than destroying the road tunnel/bridge. Especially as tram tracks generate money when removing, this is a noticeable difference.
2021-01-08Fix: replacing a bridge didn't charge for clearing last tilePatric Stout
It only considered the end-tile (or start-tile) for the bridge, instead of both. This is obvious in the rest of the code which constantly does "+ 2"; this being the only place that does a "+ 1".
2021-01-08Fix 2fd871e2af5: load correct ending-year for old (pre 0.7) savegamesPatric Stout
Despite what it looked like, you could never really change the ending-year (it was always reset to 2050 on start-up). See commit 683b65ee1 for details. As a side-effect, the variable that was suppose to store the ending-year was just zero, never containing a real ending-year.
2021-01-08Fix #8050: never show the highscore when disabled, not even if you start in ↵Patric Stout
year zero Using zero as "never" value can have its drawbacks ;)
2021-01-08Fix #8050: ending-year of 5000000 allows you to get to year 5000001 and beyondPatric Stout
MAX_YEAR is set to 5000000, but having an ending-year set to the same meant you could bypass this, and play till the uint32 wrapped. The game can either show highscore or wrap year, not both. When you would do both, every year you get the highscore dialog. By changing the maximum value of ending-year to 4999999 we prevent this issue.
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2021-01-08Codechange: Check if access __attribute__ is supported before trying to use it.milek7
2021-01-08Codechange: Use access __attribute__ to silence warnings in GCCmilek7
2021-01-07Fix 0125892: Warning about unsigned unary minusSamuXarick
2021-01-07Fix: don't allow cloning vehicles if cloning orders is failing (#8515)Patric Stout
Before this fix, any failing clone order was silently ignored and you as user would never know till you checked the order list. Evil.
2021-01-07Update: Translations from eintstranslators
spanish (mexican): 5 changes by absay korean: 5 changes by telk5093 finnish: 5 changes by hpiirai latvian: 14 changes by lexuslatvia spanish: 23 changes by SeveralCircles, 10 changes by Luis45ccs polish: 5 changes by yazalo
2021-01-07Fix #7945: Add cost of clearing the sloped tile when placing a dock (#7947)SamuXarick
2021-01-07Fix #8332: aborting group drag&drop could cause crashes with vehicle ↵Patric Stout
drag&drop (#8511) The selected group was not reset when drag&drop was aborted. When after that vehicle drag&drop was successful, group drag&drop code was still executed, causing weird behaviour or even crashes.
2021-01-07Feature: option to auto remove signals when in the way during rail ↵Kuhnovic
construction (#8274)
2021-01-07Fix #8068: always allow removal of tram track if that generates money (#8509)Patric Stout
Even if you are completely broke, generating money should always be allowed.
2021-01-07Fix #7604: prevent houses to wander too far from town center when rebuilding ↵Patric Stout
(#8507) When a multi-tile house is rebuild, it always used the most northern tile to build the new house. This can very easily lead to houses wandering off in the north-ish direction (either NW or NE). To prevent this, pick the tile closest to town center when rebuilding on a multi-tile house. This still means a house can be build away from a road, but it is no longer wandering around finding another town to call home.
2021-01-06Fix #8168: allow relocating of HQ partial over existing HQ (#8510)Patric Stout
Just in case you want to move it SLIGHTLY to the right.
2021-01-06Change: towns can now bridge 4 rails (up from 3)Patric Stout
Having 4 rails is a pretty common design, and towns now couldn't bridge out of this common design.
2021-01-06Feature: Make maximum length of town bridges depend on population.Didac Perez Parera
2021-01-06Update: Translations from eintstranslators
polish: 7 changes by yazalo
2021-01-05Change: move "give money" from client-list to company windowPatric Stout
This is a much better location for this button, as you send money from one company to another company, not from player to player. This is based on work done by JGRPP in: https://github.com/JGRennison/OpenTTD-patches/commit/f82054339124cc6b89c5f4f9dac2d9da62f0108b and surrounding commits, which took the work from estys: https://www.tt-forums.net/viewtopic.php?p=1183311#p1183311 We did modify it to fix several bugs and clean up the code while here anyway. The callback was removed, as it meant a modified client could prevent anyone from seeing money was transfered. The message is now generated in the command itself, making that impossible.
2021-01-05Fix: make the "password" button the same size as the other buttons in ↵Patric Stout
Company window Currently password-lock icon + button was the same size, but this looks really weird. Now they are in sync, even with other fonts and languages.
2021-01-05Codechange: fix alignment of Company GUIPatric Stout
Code acted as if WWT_TEXT starts a scope; it does not.
2021-01-05Fix: change all Company planes on paint, not only the first that needs changingPatric Stout
Otherwise it can take a few OnPaint() calls before all planes are set correctly when switching companies.
2021-01-05Fix #7611: keeps news about accidents around after vehicle is cleaned up (#8497)Patric Stout
When a vehicle is cleaned up, all news that points to the news is also removed. This was a bit evil, as it would also remove any news related to crashed, acting like the crash never happened. This left players a bit in the dark what was going on exactly.
2021-01-05Update: Translations from eintstranslators
persian: 24 changes by alisaffari97
2021-01-05Fix: allow input of numbers greater than INT32_MAX for GiveMoney (#8499)Patric Stout
Based on patch by JGR.
2021-01-05Codechange: DC_NO_RAIL_OVERLAP is a remnant of the OldAI. (#8496)Patric Stout
The OldAI was removed in 2009. Pretty sure we can remove this flag now too.
2021-01-05Change: converting town-owned road types now require town rating (#8457)gooball
2021-01-05Fix #8437: Crash when using certain heliports with rotated airportsCharles Pigott
2021-01-05Fix #8437: Planes landing at non-rectangular airports could be drawn at the ↵Charles Pigott
wrong height Only the rotated intercontinental airport, don't get excited
2021-01-05Codechange: consider vehicle co-ordinates when identifying viewport ↵Matt Kimber
candidate as using only the hash generates false positives
2021-01-05Codechange: create MutableSpriteCache to remove the need to cast Vehicle to ↵Matt Kimber
a mutable type in render methods
2021-01-05Codechange: improve performance for complex vehicle chains by resolving ↵Matt Kimber
sprites less often
2021-01-03Revert 4ce53cb8: [OSX] Delayed fullscreen switch is not needed anymore.Michael Lutz
The fix for #8067 solves the real issue, making this workaround unneeded.
2021-01-03Fix #8067: [OSX] Calculate title bar height instead of assuming a fixed value.Michael Lutz
2021-01-03Fix: GetCurveSpeedLimit needs railtype from current tile (#8466)Andy
2021-01-03Fix: [OSX] Quitting in fullscreen mode would loose the original window size.Michael Lutz
This replicates the behaviour on e.g. Windows, which saves the original window size.
2021-01-03Change: [OSX] Hide Dock and menu during fullscreen mode.Michael Lutz
2021-01-03Update: Translations from eintstranslators
spanish (mexican): 14 changes by absay finnish: 32 changes by hpiirai polish: 2 changes by yazalo
2021-01-03Cleanup 9f42358: Make also reliability_start randomised independent of ↵frosch
introduction date.
2021-01-03Cleanup 8139b14: Move a comment back to the line it belongs to, and add a ↵frosch
comment for new code.
2021-01-03Codechange: [OSX] CMake source group for OSX files.Michael Lutz
This separates the OSX specific files into a proper folder when generating Xcode project files.
2021-01-03Codechange: [OSX] Silence some annoying warnings.Michael Lutz