alberth
ba5e072881
(svn r17582) -Codechange: Move TownActions and _town_action_costs[] to a header file to allow sharing.
15 years ago
rubidium
2e5596025c
(svn r17579) -Fix: remove doxygen docs for removed parameters, or change @param to @tparam if necessary
15 years ago
rubidium
310465da07
(svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos
15 years ago
rubidium
06e490fadc
(svn r17567) -Fix: some doxygen warnings
15 years ago
rubidium
0c2f375230
(svn r17558) -Feature [NewGRF]: callbacks for houses to disable drawing foundations and to disable slope changes, like industry tile callbacks 30 and 3C.
15 years ago
frosch
0e36260337
(svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability.
15 years ago
rubidium
10c3af4642
(svn r17493) -Codechange: store the depot index on the map
15 years ago
rubidium
33e1a11aa9
(svn r17444) -Fix [FS#3173]: when building roads isn't allowed for town, then don't build the initial piece either
15 years ago
smatz
5d622fd840
(svn r17439) -Fix (r17436): you weren't paid for cargo delivered to houses and headquarters anymore
15 years ago
rubidium
1cfc262fb0
(svn r17268) -Fix [FS#3143]: Station/Town window titles weren't updated when they got renamed
15 years ago
rubidium
99d46e0ad7
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
smatz
0502a6df42
(svn r17113) -Change [FS#265][FS#2094][FS#2589]: apply the subsidy when subsidy's destination is in station's catchment area and cargo packets originate from subsidy's source
...
-Change [FS#1134]: subsidies aren't bound to stations after awarding anymore, they still apply to town or industry, no matter what station is used for loading and unloading. Awarded subsidies from older savegames are lost
-Change [NoAI]: due to these changes, AISubsidy::GetSource and AISubsidy::GetDestination now return STATION_INVALID for awarded subsidies
15 years ago
smatz
738d7fde53
(svn r17107) -Codechange: store type of subsidy source and destination in the Subsidy struct instead of determining it every time it's needed
15 years ago
rubidium
d61be2637e
(svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives
15 years ago
belugas
96f9567fbb
(svn r16978) -Fix(r16977): tab indentation instead of space indentation at beginning of a line, please
15 years ago
belugas
e83102f78b
(svn r16977) -Fix(r1772)[FS#3059]: make it so that failing to generate many random towns in scenario editor returns a failing message.
...
Fix by therken
Doxygen comments by me
15 years ago
rubidium
6435dc89fe
(svn r16912) -Codechange: split waypoint.h in waypoint_base.h and waypoint_func.h
15 years ago
rubidium
39e6dbd5e3
(svn r16886) -Codechange: unify naming of some string IDs related to string codes and group them logically
15 years ago
rubidium
b4f5a1eebb
(svn r16868) -Codechange: unify UpdateAll[Station|Waypoint]VirtCoords
15 years ago
smatz
8718babe90
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
15 years ago
rubidium
e39646d93b
(svn r16841) -Cleanup: spaces/tabs where they don't belong
15 years ago
rubidium
873adde908
(svn r16825) -Codechange: unify dirtying when updating the viewport signs.
15 years ago
rubidium
79deeee323
(svn r16821) -Codechange: unify the naming of type::UpdateVirtCoord and UpdateAll[Type]VirtCoords.
15 years ago
rubidium
8cad64558f
(svn r16795) -Fix [FS#3025]: houses wouldn't get build on the map edge.
15 years ago
rubidium
bb78e5bb14
(svn r16764) -Codechange: unify the way viewport signs are marked dirty
15 years ago
rubidium
4989b4afb9
(svn r16761) -Codechange: make UpdateViewportSignPos(ition) a class function of ViewportSign
15 years ago
smatz
8786ebbad7
(svn r16746) -Codechange: use Town::PostDestructor() instead of not very clean construct for invalidating nearest town for road tiles
15 years ago
smatz
93557ba4e9
(svn r16714) -Codechange: use pool-like accessors for Subsidy
15 years ago
frosch
523cde0798
(svn r16678) -Codechange: Turn CargoArray into a class, so one does not have to deal with sizeof() wrt. typedef-ed arrays.
15 years ago
frosch
4c3f480f92
(svn r16676) -Codechange: Rename AcceptedCargo to CargoArray and its instances to more meaningful names.
15 years ago
smatz
837b3628d9
(svn r16673) -Codechange: rename GetProducedCargo() to AddProducedCargo() and change its behaviour accordingly
15 years ago
smatz
873a205ae6
(svn r16667) -Codechange: replace GetRandomTown() and GetRandomIndustry() by Town::GetRandom() and Industry::GetRandom()
15 years ago
smatz
0e5af86ead
(svn r16666) -Codechange: replace GetHouseSpecs() by HouseSpec::Get(), hide _house_specs[]
15 years ago
smatz
7b78bae8e7
(svn r16665) -Codechange: replace GetTownByTile() by Town::GetByTile()
15 years ago
smatz
d39c08fd9d
(svn r16664) -Codechange: move house-related stuff from town.h and town_type.h to separate files
15 years ago
smatz
bd208c30e0
(svn r16660) -Codechange: get rid of more dummy tile_type_procs
15 years ago
smatz
5d301445a2
(svn r16659) -Codechange: rename GetAcceptedCargo() to AddAcceptedCargo() and change its behaviour accordingly
...
-Codechange: remove dummy GetAcceptedCargo_*() handlers
15 years ago
smatz
45312433b6
(svn r16632) -Codechange: rename Town::flags12 to Town::flags
16 years ago
frosch
c9eac207ea
(svn r16498) -Codechange: Remove hardly used HASBITS.
16 years ago
alberth
580e478e4e
(svn r16491) -Codechange: Added parentheses around bitwise operators for code style.
16 years ago
frosch
eeb3f75cfe
(svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted.
16 years ago
smatz
1eb48cdded
(svn r16403) -Codechange: move code related to subsidies to separate file
16 years ago
smatz
d6e203ebe2
(svn r16379) -Codechange: remove GetNumTowns(), GetNumIndustries() and GetActiveCompanyCount(), use PoolItem::GetNumItems() instead
16 years ago
smatz
50624d5c0f
(svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved
16 years ago
smatz
512db5248e
(svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get()
16 years ago
rubidium
c0204dc186
(svn r16329) -Fix: possible desync when removing lots of towns in-game (not that we allow removing towns now, but better not have desync prone code lingering around)
16 years ago
smatz
0c10daa243
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
16 years ago
smatz
d495dc5dbc
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
16 years ago
smatz
7126bcd0e1
(svn r16308) -Fix: parameter is invalid when it's equal to length of an array (Yexo)
16 years ago
smatz
a43f7ad823
(svn r16277) -Codechange: enumerize values and remove unneeded values used for testing town rating
16 years ago
frosch
af12760722
(svn r16268) -Fix (r9876): When callback 2E returns an amount of 0, do not transport 1 unit to the station.
16 years ago
rubidium
27e87d1adc
(svn r16147) -Feature [FS#2635]: give the town generator a slight tendency to build towns near water by not discarding watery random tiles but by searching for near land (db48x)
16 years ago
rubidium
5c5b357043
(svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible.
16 years ago
frosch
d582747919
(svn r16101) -Cleanup (r14591): Remove an assertion to increase performance.
16 years ago
smatz
d046fea1b9
(svn r15890) -Codechange: unify the way 'can a town be placed here?' checks are done
...
-Change: the requirements for location of 'random' town are now a bit less strict
16 years ago
smatz
fa0b0a5eb7
(svn r15831) -Fix: make sure house class/ID counters don't overflow
16 years ago
smatz
f32f1a78f2
(svn r15744) -Fix (r9667): when town generator failed to create requested number of towns, there were too many cities
16 years ago
rubidium
6487883084
(svn r15729) -Fix: silence MSVC warning
16 years ago
smatz
e0fe28fdc9
(svn r15726) -Codechange: unify coding style for const pointers
16 years ago
rubidium
c3e87f345d
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
16 years ago
rubidium
3a3607862d
(svn r15697) -Fix (r15695): warning about comparing signed vs unsigned.
16 years ago
belugas
aa441cd4d7
(svn r15695) -Feature [FS#2672]: Allow the number of towns that will be generated in the generate world window to be customized.
...
Some warnings:
-the maximum number of towns to be accepted is set to 5000
-the minimum number of towns to be accepted is set to 1
-the number that is specified is NOT guaranteed to be the exact number of towns generated. The normal mechanism of town creation has not been modified. So town placement can still fail.
-setting a custom number of town will change your difficulty settings to custom as well
16 years ago
rubidium
e27d12d788
(svn r15689) -Fix [FS#2720]: do not crash when the generate map doesn't contain a suitable location for a town.
16 years ago
peter1138
88e641282c
(svn r15662) -Fix (r11795): Don't mark a company as having ratings in a town when querying the cost of a command.
16 years ago
smatz
f5b24edc1e
(svn r15642) -Codechange: use a default parameter value in CalcClosestTownFromTile
16 years ago
yexo
47803bc3a7
(svn r15639) -Change: When you disable "Towns are allowed to build roads", pressing "Expand" in the town window in the scenario editor will no longer build roads.
16 years ago
rubidium
56b6d78bf7
(svn r15604) -Fix [FS#2661]: towns would only build houses where the grid would not be, even when they aren't allowed to build roads and the user 'implements' another layout.
16 years ago
yexo
894d61ca47
(svn r15585) -Codechange: Remove TILE_ASSERT and replace all instances with assert(tile < MapSize()).
16 years ago
yexo
b8601d903d
(svn r15584) -Codechange: Move several variables from variables.h to more appropriate headers.
16 years ago
smatz
2f63571203
(svn r15572) -Fix (r13730): theoretical buffer overflow when company with too long name funded a road reconstruction
16 years ago
smatz
b8438555df
(svn r15505) -Codechange: pass name of new town as parameter to CMD_BUILD_TOWN
16 years ago
rubidium
6a4ab97d36
(svn r15454) -Fix [FS#2614]: towns did not know about build_on_slopes in some cases, or made decisions on the 'original' slope instead the slope after applying the foundation..
16 years ago
frosch
d5525b8f2d
(svn r15452) -Codechange: Add DC_NO_MODIFY_TOWN_RATING.
16 years ago
frosch
f9feb4a0e6
(svn r15449) -Codechange: Rename DC_NO_TOWN_RATING to DC_NO_TEST_TOWN_RATING as that is what it does.
16 years ago
rubidium
5c8cf85613
(svn r15434) -Codechange: bit of type safety for the DC_xxx flags.
16 years ago
rubidium
4431e82beb
(svn r15397) -Fix [FS#2618]: a town could build a statue under a bridge.
16 years ago
frosch
6f9d6ffe80
(svn r15381) -Fix (r11091): When testing for parallel road two tiles away, do not move more than one tile along the road.
16 years ago
frosch
78fc8aa93c
(svn r15380) -Fix (r15190)[FS#2603]: Do not use TileY() on negative TileIndexDiffs. But the test was not needed anyway, as those tiles were already tested in previous iterations.
16 years ago
smatz
f561fa2891
(svn r15352) -Codechange: make the arguments passed around while founding a town a bit more readable
16 years ago
smatz
e80255c4ae
(svn r15342) -Feature: allow changing town layout in the 'Found new town' window
16 years ago
smatz
3a8d57816a
(svn r15340) -Fix [FS#2121]: changing town road layout in-game caused ugly road networks
...
-Fix: use a flag instead of TL_NO_ROADS to forbid towns to build roads. The flag is ignored during world generation, so there won't be 'ghost' towns anymore
-Feature: town layout is now stored per town, so it is possible to (manually) set different layout for each town
16 years ago
smatz
9021c20b5e
(svn r15299) -Cleanup: remove many redundant includes
16 years ago
Yexo
e3c69b7c4e
(svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map.
16 years ago
belugas
9bd7b6bd0c
(svn r15172) -Feature: Allow a grf to customize house name via callback 0x14D, during Tile Inquiry process
16 years ago
peter1138
b85389dca5
(svn r15149) -Codechange: GetMaskOfTownActions() is used by a Cmd handler, therefore it does not belong in _gui.
16 years ago
truebrain
c2406cd42d
(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
...
NoAI is an API (a framework) to build your own AIs in. See:
http://wiki.openttd.org/wiki/index.php/AI:Main_Page
With many thanks to:
- glx and Rubidium for their syncing, feedback and hard work
- Yexo for his feedback, patches, and AIs which tested the system very deep
- Morloth for his feedback and patches
- TJIP for hosting a challenge which kept NoAI on track
- All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago
frosch
b58cdfc294
(svn r14992) -Codechange: Rename 'CheckIfAuthorityAllows' to 'CheckIfAuthorityAllowsNewStation' and unduplicate a tiny bit of code.
16 years ago
smatz
c5db2ea181
(svn r14958) -Codechange [FS#1923]: when checking for unique names, compare only with manually set names
...
There are situations that aren't solvable (because of different language files), so if the user really wants to have duplicated name, allow him to do so. It solves desyncs between server and clients using different languages. It behaves the same in SP and MP, so users won't see the different behaviour as a bug (and even checking in SP could be worked around by the user).
16 years ago
rubidium
d197060137
(svn r14933) -Codechange: check the whether a pool item can be constructed instead of trying to make it and check for NULL.
16 years ago
smatz
91233ea596
(svn r14828) -Codechange: move most of save/load-specific code to separate files
16 years ago
rubidium
d44ba26cd7
(svn r14821) -Change [FS#2390]: make the road grids of town match, when all are using the same road layout ofcourse (cirdan)
16 years ago
smatz
b00e510140
(svn r14807) -Codechange: use INVALID_TILE instead of 0 to mark invalid depots, industries, towns and waypoints
16 years ago
rubidium
d3144b6f04
(svn r14789) -Feature: allow scrolling with the left mouse button pressed (if enabled). Primarily useful for systems with touch screen (aapo)
16 years ago
rubidium
e83cca7d13
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
16 years ago
smatz
bd92143e7b
(svn r14742) -Codechange: use SmallMap in two cases to reduce compilation time and binary size
16 years ago
rubidium
bf6ec8b19f
(svn r14735) -Codechange: remove a bit of bit-waste in the map array (without changing the map array) and make the CompanyIDs contiguous.
...
-Note: 15 should be enough for now... making it any more means adding more bytes to the map array and thus wasting more bits instead of reducing the bit waste.
16 years ago
frosch
70f2b95bda
(svn r14611) -Fix (r13437)[FS#2421]: Store the age of a house in the map array instead of the construction year.
...
Note: Savegames from r13437 to now are broken and have a age of 255 years for a lot houses.
16 years ago
frosch
f61b577652
(svn r14596) -Fix (r14591): Missing 'return'.
16 years ago
smatz
698f05e756
(svn r14591) -Fix [FS#2388](r14528): cached nearest town could be invalid after importing older savegame and during town generation
...
-Codechange: rewrite parts of code responsible for caching index of nearest town
16 years ago
rubidium
52ac592422
(svn r14528) -Codechange: cache the closest town for all road tiles instead of only roads owned by tiles. This replaces a O(n) search over all towns from the road's tileloop with a O(1) lookup (PhilSophus)
16 years ago