Commit Graph
72 Commits
Author SHA1 Message Date
SamuXarickandGitHub 1f194eb94e Fix: [Script] Incorrect value for GOAL_INVALID (#10436)
* Fix: [Script] Incorrect value for GOAL_INVALID

* Cleanup: Remove unused static variable
2023-02-01 23:35:51 +01:00
SamuXarickandrubidium42 d0639cdc28 Fix: [Script] Incorrect subsidy SourceID value used 2023-02-01 21:17:16 +01:00
SamuXarickandrubidium42 4fc4874a30 Add: [Script] Let random road layout be a choice 2023-02-01 21:15:13 +01:00
SamuXarickandGitHub 184ff92057 Cleanup: [Script] Pass new_rating directly to CmdTownRating (#10441) 2023-02-01 13:48:39 -05:00
SamuXarickandGitHub df89c34e03 Fix 7e1e275: Measure AI Collect Garbage performance (#9924) 2023-01-28 20:18:28 +01:00
SamuXarickandGitHub 46dc6da270 Codechange: Make void tiles flood edge tiles, instead of edge tiles flooding themselves (#8517) 2023-01-26 21:57:25 +01:00
SamuXarickandGitHub b2a5ebcfc4 Fix 3c047b1: AIGroup.GetProfitLastYear could get values different than those displayed in GUI (#10227)
* Change: Store "all time" and "since minimum age" last year profits on groups

* Fix: Update last year profit for groups when copying vehicle statistics on autoreplace

* Codechange: Refactor profit last year

* Change: Rename some group related items for clarity

* Change: Reorder the fields in GroupStatistics

That way less memory gets wasted.
2023-01-22 08:14:02 -05:00
SamuXarickandGitHub 96ec9908a0 Codechange: refactor removal of desert around river tiles 2023-01-15 00:43:41 +01:00
SamuXarickandGitHub a8a7f95665 Change: Allow to build dock on clearable watered object tiles (#8514) 2022-11-08 21:04:14 +01:00
SamuXarickandGitHub 60ccab3c52 Fix #9908: Close company windows only after all its infrastructure is removed (#9912) 2022-11-08 09:44:17 -05:00
SamuXarickandGitHub b7abaa55a3 Codechange: Improve performance when calculating company value (#9901) 2022-11-08 11:11:24 +00:00
SamuXarickandGitHub 8c4a70e05e Fix: Refresh company window when switching companies (#9910) 2022-11-07 17:54:04 -05:00
SamuXarickandMichael Lutz c7505539af Fix #9869: remove docking tile when doing a clear square
Terraforming through objects placed on water didn't properly remove docking tiles as expected.

By moving some logic regarding removal of docking tiles into DoClearSquare, the issue is solved, while also simplifying code, avoiding repetition elsewhere.
2022-10-16 18:29:03 +02:00
SamuXarickandMichael Lutz be7db78767 Add: ScriptCargo::GetWeight regression tests 2022-10-16 18:28:28 +02:00
SamuXarickandMichael Lutz 8d0d45c431 Add: ScriptCargo::GetWeight to get cargo weights 2022-10-16 18:28:28 +02:00
SamuXarickandMichael Lutz e604b76d18 Fix: List a max of four share owners instead of three
An AI company may have four different share owners, but the company information window is limited to display a max of three. This commit increases that limit.
2022-10-16 18:27:54 +02:00
SamuXarickandMichael Lutz 3dda8c9bad Fix: ScriptRoad::HasRoadType really check for RoadType
Script::HasRoadType was only checking if the tile had the same RoadTramType as that of the RoadType provided.
Now it really checks RoadType against RoadType.
2022-10-16 18:27:23 +02:00
SamuXarickandMichael Lutz 374f0c7d11 Fix 6fe445e: Removing rail station parts without ctrl pressed was also removing tracks
The behaviour of holding ctrl key is swapped
2022-08-07 10:58:43 +02:00
SamuXarickandGitHub e404d16929 Fix #9591: Update station docking tiles upon placing a water object on a docking tile (#9594) 2021-10-03 12:54:19 +02:00
SamuXarickandGitHub 45edd9f326 Fix: Incorrect error messages on placing water on scenario editor (#9560)
Additionally changes the behaviour of placing sea on sea/river/canal and placing canal/river on canal to (over)build, instead of disallowing it
2021-09-19 23:14:07 +02:00
SamuXarickandGitHub 18247bb3b8 Fix #9521: Don't load at just removed docks that were part of a multi-dock station (#9524) 2021-09-18 13:25:07 +02:00
SamuXarickandPatric Stout b335b0501c Fix: wrong error message when building canals over ship depots / locks
IsTileType() also considers ship depots and locks water. IsWaterTile() does the right thing.
2021-09-18 13:24:49 +02:00
SamuXarickandPatric Stout 6ce74b2a1b Fix: reduce cost of building canals over objects on sea
It is not like we will drain the sea first, to put water back in it after.
Besides, the cost for draining the sea isn't calculated for all other cases either.
2021-09-18 13:24:49 +02:00
SamuXarickandGitHub a57c2b073a Feature: Display icon/text whether vehicle is lost in vehicle (list) window (#9543) 2021-09-14 22:10:00 +02:00
SamuXarickandGitHub 37de878129 Feature: [AI/GS] Missing water related functions and objects (#8390) 2021-09-14 22:06:55 +02:00
SamuXarickandGitHub 120d216b0b Add: [AI] Get the number of vehicles in a given group (#9462) 2021-08-12 21:29:03 +02:00
SamuXarickandGitHub 26f7f592cd Fix #8316: Make sort industries by production and transported with a cargo filter possible (#8468) 2021-08-11 19:25:59 +02:00
SamuXarickandGitHub 76b8343777 Fix #9392: Return a valid value with GetBuildWithRefitCapacity when AIs are maxed out in vehicles (#9393) 2021-08-11 19:21:34 +02:00
SamuXarickandGitHub 003b6a0c85 Fix ea9715d: not all setting values were clamped properly (#9401) 2021-06-28 00:58:54 +02:00
SamuXarickandGitHub 1e6a2163a5 Fix #9358: Don't skip empty files in tar (#9367) 2021-06-18 00:08:49 +02:00
SamuXarickandGitHub d0bcb9839a Fix: you could join an AI company in multiplayer via the GUI (#9369) 2021-06-15 14:00:50 +02:00
SamuXarickandCharles Pigott cb95b1d2e7 Codechange: Apply coding style 2021-02-20 17:59:04 +00:00
SamuXarickandCharles Pigott 7577dfa575 Codechange: Apply coding style 2021-02-19 00:14:30 +00:00
SamuXarickandLoïc Guilloux 36ab9c64ef Fix: Desert/rainforest data coordinate 'y' is off by 1 when their 'x' coordinate is negative 2021-02-13 19:18:41 +01:00
SamuXarickandGitHub a4035af337 Codechange: Apply coding style (#8640)
* Fix: Missing or needed spaces

* Codechange: Remove space

* Codechange: Remove space

* Codechange: More missing spaces

* Codechange: Missing spaces

* Codechange: Remove space

* Codechange: Remove space
2021-02-05 11:00:36 +01:00
SamuXarickandCharles Pigott f9dee5aaa0 Feature: Show rainforest under vegetation on small map 2021-01-13 15:05:15 +00:00
SamuXarickandMichael Lutz 6298d9221a Fix 218f40e: Warning about 32-bit shift implicitly converted to 64 bits 2021-01-10 22:31:01 +01:00
SamuXarickandglx22 75b7bb5097 Fix: Remove semicolons from regression output 2021-01-10 15:47:20 +01:00
SamuXarickandGitHub 8da5cff210 Fix #8462: Don't check whether to grow a town road on water (#8471) 2021-01-09 12:18:31 +01:00
SamuXarickandCharles Pigott 79d938b957 Fix 0125892: Warning about unsigned unary minus 2021-01-07 21:42:10 +00:00
SamuXarickandGitHub f84a466ca5 Fix #7945: Add cost of clearing the sloped tile when placing a dock (#7947) 2021-01-07 10:35:09 +01:00
SamuXarickandGitHub 9f423586ad Change #8325: Make engine reliability independent of introduction date (#8470) 2020-12-31 17:06:48 +01:00
SamuXarickandGitHub dc5b8020cc Fix #6452: Reset only editable and visible settings from GUI (#7890)
Also enables the Reset button while in-game for AI configs.
2020-12-27 15:05:47 +01:00
SamuXarickandGitHub 1d85d71d29 Fix: for original terrain generator, keep a single gap of water at the borders (#7883)
This means that for NE/NW, it should have one more in case of
freeform-edges, and in case of SE/SW it should have one less.

Reminder: freeform-edges only adds VOID tiles on X=0 and Y=0.
2020-12-15 21:52:41 +01:00
SamuXarickandGitHub a95fbd59a3 Fix #8119, f538179: Update docking tile area when placing a diagonal rail next to a dock end (#8124) 2020-05-09 22:27:06 +02:00
SamuXarickandYexo 8edbb42fe8 Fix c01a2e2: crash on loading old savegames with invalid animated tile information 2020-05-04 21:21:06 +02:00
SamuXarickandYexo c01803cd42 Fix #8108: possible crash on loading TTD savegames with phantom oil rigs 2020-05-04 21:21:06 +02:00
SamuXarickandGitHub 93a7ff6709 Fix: [Script] ScriptMarine::AreWaterTilesConnected failed for aqueducts (#8074) 2020-04-16 20:32:20 +02:00
SamuXarickandCharles Pigott e7b901462e Doc: [Script] Make it clear random_deviation and CONFIG_RANDOM range upper bounds are inclusive 2020-03-31 22:33:19 +01:00
SamuXarickandCharles Pigott 8f9654c5c6 Fix: [Script] Random deviation upper bound range should be inclusive 2020-03-31 22:33:19 +01:00
SamuXarickandNiels Martin Hansen 57553cd809 Fix #8020: Add missing docking tiles around industry neutral stations 2020-03-30 08:21:40 +02:00
SamuXarickandNiels Martin Hansen 4d4005d8b7 Fix #8039: [AI/GS] SetOrderFlags and GetOrderDestination didn't work for oil rigs 2020-03-30 08:18:32 +02:00
SamuXarickandGitHub 3e680c50ca Change: Open company window when clicking on a company goal (#8033) 2020-03-22 15:05:10 +01:00
SamuXarickandGitHub 3a08a7e99d Fix: Ignore clicks on non-applicable global goals (#8035) 2020-03-22 15:02:48 +01:00
SamuXarickandglx22 424770d662 Fix: [AI/GS] Consider neutral station setting when creating tile lists 2020-03-14 23:23:33 +01:00
SamuXarickandCharles Pigott 971201b3b7 Fix: [AI/GS] CanBuildConnectedRoadPartsHere neighbours tiles were at times incorrect 2020-03-13 13:54:11 +00:00
SamuXarickandGitHub ea7044a74b Fix f5381798: Station::GetTileArea reduced docks to a single tile (#8014) 2020-02-22 15:51:58 +01:00
SamuXarickandCharles Pigott fa71375ec2 Fix e04ca90: squirrel export script got forgotten 2020-01-07 15:07:24 +00:00
SamuXarickandCharles Pigott 9e7c5235e8 Fix #7891: Actually check the vehicle type before casting 2020-01-03 00:04:39 +00:00
SamuXarickandCharles Pigott 40605efd1c Codechange: Use KDTree for AirportGetNearestTown (#7424) 2019-12-24 17:37:30 +00:00
SamuXarickandCharles Pigott ccb4c3797f Fix #5405: Aircraft could route to depots outside their range (#7104) 2019-11-02 11:26:04 +00:00
SamuXarickandPeterN 4ad981a98e Fix 50e08f333a: Creating a cargo subsidy with town as source did not consider min population. (#7493) 2019-04-11 07:35:46 +01:00
SamuXarickandPeterN ed51fba7ed Change: Dark Blue company and water were indistinguishable in small map. (#7436) 2019-03-29 19:00:43 +00:00
SamuXarickandPeterN cdb6dbad85 Cleanup: Remove repeated network error message on connection timeout. (#7327) 2019-03-07 18:16:52 +00:00
SamuXarickandPeterN 50a0cf1915 Change: Allow towns to build bridges over rails and one-way roads. (#7291) 2019-02-28 17:45:17 +00:00
SamuXarickandPeterN 03264059e4 Change: Decrease minimum permitted value for script_max_opcode_till_suspend setting (#7243) 2019-02-28 17:37:50 +00:00
SamuXarickandNiels Martin Hansen 4adb91202d Fix: Remove desert around lakes upon generation 2019-02-23 13:16:12 +01:00
SamuXarickandPeterN 456e67ac1c Change: Owner of vehicle with exclusive transport rights may now load cargo from neutral stations (#7256) 2019-02-21 21:23:37 +00:00
SamuXarickandCharles Pigott 1e5a6765d9 Change: Give AI/GSBridge::GetName an extra parameter to refer the vehicle type (#6988) 2019-01-31 23:08:03 +00:00
SamuXarickandNiels Martin Hansen 4703cd433d Fix #6460: [AI] Add start_date parameter for Random AIs on new game 2018-11-01 17:56:09 +01:00
SamuXarickandfrosch 264e60529f Change: Gradually slow down aircraft speed on breakdown (#6932) 2018-10-31 12:45:23 +01:00
SamuXarickandfrosch 41fb7cb15e Fix #6892: [Script] CONFIG_RANDOM did not use the full parameter range (#6902) 2018-09-20 22:31:38 +02:00