Commit Graph

402 Commits

Author SHA1 Message Date
rubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 2021-05-29 19:02:18 +02:00
glx22 2feb801e56 Codechange: Replace FOR_ALL_ROADTRAMTYPES with range-based for loops 2021-05-03 19:46:57 +02:00
frosch f580ab4ba4 Fix #8647: draw tram catenary using 4 bounding boxes.
The back sprite is now supposed to contain west, north and east pillars.
The front sprite is supposed to contain the south pillar and the wires.
2021-03-11 00:21:09 +01:00
frosch d9b4413bc9
Codechange: rename sound ids to make more sense. (#8701) 2021-02-20 19:01:04 +01:00
Matt Kimber 2a6da319b2
Fix 0125892: Don't crash when towns upgrade road tiles during expansion (#8651) 2021-02-07 16:15:46 +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
gooball c017a3662a
Change: converting town-owned road types now require town rating (#8457) 2021-01-05 11:45:07 +01:00
gooball 0125892f04
Fix #8297: Infrastructure counters for road tunnels, bridges, depots … (#8454)
The previous fix 887e9481ff0e70df6bf93ce15a3899a03f124c50 only worked for roads and failed to consider a multiplier used for the infrastructure totals for tunnels/bridges.
Also, depots and bus/truck stops are counted as 2 road pieces on creation but were only counted as 1 road piece on conversion because the function DiagDirToRoadBits() was used, which only ever returns single-piece road segments.

Co-authored-by: A. S <admin-git@sotai.tk>
2020-12-28 22:54:28 +01:00
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 2020-12-27 10:55:42 +00:00
TrevorShelton c7e391da93 Change #8162: Conversion of Town Road, Impr. Error
This changes the error when you attempt to convert a road owned by a town to another road, specifying that it's owned by the town rather than simply being incompatible. As the original poster of the issue pointed out, these seemed to be the only occurences of the incompatible road string, so now it's unused, but they would be left untouched in case of future use or since changing it to a different error would do the work of removing it then. If requested, it likely wouldn't be too difficult to remove the string entirely.
2020-07-10 14:47:55 +01:00
Charles Pigott 75a2ae2f48 Change: Also make roadside trees match the tree transparency option 2020-06-27 16:07:17 +01:00
Jonathan G Rennison 12380fc1bb Fix: Assertion failure when post road-works cleanup removes all road pieces 2020-01-05 20:44:07 +00:00
Daniel Lee 24bace32ba Fix #7625: Road infrastructure cost is correctly updated on upgrading your own roads. 2019-12-31 19:17:56 +00:00
glx e3c75a30ba Fix: unused variable warnings 2019-12-21 20:13:03 +01:00
glx d8a1be48cd Codechange: Replace vehicle related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Niels Martin Hansen 81614f2378 Fix #7633: Allow zero-cost track conversion to succeed 2019-07-06 21:04:43 +02:00
PeterN f4921d2c3e
Fix #7576: Crash when destroying rail/tram crossing. (#7579) 2019-05-10 21:07:38 +01:00
peter1138 1fe580cd2b Fix c02ef3e456: Incorrect order of road toolbar icons. 2019-05-04 19:51:38 +01:00
peter1138 c02ef3e456 Feature: Add NotRoadTypes (NRT) 2019-05-01 21:36:27 +02:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Peter Nelson e982b9131e Fix #7142: Missing map bounds check when building long roads. 2019-01-30 17:08:36 +00:00
Joan Josep 9aecbac2b4 Codechange: Define INVALID_TOWN as a TownID (#7044) 2019-01-12 23:20:10 +00:00
Jonathan G Rennison df92a056df Fix #6875: Depot building cost does not include foundation build cost (#6883) 2018-08-14 22:05:47 +02:00
frosch 7f1c176706 (svn r27746) -Fix [FS#6538]: PR_CLEAR_ROAD refers to cost per roadbit. Removing secondary roadtypes from bridges was too cheap. (JGR) 2017-02-12 12:03:07 +00:00
frosch 10293c5fb1 (svn r27686) -Change: List railtype of rail tiles explicitly in the tile info window. 2016-12-09 21:27:22 +00:00
frosch d9bfe88261 (svn r27676) -Codechange: Rename catenary functions, so that they refer unambiguously to either RoadCatenary or RailCatenary. 2016-11-05 11:53:03 +00:00
frosch eb909f2785 (svn r27312) -Fix-ish [FS#6317]: Preserve town ownership of bridges when removing road from a road+tram bridge. (marcole) 2015-06-21 09:31:50 +00:00
frosch 62bc57db77 (svn r27311) -Fix: Mark infrastructure window dirty in more cases. (marcole) 2015-06-21 09:19:27 +00:00
frosch 904688c00a (svn r27308) -Fix [FS#6283]: Prevent breaking of tram-reversal points by adding more road pieces. (adf88) 2015-06-20 13:11:09 +00:00
michi_cc 67242d2269 (svn r27186) -Codechange: Rename AlwaysDrawUnpavedRoads() to better reflect what it does. 2015-03-14 14:27:07 +00:00
frosch e8e49e5dda (svn r27157) -Fix: Mark bridge middle tiles dirty when building/removing/changing bridges. 2015-02-22 14:01:24 +00:00
rubidium 4978ece6ee (svn r26955) -Fix [FS#6126]: owner of road depot road types were not properly changed upon bankruptcy causing crashes when trying to remove the depot in certain situations 2014-10-04 19:23:43 +00:00
peter1138 51fe741987 (svn r26906) -Codechange: Scale depot and station picker buttons by GUI zoom level. 2014-09-22 08:01:25 +00:00
rubidium 9daf7e749c (svn r26879) -Codechange: remove most MayHaveBridgeAbove calls since the data is now always accessible 2014-09-21 11:24:51 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
frosch 3ce8d2ce70 (svn r24846) -Add: Advanced settings to disable certain sound effects. 2012-12-23 21:09:09 +00:00
terkhen 9b5ff794c7 (svn r24626) -Fix [FS#5432]: MSVC 2010 warnings. 2012-10-25 17:38:12 +00:00
terkhen 55dccee02f (svn r24503) -Change [FS#5228]: When building long roads or tramways, only build the roadbits at the beginning and the end if they can connect to something. 2012-09-01 14:58:36 +00:00
frosch ab2ce64b6b (svn r24414) -Fix [FS#5221]: Disallow removing roadtypes from bridges when not dragging in bridge direction. 2012-07-18 19:25:00 +00:00
rubidium 41e5c839e0 (svn r24179) -Codechange: move some variables of Town to TownCache 2012-04-25 20:50:13 +00:00
rubidium 9a49a60048 (svn r23847) -Fix: when removing road or tram from a tram+road stop, the owner of the road stop's cache was updated instead of the owner of the removed infrastructure 2012-01-24 19:24:02 +00:00
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
rubidium fbbfaac819 (svn r23684) -Cleanup: let the highway take the highway 2011-12-28 20:06:51 +00:00
truebrain 084f4e6aac (svn r23629) -Add: allow ScriptRoad::BuildRoad, ScriptBridge::BuildBridge (for roads) and ScriptTunnel:BuildTunnel (for roads) to work for GameScript 2011-12-19 21:02:33 +00:00
michi_cc aba9f98a73 (svn r23593) -Fix (r23411): Infrastructure counts for rail were not properly updated when converting rail or building level crossings. 2011-12-19 14:24:12 +00:00
michi_cc a29a9d94b7 (svn r23412) -Add: Company infrastructure counts for road. 2011-12-03 23:40:18 +00:00
michi_cc d30fcd4e35 (svn r23411) -Add: Company infrastructure counts for rail. 2011-12-03 23:40:13 +00:00
yexo 6a272233b3 (svn r23160) -Fix: wrong comments in a lot of TileTypeProcs definitions 2011-11-08 17:37:32 +00:00
rubidium 2a2c102b0b (svn r23108) -Codechange: more uint -> int / byte -> int conversions for Z related variables 2011-11-04 11:52:19 +00:00
rubidium 459c9523e8 (svn r23107) -Codechange: let GetSlopePixelZ and TerraformTile tile type functions use int z as well 2011-11-04 11:36:10 +00:00
rubidium 19eabdba2c (svn r23106) -Codechange: pass int* to GetTileSlope and friends 2011-11-04 11:30:37 +00:00
rubidium 1dc685aeea (svn r23100) -Codechange: remove pointless multiplications by TILE_HEIGHT for the terraform code 2011-11-04 10:30:10 +00:00
rubidium d0689c2924 (svn r23097) -Codechange: remove pointless multiplications by TILE_HEIGHT from the bridge code 2011-11-04 10:28:20 +00:00
rubidium 69162621d8 (svn r23096) -Codechange: remove useless divisions and multiplications by TILE_HEIGHT for the snow line code 2011-11-04 10:25:58 +00:00
rubidium ecbc56a677 (svn r23094) -Codechange: add a default NULL to GetFoundationSlope and use it 2011-11-04 10:23:48 +00:00
rubidium 2ed0f93bfb (svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it 2011-11-04 10:22:27 +00:00
rubidium 7757a2ed40 (svn r23091) -Codechange: rename some Get*Z functions to Get*PixelZ functions if they return the Z in pixels (like TilePixelHeight) 2011-11-04 10:18:13 +00:00
frosch 804090b317 (svn r22968) -Feature: Allow road corners on steep slopes. 2011-10-01 16:45:25 +00:00
frosch 8d5c1479f4 (svn r22960) -Feature: Allow depots, standard roadstops and airports on steep slopes. 2011-09-25 13:35:17 +00:00
planetmaker b102b58bde (svn r22765) -Cleanup: Remove unused constants and name a magic constant 2011-08-20 05:35:03 +00:00
rubidium cfc2c5db42 (svn r22699) -Fix [FS#4681]: Cost of adding an extra road type to a bridge or tunnel was undercalculated (adf88) 2011-07-30 13:55:44 +00:00
frosch 8f921c8747 (svn r22516) -Codechange: Replace some magic numbers with the appropiate enum values. (Eddi) 2011-05-29 08:56:05 +00:00
alberth 28092366ec (svn r22459) -Doc: Typo fixes and doxygen markup improvements. 2011-05-14 18:35:40 +00:00
rubidium 5a620d1c65 (svn r22406) -Document: some more "random-ish" tidbits 2011-05-01 19:51:52 +00:00
planetmaker 914f8e9f1d (svn r22080) -Doc: Add doxygen comments to a few functions and improve a few existing comments 2011-02-14 19:52:26 +00:00
rubidium bc3ce1e53b (svn r22018) -Cleanup: remove some (now) unneeded includes of functions.h 2011-02-07 22:37:22 +00:00
rubidium 4eb4aad54f (svn r21765) -Fix [FS#4369]: PBS reservation was not shown on road crossings with NewGRF railtypes (andythenorth) 2011-01-09 20:54:56 +00:00
yexo bd379e283f (svn r20728) -Codechange: shuffle some code in CMD_BUILD_ROAD so it doesn't call CMD_LANDSCAPE_CLEAR in test-mode from exec-mode 2010-09-03 21:41:08 +00:00
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 2010-08-26 22:01:16 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
rubidium e356cb9405 (svn r20281) -Codechange: unify case scope closure + break coding style 2010-08-01 18:53:30 +00:00
rubidium cfdcb6cbee (svn r20230) -Fix [FS#3961]: road vehicles could be dead locked with one way roads. This allows one wayness to be removed if there are vehicles on a tile; it does not allow you to add one wayness to roads that have vehicles on them as it makes turning vehicles jump 2010-07-27 22:00:43 +00:00
alberth 43b4d23b07 (svn r20215) -Fix [FS#3971]: Remove all road pieces rather than aborting at the first ownership error (Krille). 2010-07-25 10:04:13 +00:00
rubidium b8487afe54 (svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :) 2010-07-19 17:28:27 +00:00
rubidium 73527b7b45 (svn r20190) -Codechange: unVARDEF _generate_world and move it to genworld 2010-07-19 17:17:36 +00:00
terkhen 40e58f78ba (svn r20113) -Add [FS#3895]: Show an specific error message when trying to remove nonexistant roads (Krille). 2010-07-10 20:12:32 +00:00
terkhen f363f64c51 (svn r20099) -Fix [FS#3882]: Give priority to ownership errors while removing roads. 2010-07-09 16:41:51 +00:00
alberth 82fc340a0a (svn r20097) -Codechange: Share constant bitset of safe level crossing slopes. 2010-07-09 12:14:02 +00:00
michi_cc 34f32cbbf4 (svn r20049) -Feature: [NewGRF] Add a railtype flag to disallow level crossings per railtype. 2010-07-02 16:34:11 +00:00
rubidium b1d60d66cf (svn r20036) -Fix [FS#3911]: tram tracks didn't show at level crossing with the new railtypes 2010-06-30 16:08:12 +00:00
yexo 9cfb61adf5 (svn r20003) -Feature [FS#3886]: [NewGRF] var 43 depot build date for railtypes 2010-06-20 19:13:02 +00:00
rubidium 93ff7d78e1 (svn r19799) -Change: give depots an unique name in the same manner buoys and waypoints are named 2010-05-12 19:21:00 +00:00
rubidium fe71d4fc99 (svn r19791) -Change: use the typed FOR_EACH_SET_BIT for RoadTypes (adf88) 2010-05-11 21:01:57 +00:00
frosch 75d4bc947d (svn r19654) -Codechange: Use Extract<> in more places. 2010-04-17 13:31:41 +00:00
frosch b76f0185d4 (svn r19616) -Codechange: Increase transparency of 'Extract' by passing also the number of used bits. 2010-04-13 17:29:19 +00:00
smatz 0ef33548c2 (svn r19614) -Codechange: "it's" => "its" where appropriate 2010-04-12 14:12:47 +00:00
alberth 05d705e077 (svn r19494) -Codechange: Remove _error_message. 2010-03-20 17:58:24 +00:00
alberth b714160fcc (svn r19491) -Codechange: Keep track of last error in CmdRemoveLongRoad(). 2010-03-20 17:14:26 +00:00
frosch 7bf13ea692 (svn r19436) -Fix: With certain game settings one could clear tiles for free when building long roads. 2010-03-16 17:54:10 +00:00
peter1138 604da97364 (svn r19434) -Add: Add rail speed limit to land area information window. 2010-03-16 06:43:41 +00:00
alberth 05e549ccdc (svn r19420) -Codechange: Don't use _error_message to keep track of success/failure, use a had_success boolean. 2010-03-14 15:42:26 +00:00
alberth 3b367ab708 (svn r19415) -Codechange: Forward CommandCost with an error back to the caller. 2010-03-14 12:58:51 +00:00
alberth 5e7c4398ae (svn r19412) -Codechange (r9942): One pair of parentheses is enough. 2010-03-13 20:03:58 +00:00
alberth 7cc68f493d (svn r19405) -Codechange: CheckOwnership() returns a CommandCost. 2010-03-13 17:11:28 +00:00
alberth 7e1a91db21 (svn r19402) -Codechange: CheckAllowRemoveRoad() returns a CommandCost. 2010-03-13 15:53:44 +00:00
alberth 6b6ff9c52b (svn r19400) -Codechange: CheckforTownRating returns a CommandCost. 2010-03-13 15:33:07 +00:00
alberth 40f106ba7c (svn r19372) -Codechange: CheckTileOwnership() returns a CommandCost. 2010-03-07 20:44:05 +00:00
alberth c395b93acd (svn r19319) -Codechange: EnsureNoVehicleOnGround() returns a CommandCost. 2010-03-05 21:20:22 +00:00