Commit Graph
58 Commits
Author SHA1 Message Date
Peter NelsonandCharles Pigott b43cc21214 Fix: OSK layout not scaled for 2x or 4x GUI scale. 2021-03-20 17:55:17 +00:00
PeterNandGitHub 9fdc881005 Fix: Scale PIP-padding the same as regular padding. (#8829) 2021-03-09 10:43:04 +01:00
PeterNandGitHub c17736b493 Fix e8d397e: Invisible station/waypoint signs could still be clicked on. (#7531) 2019-04-20 17:49:54 +01:00
PeterNandGitHub be073b46da Fix: Bounds check access to railtype_map. (#7529) 2019-04-20 02:34:25 +01:00
PeterNandGitHub d2b6176cdf Add: NewGRF string codes to access PUSH/POP_COLOUR. (#7527) 2019-04-20 02:21:25 +01:00
PeterNandGitHub 671a310d21 Fix #7235: Ensure catchment area of neutral station covers entire industry. (#7518) 2019-04-16 20:30:07 +01:00
PeterNandGitHub 3bbd7ea2c1 Fix: Industry coverage area is no longer rectangular. (#7464)
AIs test station catchment in reverse to how players see station catchment.
This did not take account of non-rectangular station catchment areas, so AIs
could end up placing stations in locations that did not accept/deliver cargo.
2019-04-13 14:27:57 +01:00
PeterNandGitHub abe8cf4985 Codechange: Replace duplicated code with TileArea::Expand() (#7467) 2019-04-13 14:12:34 +01:00
PeterNandGitHub b9b34f676b Change: Always report error when ordering a road vehicle to wrong type of road stop. (#7316)
This was inconsistent before, depending on road/tram and articulated/single vehicle status.
2019-04-13 12:43:49 +01:00
PeterNandGitHub 812886ca61 Fix #7478: Don't remove NewGRF objects on company take-over. (#7483) 2019-04-08 19:20:43 +01:00
PeterNandGitHub 6d1cc142c2 Change: Shorten engine rail type drop down in autoreplace window. (#7448)
In the autoreplace window, the rail type drop down is for choosing engines
of the given time. Many rail types do not have engines specifically designed for them,
and are merely compatible with other rail types. This list is thus unwieldy and many
options have no engines available.

As this drop down is for choosing _engine_ rail type rather than compatible rail types,
we can list just the rail types explicitly listed by engines.
2019-03-31 02:05:23 +01:00
PeterNandGitHub e1069eee05 Codechange: Check airport layout would fit within map bounds before iterating tiles. (#7429) 2019-03-30 22:20:26 +00:00
PeterNandGitHub 32fda83d39 Fix aa7ca7fe6: Linkgraph node index order must be maintained due to other references. (#7431)
Linkgraph nodes require a specific order that was maintained by swapping just the last
element for the node to be removed. std::vector::erase() changed this to removing the
node is then shuffling the remain items down, which upsets other references to this
indices.

This is fixed by switching back to the original swap & pop method.
2019-03-30 22:19:50 +00:00
PeterNandGitHub b6e3e30d86 Codechange: Distance between town and airport has already just been found, so use it. (#7427)
Previously the distance was thrown away, only to be expensively recalculated again.
2019-03-29 17:43:06 +00:00
PeterNandGitHub 9244dad3f1 Fix #7434: Incorrect use of vector iterator. (#7437) 2019-03-29 17:42:32 +00:00
PeterNandGitHub 7fb77ff35a Fix: Incorrect display of industry production around tiles. (#7426)
Display of industry production around tiles (as shown when placing a station)
did not take account of the station catchment changes, so still showed production
from an industry even if it was not covered by a tile.

This is fixed by making a set of nearby industries that are covered, instead of
looping over all possible industries.
2019-03-27 23:10:02 +00:00
PeterNandGitHub e3ea758c46 Fix #7414: Reinstate marking sign dirty before removal. (#7416) 2019-03-25 23:24:40 +00:00
PeterNandGitHub 698241e16e Fix #7410: Sign position/width not set on initial creation. (#7413)
Sign width was only updated when the text was changed. This seems to work for player-placed
signs as there is always a rename operation, however AIs can create a sign with text in one
go, in which case the width was never set.
2019-03-25 20:01:55 +00:00
PeterNandGitHub a4073895ae Fix #7411: Use industry production callback (if used) on initial industry cargo generation. (#7412) 2019-03-25 19:30:23 +00:00
PeterNandGitHub 4feea8db67 Fix: Filtered file list did not scroll properly. (#7402) 2019-03-23 17:59:19 +00:00
PeterNandCharles Pigott bcfc9620b0 Change: Use default value for invalid multi-string settings instead of clamping to min or max value. (#7361) 2019-03-16 16:52:07 +00:00
PeterNandGitHub 42046af933 Add: Add flag and railtype sprite type to draw pre-combined ground sprites. (#7231) 2019-03-09 02:53:43 +00:00
PeterNandGitHub 6c6971fb43 Add: Road vehicle path cache. (#7261) 2019-03-08 23:52:45 +00:00
PeterNandGitHub dd20ccee88 Feature: Industries with neutral stations (e.g. Oil Rig) only supply/accept cargo to/from their neutral station. (#7234)
This change is a controlled by a game setting, located under Environment ->
Industries which allows toggling the behaviour. It defaults to enabled.

"Company stations can serve industries with attached neutral stations"

When enabled, industries with attached neutral station (such as Oil Rigs) may
also be served by company-owned stations built nearby. This is the traditional
behaviour.

When disabled, these industries may only be served by their neutral station.
Any nearby company-owned stations won't be able to serve them, nor will the
neutral station serve anything else other than the industry.
2019-03-08 18:30:44 +00:00
PeterNandGitHub 41563a871b Add: AI API for vehicle group colours (#7336) 2019-03-08 18:13:33 +00:00
PeterNandGitHub 7f00a420cb Fix: Runway too short for large aircraft message should not depend on plane crashes setting. (#7325) 2019-03-04 19:00:11 +00:00
PeterNandGitHub ebc3934ee6 Fix #7043, Fix #7274: Delete town owned bridge based on adjacent tile ownership, not nearest town. (#7284)
This only affects failed town generation, as towns do not delete bridges under any other circumstances.

The existing test performed badly with a large number of towns due to having to calculate the
nearest town, and also by its nature assumed a bridge was built by the nearest town, leading
to bridges of nearby large towns be removed incorrectly.

If we gain the ability to quickly retrieve the correct town (which is _not_ the nearest town) from the bridge, this change should be reviewed.
2019-03-03 22:28:55 +00:00
PeterNandGitHub cbaf52fbe1 Codechange: Sort and filter sign names directly rather than through string system. (#7304)
This provides a notable performance benefit in the Sign List window when there are many signs.
2019-03-02 17:08:45 +00:00
PeterNandGitHub 63fe6c6598 Codechange: Make std::stack use std::vector container in string formatting/drawing. (#7305)
This is a very minor performance increase which can add up during operations such
as sorting. Performance impact my be platform/compiler dependent.
2019-03-02 08:06:02 +00:00
PeterNandGitHub 9ad5112628 Change: [AzurePipelines] Add freetype dependency for OSX. (#7299) 2019-02-28 19:33:31 +00:00
PeterNandGitHub 195fd0dc60 Fix #7266: Reorder reinitialization of caches when changing font zoom level. (#7273) 2019-02-24 16:27:44 +00:00
PeterNandGitHub 87ebfe1227 Fix #7004: Mark linkgraph dirty to be rebuilt on next draw call. (#7265)
Previously the linkgraph was rebuilt before the viewport extents were finalized.
2019-02-23 19:19:41 +00:00
PeterNandGitHub eeae4512ae Fix #7003: Freetype fonts were scaled by both GUI and Font zoom levels. (#7267) 2019-02-23 16:07:25 +00:00
PeterNandGitHub 84961034e4 Change: Increase maximum number of orders from 64000 to ~16.7m. (#7220) 2019-02-18 07:37:25 +00:00
PeterNandGitHub 5dc377244d Fix #7224: AI could no longer create groups. (#7233) 2019-02-15 19:15:53 +00:00
PeterNandGitHub 3a4b6b476b Change: Use selected group as parent when creating a new group. (#7224) 2019-02-15 18:43:33 +00:00
PeterNandGitHub c0c8fb25fb Change: Use SlErrorCorrupt() on pool index error when loading a savegame, instead of terminating. (#7219) 2019-02-13 09:01:49 +00:00
PeterNandGitHub aa737715dd Fix #7151: AI start date deviation was still applied when not set to a random AI. (#7223) 2019-02-11 18:59:55 +00:00
PeterNandGitHub 22f33fdd08 Fix 148e5b41d6: Uninitialized variable usage. (#7216) 2019-02-10 21:06:09 +00:00
PeterNandGitHub d242875d27 Fix #7197: Invalidate depot buttons when necessary. (#7212) 2019-02-10 08:43:54 +00:00
PeterNandMichael Lutz 4764d1c45e Doc #7181: AAT_STATION_AIRPLANE_LAND triggers only a single tile, not all airport tiles. (#7182) 2019-02-06 00:33:49 +01:00
PeterNandIngo von Borstel 23960d0f2c Feature: Group liveries, and livery window usability enhancements. (#7108)
* Change: Replace checkbox in livery selection window with Default option in drop down selection.

This reduces clutter in the UI and allows for primary/secondary colours to independently follow the default scheme if desired.

* Feature: Add vehicle group liveries.
2019-01-31 14:57:44 +01:00
PeterNandIngo von Borstel 498ca6e4eb Add: [GitHub] Add issue template to encourage better issue reporting. (#7137) 2019-01-29 18:15:54 +01:00
PeterNandGitHub c3dbe836b4 Add: Draw network password indicator lock in company drop down list. (#7079) 2019-01-22 12:42:52 +00:00
Peter NelsonandMichael Lutz f35b135e17 Change 81330b8d6e: Cached path only needs to be cleared if it was found to be invalid. 2019-01-20 11:06:33 +01:00
Peter Nelson 4daaec1a94 Change: Invalidate ship path caches if pathfinder choice or forbid-90-degree turns are changed. 2019-01-19 23:11:17 +00:00
PeterNandCharles Pigott 89f0017a67 Fix #7050: Missing guard around network chat message function for compiling with networking disabled. (#7058) 2019-01-13 16:50:21 +00:00
PeterNandCharles Pigott 5ff0c24993 Fix #6780: Some windows didn't get updated from OnTick() (#7048) 2019-01-12 23:23:23 +00:00
PeterNandGitHub 11ab3c4ea2 Change: Increase cargo type limit to 64. 2018-06-26 13:32:58 +01:00
PeterNandGitHub c2a7728084 Fix: Prevent ships moving into docks after finishing (un)loading. (#6791) 2018-06-14 09:25:39 +01:00
PeterNandGitHub eaa32f5ad5 Change: Use name of cargo instead of Passengers/Mail in town statistics. (#6801)
* Change: Use name of cargo instead of Passengers/Mail in town statistics.
* Cleanup: Remove strings from all language files.
2018-06-04 13:14:11 +01:00
PeterNandGitHub a07394a63a Change: Remove direction parameter from Vehicle::UpdateDeltaXY. (#6792)
The value is either unused or always the same as this->direction.
2018-05-22 18:43:34 +01:00
PeterNandGitHub 4cebebcf68 Change: Add CargoTypes type for cargo masks. (#6790) 2018-05-21 22:08:39 +01:00
PeterNandGitHub 42b43c9983 Change: Available railtypes is always calculated on load, so no need to load value for old savegames (#6782) 2018-05-19 22:31:46 +01:00
PeterNandGitHub cad47bbefe Fix: Tractive effort was slightly too high as per NewGRF spec. (#6785) 2018-05-19 22:05:51 +01:00
PeterNandGitHub 8a7de36463 Change [#6689]: Tweak HashTable hash calculation to reduce collisions. (kernigh2) (#6786) 2018-05-19 22:04:25 +01:00
PeterNandGitHub cfe6a8ea4f Add: Replace independment map scrolling GUI settings with single option, and add choice to not lock cursor position when scrolling. (#6756) 2018-04-28 22:27:14 +01:00
PeterNandGitHub 3b32075e8a Add: {PUSH_COLOUR} and {POP_COLOUR} control codes to handle switching colours. (#6737)
This replaces the internal SCC_PREVIOUS_COLOUR swap.
2018-04-19 19:33:21 +01:00