Commit Graph

24631 Commits

Author SHA1 Message Date
glx22 1fb4ed8eef Fix: Use realtime for error message and console backlog timeouts 2021-01-10 14:07:17 +01:00
glx c0d7949d7c Fix: Don't use a timer for hundredth tick determination 2021-01-10 14:07:17 +01:00
glx22 97d554feb1 Codechange: On regression failure, output the result in a file 2021-01-09 23:48:09 +01:00
Patric Stout 5f1154e076
Fix #8272: vehicle destination text colour when mousing over (#8543)
Co-authored-by: Jonathan G Rennison <j.g.rennison@gmail.com>
2021-01-09 23:43:06 +01:00
translators 928276a66e Update: Translations from eints
korean: 4 changes by telk5093
finnish: 4 changes by hpiirai
catalan: 11 changes by J0anJosep
2021-01-09 18:30:51 +00:00
Patric Stout 218f40eea2
Add: [Script] ScriptCargo::GetName, to get the human readable name of a cargo (#8544)
Of course this translates into AICargo.GetName() for AIs and
GSCargo.GetName() for GameScripts.
2021-01-09 15:15:14 +01:00
Patric Stout 3dbdb1c7e3
Change: remove warning in cheat window and reduce it to a note (#8538)
Although meant as a funny joke towards the player, our social
standards have changed since 2004, and such "jokes" are no
longer acceptable by the community as a whole.

The only value of the message is that people are informed the
information is stored in the savegame. This is mostly useful for
us, developers, as some of those cheats can have side-effects
which people report.

While at it, styled the GUI a bit better, as the way the text
was presented was odd.
2021-01-09 15:14:59 +01:00
SamuXarick 8da5cff210
Fix #8462: Don't check whether to grow a town road on water (#8471) 2021-01-09 12:18:31 +01:00
Patric Stout 8e6574dcdb
Revert 78f92130: "Fix #8506: Towns shouldn't add junctions to NewGRF roads they cannot build (#8535)" (#8541)
As per https://github.com/OpenTTD/OpenTTD/pull/8535#issuecomment-757122918,
jumped the gun here.
2021-01-09 12:14:23 +01:00
Tyler Trahan b0456669c9
Fix #8506: Towns shouldn't add junctions to NewGRF roads they cannot build (#8535) 2021-01-09 10:06:31 +01:00
Patric Stout b6ac5a3ab9
Fix 85a49a0d3: hotkeys were enabled outside of GM_NORMAL (#8534) 2021-01-08 23:28:46 +01:00
Patric Stout 5f591c86fe
Fix 85a49a0d: invalidate airport toolbar when new planes become available (#8532)
Otherwise if the airport button is disabled, it will remain disabled
until you close/open the toolbar again.
2021-01-08 22:34:21 +01:00
frosch 31d1968004
Fix: Start the inactivity-timeout for the content server only after the connection has been established. (#8530)
When connecting took long due to the first N resolve-addresses timing out, OpenTTD would immediately close the connection, without sending anything.
2021-01-08 20:20:54 +01:00
Patric Stout 7ba0fa4bf0
Fix af22a4f2: scenario editor doesn't have build station/depot/etc (#8529) 2021-01-08 19:48:39 +01:00
translators 0f1d338dda Update: Translations from eints
korean: 2 changes by telk5093
finnish: 2 changes by hpiirai
dutch: 49 changes by Afoklala
spanish: 16 changes by Luis45ccs
french: 7 changes by dimensi0n
polish: 2 changes by yazalo
2021-01-08 18:26:47 +00:00
Tyler Trahan b08c66a796
Fix 7bdfb38: Drive-thru road stations can be connected at either end (#8528) 2021-01-08 18:56:39 +01:00
Tyler Trahan 9c0da686da
Add: Towns can build tunnels (#8473) 2021-01-08 18:32:44 +01:00
Owen Rudge fec5ce093f Feature: Build ARM64 (Apple Silicon) version for macOS 2021-01-08 16:58:14 +00:00
Owen Rudge bbc96fd37c Fix: Don't add -mno-sse4 on arm64 2021-01-08 16:58:14 +00:00
Charles Pigott 188bf0fbc9 Change: Remove disable_unsuitable_building setting
This setting is no longer useful, as you can now always build roads,
canals, etc.
2021-01-08 16:43:51 +01:00
Charles Pigott b9f3e45af7 Cleanup: Remove unused (and mostly duplicated) function 2021-01-08 16:43:51 +01:00
Patric Stout af22a4f2cd Add: show in the tooltip of disabled toolbar buttons why they are disabled 2021-01-08 16:43:51 +01:00
Patric Stout 85a49a0d36 Change: always allow to click on the toolbar icons for road/rail/dock/airport
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-08 16:43:51 +01:00
Chris Stevens a6aec252b1
Fix #8153: Report incompatible cargo/order when autoreplace fails (#8169) 2021-01-08 16:05:49 +01:00
Patric Stout 9aa39d0af9
Fix #7972: show invalid orders to stations that don't accept your vehicle (#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-08 16:04:44 +01:00
Patric Stout fda1fbf61c
Revert c1fddb9, 639cfa4: "Codechange: Check if access __attribute__ is supported before trying to use it." (#8526)
This reverts commit c1fddb9a6a and 639cfa43d2.

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-08 15:25:44 +01:00
Patric Stout 4059ccf863
Fix: [Actions] circumvent Windows tar warning about read-only files (#8524)
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-08 15:20:27 +01:00
Patric Stout 7463c46a54
Fix: for arctic and tropic, make sure we have at least a few hills (#8513)
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-08 12:02:38 +01:00
Patric Stout aac8c28d73 Fix #7656: destroying a tunnel/bridge now first removes the tracks for cost 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-08 12:02:25 +01:00
Patric Stout ebd9f26c15 Fix: replacing a bridge didn't charge for clearing last tile
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-08 12:02:25 +01:00
Patric Stout ef6b17baf7 Fix 2fd871e2af5: load correct ending-year for old (pre 0.7) savegames
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-08 11:17:08 +01:00
Patric Stout a1987df96a Fix #8050: never show the highscore when disabled, not even if you start in year zero
Using zero as "never" value can have its drawbacks ;)
2021-01-08 11:17:08 +01:00
Patric Stout d9ec8053d7 Fix #8050: ending-year of 5000000 allows you to get to year 5000001 and beyond
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-08 11:17:08 +01:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
milek7 c1fddb9a6a Codechange: Check if access __attribute__ is supported before trying to use it. 2021-01-08 09:12:37 +00:00
milek7 639cfa43d2 Codechange: Use access __attribute__ to silence warnings in GCC 2021-01-08 00:40:45 +00:00
SamuXarick 79d938b957 Fix 0125892: Warning about unsigned unary minus 2021-01-07 21:42:10 +00:00
Patric Stout 725d793be1
Fix: don't allow cloning vehicles if cloning orders is failing (#8515)
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-07 19:58:04 +01:00
translators 51e22515a8 Update: Translations from eints
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-07 18:28:27 +00:00
SamuXarick f84a466ca5
Fix #7945: Add cost of clearing the sloped tile when placing a dock (#7947) 2021-01-07 10:35:09 +01:00
Patric Stout c988b4d62b
Fix #8332: aborting group drag&drop could cause crashes with vehicle 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-07 10:32:24 +01:00
Kuhnovic a3a7928372
Feature: option to auto remove signals when in the way during rail construction (#8274) 2021-01-07 10:17:05 +01:00
Patric Stout 1b675e7075
Fix #8068: always allow removal of tram track if that generates money (#8509)
Even if you are completely broke, generating money should always
be allowed.
2021-01-07 08:01:46 +01:00
Patric Stout c7609e767f
Fix #7604: prevent houses to wander too far from town center when rebuilding (#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-07 08:01:23 +01:00
Patric Stout 28c13ec90f
Fix #8168: allow relocating of HQ partial over existing HQ (#8510)
Just in case you want to move it SLIGHTLY to the right.
2021-01-06 22:37:57 +01:00
Patric Stout a4e34e824c Change: towns can now bridge 4 rails (up from 3)
Having 4 rails is a pretty common design, and towns now couldn't
bridge out of this common design.
2021-01-06 21:39:34 +01:00
Didac Perez Parera 64eddaeb49 Feature: Make maximum length of town bridges depend on population. 2021-01-06 21:39:34 +01:00
translators c3faec4e9a Update: Translations from eints
polish: 7 changes by yazalo
2021-01-06 18:27:36 +00:00
Patric Stout 62cdadb582 Change: move "give money" from client-list to company window
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:
f820543391
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-05 21:56:24 +01:00
Patric Stout d6e15d4943 Fix: make the "password" button the same size as the other buttons in 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-05 21:56:24 +01:00