Commit Graph

436 Commits (31dd6b13d1628fbe066a72970ce52aaceb845dab)

Author SHA1 Message Date
rubidium 9204c5f1e4 (svn r19565) -Fix: some NewGRF callbacks were named incorrectly 14 years ago
frosch a2bf2bfa87 (svn r19499) -Remove: same_industry_close setting did not do what it said and caused NewGRF trouble. 14 years ago
alberth 72d62fd6fc (svn r19494) -Codechange: Remove _error_message. 14 years ago
frosch be6c18454a (svn r19481) -Codechange: Turn _industry_counts into a static member of Industry. 14 years ago
yexo d72dfea800 (svn r19476) -Codechange: simplify the 'is conflicting industry nearby' check a bit 14 years ago
frosch a1e4139025 (svn r19443) -Fix [FS#3701]: Mark industry windows dirty more often. 14 years ago
alberth fba4bed6bf (svn r19362) -Fix [FS#3667] (r19270): Failure to prospect an industry should not cause a crash. 15 years ago
alberth 4c0d4990f5 (svn r19319) -Codechange: EnsureNoVehicleOnGround() returns a CommandCost. 15 years ago
frosch 1cd347bfc9 (svn r19297) -Codechange: Variable scope and documentation of DoCreateNewIndustry(). 15 years ago
yexo 23af928ce9 (svn r19295) -Codechange: introduce wrapper functions for GRFConfig::name/info 15 years ago
alberth 3338efed28 (svn r19287) -Fix [FS#3650] (r19263): Don't store a boolean in a CommandCost. 15 years ago
alberth 4ec812b147 (svn r19270) -Codechange: Forward CommandCost results through CreateNewIndustryHelper(). 15 years ago
alberth fbbf22da32 (svn r19269) -Codechange: PerformIndustryTileSlopeCheck() returns a succeeded or failed command. 15 years ago
rubidium 7721a5cc51 (svn r19265) -Fix [FS#3618]: "Can't build <industry> here... <industry> in the way" showed the to-be-built industry twice, instead of the to-be-built industry and the industry that's in the way 15 years ago
rubidium a88f57efde (svn r19263) -Fix (r19184): some specific industry creation errors got replaced by 'site unsuitable'. 15 years ago
alberth 19f5b6f7b6 (svn r19185) -Codechange: Return succeeded or failed CommandCost from CheckIfCallBackAllowsCreation(). 15 years ago
alberth b882106956 (svn r19184) -Codechange: Return succeeded/failed command from CheckIfIndustryTilesAreFree(). 15 years ago
alberth fe35b9d8e7 (svn r19183) -Codechange: Return CommandCost from FindTownForIndustry(). 15 years ago
alberth 368976f395 (svn r19182) -Codechange: Use CommandCost return value in CheckIfIndustryIsAllowed() and CheckIfFarEnoughFromIndustry(). 15 years ago
frosch eb64024984 (svn r19167) -Fix [FS#3631](r19120): Industry 0 could be choosen even if not available. 15 years ago
alberth f2adc37cc8 (svn r19146) -Codechange: Use CommandCost in industry checking routines. 15 years ago
alberth d2fbf654df (svn r19138) -Codechange: Rename CheckMultipleIndustryInTown() to FindTownForIndustry(). 15 years ago
alberth e4986c8430 (svn r19137) -Add: Report a more useful error when failing to build a bubble generator. 15 years ago
alberth f94c030837 (svn r19136) -Doc: Added Doxygen comments for industry checking procedures. 15 years ago
frosch 09ce2f49b5 (svn r19126) -Codechange: Silence a warning. 15 years ago
frosch 3fe58a2250 (svn r19120) -Fix: [NewGRF] Industry property 0x17 was interpreted incorrectly and in some cases circumvented the density difficulty setting.
-Change: Do not scale the number of industry creations during map creation with the number of available industry types.
-Feature: [NewGRF] Implement special industry flag 0x10000.
15 years ago
frosch 87cf1f75ff (svn r19051) -Codechange: Variable scope. 15 years ago
frosch 75a55bbb85 (svn r19050) -Fix: Don't call callbacks for disabled industrytypes. 15 years ago
frosch b0a60e1f2b (svn r19049) -Codechange: Deduplicate computing number of initial industries. 15 years ago
frosch b1603d0d2c (svn r18938) -Fix: Industrylayout's special water tile check did not properly check for crossing north border of map. Also don't consider MP_VOID tiles as water. 15 years ago
frosch 8b9e5140ab (svn r18889) -Codechange: Use (GroundSprite|SpriteLayout)PaletteTransform() also for drawing of default industries. They are compatible since the bubblegenerator is also randomly recoloured. 15 years ago
rubidium 7127338414 (svn r18872) -Codechange: introduce PaletteID and use it 15 years ago
rubidium f618acfb7d (svn r18866) -Codechange: remove the CmdFailed(ret)/CmdSucceeded(ret) wrapper functions 15 years ago
rubidium 9467b7c6d6 (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium 21b4eb70c3 (svn r18726) -Fix [FS#3463]: with non-uniform industries the 'supplies' text when building a station could be incorrect (missing a cargo)
-Change [NoAI]: AITile::GetCargoProduction now returns the number of producers and not the number of tiles of producers.
-Fix [NoAI]: AITileList_IndustryProducing would omit some tiles for at which a station would get cargo.
15 years ago
rubidium e48416ad4e (svn r18718) -Codechange: make a wrapper macro for looping TileAreas 15 years ago
rubidium 6cac8be361 (svn r18717) -Codechange: use TileArea in industry instead of three separate variables. Also make use of TileArea functions for determining the 'width' and 'height' of an industry. 15 years ago
rubidium 0213d47594 (svn r18716) -Codechange: pass a TileArea to FindStationsAroundTiles 15 years ago
rubidium e202a26990 (svn r18715) -Codechange: make StationFinder a subclass of TileArea 15 years ago
yexo 3e1d76a69c (svn r18701) -Fix (r18700): always compile before making a commit 15 years ago
yexo a5d00a4713 (svn r18700) -Fix: when deleting an industry on water (oil rigs) the tiles on water were not marked dirty 15 years ago
frosch 77d19dc5af (svn r18554) -Change: Forbid industries to clear sea/river when leveling land. 15 years ago
frosch 13a72bb345 (svn r18283) -Feature: [NewGRF] Add new price bases for removing industries, building/removing unmovables (new objects), building/removing rail-waypoints/buoys, interacting with town-authority, building foundations, funding primary industries (when not prospecting) and towns.
If a GRF does not set price multipliers for these new prices, but for the previously used ones, the old modifiers will be propagated to the new bases.
15 years ago
frosch dc71450b0f (svn r18282) -Codechange: Remove IndustrySpec::raw_industry_cost_multiplier and use 8 * cost_multiplier instead. 15 years ago
smatz 2c63d0d323 (svn r18110) -Codechange [FS#3316]: search for stations nearby only once per producer (instead of once pre produced cargo type) (fonsinchen) 15 years ago
rubidium 224f4e0197 (svn r18028) -Codechange: unglobalise some functions 15 years ago
frosch 040404c5d3 (svn r18005) -Codechange: Convert the Prices struct into an array and an enum. 15 years ago
frosch 3cb949a17d (svn r17976) -Codechange: Move CargoClass to cargotype.h and clean up including of newgrf_cargo.h 15 years ago
rubidium ed8788d581 (svn r17682) -Codechange: remove erroneous space before some commas 15 years ago
rubidium 5ced4ad44b (svn r17638) -Fix [FS#3235]: Crash when trying to build an industry that has no industry layout defined; yes, it's very similar to r17633 because one case was forgotten. 15 years ago
rubidium a04f3950ec (svn r17633) -Fix [FS#3233]: [NewGRF] Crash when trying to build an industry that has no industry layout defined. 15 years ago
smatz 6cb860e69e (svn r17601) -Fix (r17592): don't mark cargo as 'accepted' when accepted amount is 0 15 years ago
smatz 581366f352 (svn r17592) -Fix [FS#3212](r17436): force all cargo being accepted when industry tiles accept it but industry itself doesn't 15 years ago
smatz c3a80f1518 (svn r17589) -Codechange: rename town_acc to always_accepted 15 years ago
rubidium 06e490fadc (svn r17567) -Fix: some doxygen warnings 15 years ago
rubidium c2c0f4403e (svn r17534) -Codechange: unify the naming of callback masks/flags 15 years ago
frosch 0e36260337 (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 15 years ago
rubidium 7fd584a95b (svn r17521) -Change: don't assume that there is always 'another' industry tile after two '0x18' industry tiles 15 years ago
rubidium 6b25288ba1 (svn r17472) -Fix [FS#3182]: industry list was rebuilt too early during industry removal causing the removed industry to be still in the list after removal 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 f3372f6bc1 (svn r17414) -Codechange: only send/read the number of bits that can be actually useful when building industries 15 years ago
rubidium ebe53440be (svn r17413) -Fix: assert when trying to build an invalid industry type it did 15 years ago
smatz 09e1ecc8ac (svn r17316) -Codechange: use Industry::GetByTile() instead of GetIndustryByTile() 15 years ago
rubidium 99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
smatz 073e163b7f (svn r17131) -Codechange: apply coding style to some switch statements 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
rubidium 30d9e54279 (svn r16966) -Codechange: BEGIN_TILE_LOOP and END_TILE_LOOP reworked into TILE_LOOP, which means no more duplication of parameters between BEGIN_TILE_LOOP and END_TILE_LOOP 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
smatz 8718babe90 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 15 years ago
smatz 20fedeb3d6 (svn r16717) -Codechange: make IsFrontEngine() member of Train 15 years ago
rubidium 3b44f44287 (svn r16709) -Fix [FS#2994]: the list of animated tiles could have duplicates (only for old savegames) and tiles that weren't animated 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 5d301445a2 (svn r16659) -Codechange: rename GetAcceptedCargo() to AddAcceptedCargo() and change its behaviour accordingly
-Codechange: remove dummy GetAcceptedCargo_*() handlers
15 years ago
smatz 72bee4ad2d (svn r16654) -Codechange: cache industries in station's coverage area instead of searching them everytime payment is made 15 years ago
smatz f6a4d61cca (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() 15 years ago
alberth 580e478e4e (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 15 years ago
rubidium d39f442bd0 (svn r16434) -Cleanup: remove some dead code; primarily stuff that can't be reached like break after returns or break after functions that never return (i.e. NOT_REACHED) 15 years ago
frosch eeb3f75cfe (svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted. 15 years ago
smatz 1eb48cdded (svn r16403) -Codechange: move code related to subsidies to separate file 15 years ago
rubidium 521c265282 (svn r16384) -Codechange: move u.effect to EffectVehicle 15 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 15 years ago
smatz 85043a1fb7 (svn r16373) -Codechange: use () instead of (void) for functions without parameters 15 years ago
smatz d495dc5dbc (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 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. 15 years ago
frosch 92a1b03a00 (svn r16027) -Fix (r9555): Usage of uninitialised memory when trying to build a random new industry, but there are no industrytypes to choose from (i.e. all appearance probabilities are zero). 15 years ago
frosch 8af8a22588 (svn r15888) -Fix (r15103)[FS#2772]: Round the production rate up, so e.g. oilrigs always produce some passengers on lowest production level. 15 years ago
rubidium c3e87f345d (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 16 years ago
rubidium f3e0fd7416 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 16 years ago
yexo 894d61ca47 (svn r15585) -Codechange: Remove TILE_ASSERT and replace all instances with assert(tile < MapSize()). 16 years ago
frosch 8ebe68b01b (svn r15583) -Fix: Do not use TILE_MASK when you do not want to wrap around them map. 16 years ago
rubidium 49ab7c3b50 (svn r15550) -Fix [FS#2654]: bogus secondary error message when dynamiting industries/unmoveables; "X is in the way" isn't helpful at all in that case. 16 years ago
frosch 904bb64254 (svn r15458) -Fix: Missing 'static'. 16 years ago
frosch 2fc6c2d0b0 (svn r15453) -Fix [FS#2450](r14613): Founding industries as OWNER_TOWN resulted in unwanted effects. 16 years ago
rubidium 5c8cf85613 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 16 years ago
rubidium 89e1afdaa0 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 16 years ago
rubidium 283b3d16ab (svn r15410) -Cleanup: get rid of most of the references to the 'patches' except where it's used for backward compatability. 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
frosch 3980e2739a (svn r15119) -Fix: several issues with result 0x4 (standard production change of primary industries) of callbacks 0x29 and 0x35. 16 years ago
frosch 5d585dcb4d (svn r15103) -Change: Keep industry variables 8E and 8F in sync with 93, when changing production using results 0D, 0E or 0F of callback 29 or 35. 16 years ago
peter1138 4585d9785d (svn r15073) -Fix (r15067) [FS#2532]: Default copy constructors don't necessarily do what you want. Instead of creating one, we now pass a pointer around as that avoids additional allocations. 16 years ago
peter1138 afb94c252d (svn r15067) -Fix [FS#2531]: Possible compiler bug, alleviated by using SmallVector instead of using std::set. SmallVector does everything needed anyway. 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
rubidium 28ea38ae55 (svn r14949) -Cleanup: pointer coding style 16 years ago
frosch b0b6285c26 (svn r14936) -Fix: INDUSTRYBEH_ONLY_NEARTOWN bypassed the clear-test and could e.g. result in incomplete clearing of protected houses. 16 years ago
smatz 91233ea596 (svn r14828) -Codechange: move most of save/load-specific code to separate files 16 years ago
rubidium f16427fbe0 (svn r14823) -Document: some variables/structs (Alberth) 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 7fbd5beb0f (svn r14746) -Fix: don't let any disaster vehicle (Helicopter or Airplane) target invalid industry 16 years ago
frosch aaf21df68b (svn r14613) -Fix [FS#2420]: When building industries, clear the tiles as OWNER_TOWN instead of the founder to take care of protected buildings and to not get stressed by town ratings. 16 years ago
frosch c7b062e92f (svn r14604) -Codechange: Simplify a function and rename it, and fix some comments. 16 years ago
frosch e061107b68 (svn r14562) -Fix (r14561): 8 bits are enough. The rest stays reserved. 16 years ago
frosch 29c4c2d618 (svn r14561) -Feature(ette)[FS#2334]: Add result 0x0F to callbacks 0x29/0x35. (Yexo) 16 years ago
rubidium b5e467978b (svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus) 16 years ago
rubidium f56e630e5c (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 16 years ago
belugas 9419a28a4b (svn r14332) -Fix[FS#1885]: Balance the monthly random industry changes, by introducing a daily random industry change.
This will allow to perform more changes per month on big maps and less on smaller maps, while not overtaxing the IndustryMonthlyLoop process.
Thanks to frosch, for nice code ideas and rewrites
16 years ago
rubidium e4e563afc2 (svn r14093) -Fix [FS#2230]: don't flood a NewGRF industry when it implicitly tells that it wants to be build on water (land shape flags bit 5). 16 years ago
belugas 7e4b1e2d84 (svn r13872) -Feature: Split the news message announcing opening and closure of industries into two news of their own 16 years ago
belugas 72344adce7 (svn r13864) -Feature(FS #2164): All industry creations are now generating a news event, even those funded by a real player. 16 years ago
frosch 6684bc12d5 (svn r13838) -Codechange: Make industry tiles aware of WaterClasses. 16 years ago
smatz abea03fb89 (svn r13830) -Feature: show additional NewGRF info in the Tile Info window for stations, houses and industries 16 years ago
frosch 2b071f84ea (svn r13632) -Codechange: Use 'void *' for user-data of CircularTileSearch(). 16 years ago
frosch 90507de6e4 (svn r13499) -Codechange: Allow drawing (ugly) leveled foundations on steep slopes, just in case someone needs them for fallback. 16 years ago
belugas f7b79916e8 (svn r13367) -Codechange: Allow CircularTileSearch function to return the tile where search has been successful, or INVALID_TILE if it has not 16 years ago
rubidium 723792cf08 (svn r13348) -Fix: an industry does not always need foundations; in the case of NewGRFs an industry can be built on a steep slope, however when 'querying' the foundation type of an industry we neglected the fact that these steep slope tiles do not have a foundation. As a result of this when one built a structure requiring foundations on a tile SW or SE of a steep slope industry tile it would try to apply the foundation on the steep slope to determine whether to draw the wall of the foundation and trigger an assert. 16 years ago
rubidium e7a501100a (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games. 16 years ago
rubidium d289464d69 (svn r13255) -Codechange: move _opt to _settings. 16 years ago
rubidium dc77647ea4 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
16 years ago
frosch 7f80552293 (svn r13206) -Feature(ette): Display all owners of a tile in the tile-info-window. 16 years ago
peter1138 42f78d2fc3 (svn r13205) -Codechange: Remove unnecessary code-style-buggering-up macro. 16 years ago
glx dc1c529a31 (svn r13174) -Codechange: make a class of the IndustryDirectoryWindow. 16 years ago
rubidium 373343cef6 (svn r13100) -Codechange: reduce the amount of parameters passed via AddNewsMessage as there is (for each news message type) a tuple of 4 parameters that is the same for all calls. 16 years ago
rubidium 1ce0b03bf0 (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
glx 5bd8b6adb0 (svn r12933) -Fix: minor errors related to industries accepted/produced cargo 16 years ago
rubidium d56827a9a9 (svn r12855) -Codechange: do not use autoptr's for testing whether certain objects can be build, but check it directly in the pool so we do not have to call destructors in the testing phase. Stations still use the autoptr though. 16 years ago
rubidium 97f78133d2 (svn r12844) -Fix: the industry tick trigger should only be triggered once every 256 ticks, not every tick... Also bail out of the triggers a little earlier if you know they are not going to happen anyway. 16 years ago
rubidium 8186344628 (svn r12804) -Codechange: move the effect vehicle handling out of vehicle.cpp 16 years ago
rubidium 40b19f3997 (svn r12803) -Cleanup: rename SpecialVehicle to EffectVehicle to have a uniform naming of the thing instead of using both names for the same thing. 16 years ago
rubidium ba0532b595 (svn r12800) -Codechange: move the animated tile related functions out of texteff.cpp (it isn't a text effect after all). Also remove a few more functions from functions. 16 years ago
rubidium 18e64b28e2 (svn r12757) -Codechange: move all cheat related stuff from all over the place to a single location. 16 years ago
rubidium 973997e896 (svn r12617) -Codechange: add type safety to the Order's load and unload types. 16 years ago
smatz 76eaed68a0 (svn r12599) -Codechange: force AllocateSafeRaw() to be linked to simplify compiler's decisions about inlining 16 years ago
rubidium 53d101cc99 (svn r12593) -Codechange: hide Order's flags in most of the code. 16 years ago