summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
AgeCommit message (Collapse)Author
2022-01-16RandomTile() and RandomTileSeed() should use the TopTile() most of the time ↵Erich Eckner
(always?)
2022-01-16underground patch appliedErich Eckner
2021-12-19Cleanup #9725: Clean up Doxygen docs and fix typo. (#9753)Joan Josep
2021-12-16Codechange: Don't use a global for the terrforming error tile.Michael Lutz
2021-12-16Codechange: Don't use a global for the 'not enough cash' message.Michael Lutz
2021-12-16Codechange: Don't use globals for story/goal/sign/group command proc return ↵Michael Lutz
values.
2021-12-16Codechange: Un-bitstuff landscape commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff town-related commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff remaining transport infrastructure commands.Michael Lutz
2021-12-16Codechange: Template DoCommand to automagically reflect the parameters of ↵Michael Lutz
the command proc. When finished, this will allow each command handler to take individually different parameters, obliviating the need for bit-packing.
2021-12-16Codechange: Move flags in CommandProc in front of the command arguments.Michael Lutz
2021-12-16Codechange: Let the compile generate the master command table out of ↵Michael Lutz
templated command traits. This is using a non-intrusive type-traits like templated system, which allows compile-time validation that the command table and the command enum match up.
2021-12-16Codechange: Move command arguments to the back of the DoCommand function call.Michael Lutz
2021-08-31Fix #9407: desync when founding a town nearby a station (#9526)Patric Stout
"stations_near" wasn't updated when founding a town near a station. As this variable is not saved, any client joining after the town is founded has a different value for "stations_near", potentially causing desyncs. As the intention of this if() statement was to skip an expensive calculation when there are clearly no stations, better to move that check inside the function, so other places also enjoy the speedup.
2021-07-01Codechange: use the constructor for CompanyNewsItem to fill the data instead ↵rubidium42
of a separate function
2021-07-01Codechange: create a type for the "free_data" of NewsItems and (de)allocate ↵rubidium42
it with new and delete
2021-06-03Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways ↵Patric Stout
we had While at it, replace OTTD_ASSERT with WITH_ASSERT, as this is always set if assert() is valid. No matter if NDEBUG is set or not.
2021-05-30Fix #9316, 64eddaeb: at about 250.000 inhabitants the bridge length limit ↵rubidium42
check overflows
2021-05-29Codechange: Rename window related DeleteXXX to match new behaviourglx22
2021-05-29Codechange: move from C-string to std::string for DoCommandrubidium42
2021-05-29Codechange: let IsUnique.* functions accept std::stringrubidium42
2021-05-27Fix: do not hide parameter by local variable with the same namerubidium42
2021-05-10Fix: memory leak due to assigning result of strdup to a std::stringRubidium
2021-05-08Change: Use gender-neutral pronouns in console command messages (and ↵William Davis
comments) (#9203)
2021-04-29Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loopsglx22
2021-04-01Fix #8919: Release builds with asserts enabled (#8925)Charles Pigott
2021-04-01Codechange: Suppress warnings when asserts are disabled (#8917)Patric Stout
2021-02-14Codechange: turn a constant variable into a real constant.frosch
2021-02-05Codechange: Apply coding style (#8640)SamuXarick
* 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-01-31Fix: don't walk out of the map when trying to build tunnels (#8600)Tyler Trahan
2021-01-09Fix #8462: Don't check whether to grow a town road on water (#8471)SamuXarick
2021-01-09Revert 78f92130: "Fix #8506: Towns shouldn't add junctions to NewGRF roads ↵Patric Stout
they cannot build (#8535)" (#8541) As per https://github.com/OpenTTD/OpenTTD/pull/8535#issuecomment-757122918, jumped the gun here.
2021-01-09Fix #8506: Towns shouldn't add junctions to NewGRF roads they cannot build ↵Tyler Trahan
(#8535)
2021-01-08Fix 7bdfb38: Drive-thru road stations can be connected at either end (#8528)Tyler Trahan
2021-01-08Add: Towns can build tunnels (#8473)Tyler Trahan
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
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-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
2020-12-27Codechange: Replace assert_compile macro with static_assertCharles Pigott
2020-12-25Change: Towns don't build dead-end road bridges (#8401)Tyler Trahan
2020-06-28Change #8159: Remove now unused town cargo caches without bumping the ↵dP
savegame version
2020-06-01Codechange: remove has_newhouses globalYexo
2020-05-21Codechange: Use std::string for most of the user-settable custom names.Michael Lutz
2020-05-18Fix: Desync after house replacementdP
2020-05-13Fix #8137: New clients can't join (desync) after funding an industrydP
2020-05-13Codechange: Refactor FindStationsAroundTiles to avoid code duplicationdP
2020-01-12Codechange: Cache resolved town, station and industry name stringsJonathan G Rennison
2020-01-12Change: Only resort town directory window on population change if necessaryJonathan G Rennison
2020-01-05Fix #7899, 196d5868: don't trigger filter changes more than expectedglx