Commit Graph

562 Commits

Author SHA1 Message Date
rubidium 08a41c6ee5 (svn r20631) -Codechange: generalise IsIndustryTileOnWater + simplify so related code 2010-08-26 19:29:20 +00:00
rubidium e2e26190d5 (svn r20623) -Codechange: unify the storing of animation related information 2010-08-26 15:31:40 +00:00
rubidium 4efa2efdbb (svn r20622) -Codechange: unify [GS]et[Statation|Object|Industry|House]AnimationFrame 2010-08-26 14:45:45 +00:00
alberth 35fec79700 (svn r20499) -Doc: Spelling fixes, and one doxygen comment addition. 2010-08-15 14:06:43 +00:00
rubidium 3da3d131c6 (svn r20411) -Codechange: rename unmovables as quite a lot of them are actually movable; e.g. HQ and owned land are pretty movable. 2010-08-08 10:59:30 +00:00
yexo e80f339086 (svn r20396) -Codechange: introduce a helper function to test whether an industry temporarily refues to accept some cargo 2010-08-07 20:11:27 +00:00
alberth 0e900039f3 (svn r20320) -Doc: Small Doxygen and normal comment fixes, and an missed addition. 2010-08-02 20:47:27 +00:00
frosch 4bd32799f1 (svn r20286) -Codechange: Unify end of doxygen comments. 2010-08-01 19:44:49 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
rubidium 4871baf44d (svn r20282) -Codechange: add some spaces where they should've been 2010-08-01 19:01:09 +00:00
rubidium e356cb9405 (svn r20281) -Codechange: unify case scope closure + break coding style 2010-08-01 18:53:30 +00:00
alberth dc6ed2c2c0 (svn r20279) -Doc: Doxygen additions/improvements. 2010-08-01 17:45:53 +00:00
alberth 2dd77d0ef9 (svn r20241) -Codechange: Move variable declarations to their first use. 2010-07-30 10:39:24 +00:00
alberth be6c058424 (svn r20211) -Codechange: Indented code should have curly braces around it. 2010-07-24 10:14:39 +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
frosch 1d3adb2b66 (svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation. 2010-06-05 12:16:12 +00:00
frosch 9db3cde73a (svn r19914) -Codechange: Wrap a helper class around temporary assignments of _current_company to ensure proper restoration. 2010-05-31 20:22:57 +00:00
frosch 0960e0c4f2 (svn r19907) -Fix: [NewGRF] Call callbacks 14A, 14B and 14C after all industry variables have been assigned, so more variables are valid during the callbacks. 2010-05-30 12:26:32 +00:00
frosch e296eeb20c (svn r19901) -Add: [NewGRF] Access to industry founder (var A7) during callbacks 28 and 2F. (yexo) 2010-05-29 13:08:50 +00:00
rubidium 062dd0e24c (svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int 2010-05-13 10:14:29 +00:00
frosch 910aade284 (svn r19744) -Add [FS#3477]: [NewGRF] Access to random bits of houses and industries from construction callbacks 17, 28 and 2F. That is: The randombits the house/industry will start with, if construction succeeds. 2010-05-01 13:09:49 +00:00
rubidium f56ebd81c3 (svn r19709) -Feature: NewGRF debugging/inspecting of (primarily) enabled callbacks and values of variables 2010-04-24 13:39:11 +00:00
frosch ca9a015984 (svn r19701) -Fix [FS#3787]: Check for industry availability more thoroughly and cancel object placement when selecting not available industries. 2010-04-23 21:47:03 +00:00
frosch 2e90f7f8b9 (svn r19670) -Codechange: Add CeilDiv() and RoundDiv() to simplify integer divisions with rounding. 2010-04-18 14:56:05 +00:00
frosch 184fa43df2 (svn r19652) -Fix: RandomRange() is used for bigger ranges in many cases, so generally extent it to handle 32 bits. 2010-04-17 11:49:25 +00:00
frosch 2141ca2368 (svn r19643) -Fix (r19120): Industry generation failed for large maps and lots of industry types. 2010-04-16 21:21:54 +00:00
rubidium bc925c0016 (svn r19565) -Fix: some NewGRF callbacks were named incorrectly 2010-04-05 21:01:02 +00:00
frosch 475c2959bd (svn r19499) -Remove: same_industry_close setting did not do what it said and caused NewGRF trouble. 2010-03-21 15:16:05 +00:00
alberth 05d705e077 (svn r19494) -Codechange: Remove _error_message. 2010-03-20 17:58:24 +00:00
frosch 116a5f56a4 (svn r19481) -Codechange: Turn _industry_counts into a static member of Industry. 2010-03-20 14:30:16 +00:00
yexo aab8849661 (svn r19476) -Codechange: simplify the 'is conflicting industry nearby' check a bit 2010-03-19 21:23:54 +00:00
frosch 030ced4aec (svn r19443) -Fix [FS#3701]: Mark industry windows dirty more often. 2010-03-17 18:52:56 +00:00
alberth 384e870be2 (svn r19362) -Fix [FS#3667] (r19270): Failure to prospect an industry should not cause a crash. 2010-03-07 12:20:17 +00:00
alberth c395b93acd (svn r19319) -Codechange: EnsureNoVehicleOnGround() returns a CommandCost. 2010-03-05 21:20:22 +00:00
frosch 5152cb1a26 (svn r19297) -Codechange: Variable scope and documentation of DoCreateNewIndustry(). 2010-03-01 19:34:04 +00:00
yexo 404df87b1f (svn r19295) -Codechange: introduce wrapper functions for GRFConfig::name/info 2010-02-28 20:28:08 +00:00
alberth f73898a4ef (svn r19287) -Fix [FS#3650] (r19263): Don't store a boolean in a CommandCost. 2010-02-28 09:44:35 +00:00
alberth 011ff40030 (svn r19270) -Codechange: Forward CommandCost results through CreateNewIndustryHelper(). 2010-02-27 12:12:01 +00:00
alberth b33264f30f (svn r19269) -Codechange: PerformIndustryTileSlopeCheck() returns a succeeded or failed command. 2010-02-27 10:21:59 +00:00
rubidium 45f34a4203 (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 2010-02-26 10:08:16 +00:00
rubidium 425ac1ec1f (svn r19263) -Fix (r19184): some specific industry creation errors got replaced by 'site unsuitable'. 2010-02-26 09:55:53 +00:00
alberth 82a4d532b6 (svn r19185) -Codechange: Return succeeded or failed CommandCost from CheckIfCallBackAllowsCreation(). 2010-02-21 17:01:23 +00:00
alberth c4f67de69c (svn r19184) -Codechange: Return succeeded/failed command from CheckIfIndustryTilesAreFree(). 2010-02-21 15:27:11 +00:00
alberth 676a8bda3e (svn r19183) -Codechange: Return CommandCost from FindTownForIndustry(). 2010-02-21 14:57:27 +00:00
alberth 50bdd29758 (svn r19182) -Codechange: Use CommandCost return value in CheckIfIndustryIsAllowed() and CheckIfFarEnoughFromIndustry(). 2010-02-21 13:32:14 +00:00
frosch e905cb57d8 (svn r19167) -Fix [FS#3631](r19120): Industry 0 could be choosen even if not available. 2010-02-20 16:17:45 +00:00
alberth dec02fad59 (svn r19146) -Codechange: Use CommandCost in industry checking routines. 2010-02-16 22:01:23 +00:00
alberth c0933e825a (svn r19138) -Codechange: Rename CheckMultipleIndustryInTown() to FindTownForIndustry(). 2010-02-15 11:04:27 +00:00
alberth 6553f49991 (svn r19137) -Add: Report a more useful error when failing to build a bubble generator. 2010-02-15 10:28:40 +00:00
alberth bb5261a075 (svn r19136) -Doc: Added Doxygen comments for industry checking procedures. 2010-02-15 09:49:10 +00:00
frosch d757f81646 (svn r19126) -Codechange: Silence a warning. 2010-02-14 13:01:07 +00:00
frosch e7106d8121 (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.
2010-02-13 14:06:01 +00:00
frosch 3c7dff4270 (svn r19051) -Codechange: Variable scope. 2010-02-06 20:50:50 +00:00
frosch 69184fdc79 (svn r19050) -Fix: Don't call callbacks for disabled industrytypes. 2010-02-06 20:41:27 +00:00
frosch 0ab6f60c62 (svn r19049) -Codechange: Deduplicate computing number of initial industries. 2010-02-06 20:19:59 +00:00
frosch 294bc14652 (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. 2010-01-28 19:41:45 +00:00
frosch bf65eb686e (svn r18889) -Codechange: Use (GroundSprite|SpriteLayout)PaletteTransform() also for drawing of default industries. They are compatible since the bubblegenerator is also randomly recoloured. 2010-01-22 21:52:20 +00:00
rubidium f94c83a387 (svn r18872) -Codechange: introduce PaletteID and use it 2010-01-21 01:38:13 +00:00
rubidium 4d93b704d9 (svn r18866) -Codechange: remove the CmdFailed(ret)/CmdSucceeded(ret) wrapper functions 2010-01-18 22:57:21 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium 28fc7b47bd (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.
2010-01-04 21:10:20 +00:00
rubidium 3e131e2fec (svn r18718) -Codechange: make a wrapper macro for looping TileAreas 2010-01-04 18:30:10 +00:00
rubidium 87466a4ed0 (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. 2010-01-04 18:21:07 +00:00
rubidium 71f2789270 (svn r18716) -Codechange: pass a TileArea to FindStationsAroundTiles 2010-01-04 18:16:32 +00:00
rubidium 31b325baaf (svn r18715) -Codechange: make StationFinder a subclass of TileArea 2010-01-04 18:12:10 +00:00
yexo 8a50a4112c (svn r18701) -Fix (r18700): always compile before making a commit 2010-01-03 20:14:50 +00:00
yexo 47a11fff20 (svn r18700) -Fix: when deleting an industry on water (oil rigs) the tiles on water were not marked dirty 2010-01-03 19:33:12 +00:00
frosch e46a9078e6 (svn r18554) -Change: Forbid industries to clear sea/river when leveling land. 2009-12-19 22:17:02 +00:00
frosch 830231e2bd (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.
2009-11-24 22:15:42 +00:00
frosch 8da21d58a9 (svn r18282) -Codechange: Remove IndustrySpec::raw_industry_cost_multiplier and use 8 * cost_multiplier instead. 2009-11-24 22:02:23 +00:00
smatz 47660b984b (svn r18110) -Codechange [FS#3316]: search for stations nearby only once per producer (instead of once pre produced cargo type) (fonsinchen) 2009-11-15 21:06:13 +00:00
rubidium 860b9b1cea (svn r18028) -Codechange: unglobalise some functions 2009-11-09 10:40:33 +00:00
frosch ba1fc280e3 (svn r18005) -Codechange: Convert the Prices struct into an array and an enum. 2009-11-07 22:47:54 +00:00
frosch 79627b4f89 (svn r17976) -Codechange: Move CargoClass to cargotype.h and clean up including of newgrf_cargo.h 2009-11-05 19:46:17 +00:00
rubidium e9624fe0cc (svn r17682) -Codechange: remove erroneous space before some commas 2009-10-02 15:13:15 +00:00
rubidium 22c4ef6aee (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. 2009-09-25 21:08:45 +00:00
rubidium 36e70b57ee (svn r17633) -Fix [FS#3233]: [NewGRF] Crash when trying to build an industry that has no industry layout defined. 2009-09-25 09:32:20 +00:00
smatz 494ef040e5 (svn r17601) -Fix (r17592): don't mark cargo as 'accepted' when accepted amount is 0 2009-09-21 17:24:21 +00:00
smatz 9cf2e92159 (svn r17592) -Fix [FS#3212](r17436): force all cargo being accepted when industry tiles accept it but industry itself doesn't 2009-09-20 18:52:12 +00:00
smatz 9225b3ba03 (svn r17589) -Codechange: rename town_acc to always_accepted 2009-09-20 17:44:33 +00:00
rubidium 04d5b67eb6 (svn r17567) -Fix: some doxygen warnings 2009-09-18 14:23:58 +00:00
rubidium 64bafcbe18 (svn r17534) -Codechange: unify the naming of callback masks/flags 2009-09-14 12:22:57 +00:00
frosch ebd916be3d (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 2009-09-13 19:15:59 +00:00
rubidium d0836f9ec8 (svn r17521) -Change: don't assume that there is always 'another' industry tile after two '0x18' industry tiles 2009-09-13 10:58:41 +00:00
rubidium 535f71fc13 (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 2009-09-08 12:22:28 +00:00
smatz 22e9d59559 (svn r17439) -Fix (r17436): you weren't paid for cargo delivered to houses and headquarters anymore 2009-09-07 07:39:08 +00:00
rubidium 27738c6638 (svn r17414) -Codechange: only send/read the number of bits that can be actually useful when building industries 2009-09-04 20:04:54 +00:00
rubidium 925bada35a (svn r17413) -Fix: assert when trying to build an invalid industry type it did 2009-09-04 20:02:35 +00:00
smatz ee685c8287 (svn r17316) -Codechange: use Industry::GetByTile() instead of GetIndustryByTile() 2009-08-30 11:47:41 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz e707c82412 (svn r17131) -Codechange: apply coding style to some switch statements 2009-08-09 14:40:34 +00:00
smatz 2a430d981f (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
2009-08-08 16:42:55 +00:00
smatz 74d3382b94 (svn r17107) -Codechange: store type of subsidy source and destination in the Subsidy struct instead of determining it every time it's needed 2009-08-07 22:23:34 +00:00
rubidium 1fe3ad3288 (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 2009-08-05 17:59:21 +00:00
rubidium 2ec12a3f58 (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 2009-07-26 21:50:30 +00:00
rubidium e3053660c6 (svn r16886) -Codechange: unify naming of some string IDs related to string codes and group them logically 2009-07-20 11:21:57 +00:00
smatz 1f29e38b83 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 2009-07-16 19:00:13 +00:00
smatz adc5363202 (svn r16717) -Codechange: make IsFrontEngine() member of Train 2009-07-01 22:22:01 +00:00
rubidium 927c4a0fe8 (svn r16709) -Fix [FS#2994]: the list of animated tiles could have duplicates (only for old savegames) and tiles that weren't animated 2009-07-01 14:51:05 +00:00
frosch a288e4d82f (svn r16678) -Codechange: Turn CargoArray into a class, so one does not have to deal with sizeof() wrt. typedef-ed arrays. 2009-06-27 21:06:58 +00:00
frosch 812ad41f23 (svn r16676) -Codechange: Rename AcceptedCargo to CargoArray and its instances to more meaningful names. 2009-06-27 18:26:50 +00:00
smatz 50b5678e26 (svn r16673) -Codechange: rename GetProducedCargo() to AddProducedCargo() and change its behaviour accordingly 2009-06-27 17:05:20 +00:00
smatz ff33ed94ce (svn r16667) -Codechange: replace GetRandomTown() and GetRandomIndustry() by Town::GetRandom() and Industry::GetRandom() 2009-06-26 15:08:54 +00:00
smatz c30a87758f (svn r16659) -Codechange: rename GetAcceptedCargo() to AddAcceptedCargo() and change its behaviour accordingly
-Codechange: remove dummy GetAcceptedCargo_*() handlers
2009-06-25 19:23:09 +00:00
smatz fa1ad0fd3c (svn r16654) -Codechange: cache industries in station's coverage area instead of searching them everytime payment is made 2009-06-25 15:42:03 +00:00
smatz 8343340acb (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() 2009-06-24 17:39:54 +00:00
alberth bab70a823d (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 2009-06-01 11:43:36 +00:00
rubidium e3c5bc8d2e (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) 2009-05-26 15:46:24 +00:00
frosch a4557c7da4 (svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted. 2009-05-24 16:52:42 +00:00
smatz b2aed51f8e (svn r16403) -Codechange: move code related to subsidies to separate file 2009-05-23 15:46:00 +00:00
rubidium 6d1c974254 (svn r16384) -Codechange: move u.effect to EffectVehicle 2009-05-22 18:56:25 +00:00
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 2009-05-22 15:13:50 +00:00
smatz 6afce484bb (svn r16373) -Codechange: use () instead of (void) for functions without parameters 2009-05-21 22:43:25 +00:00
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
rubidium 59d45a04d6 (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. 2009-04-21 23:40:56 +00:00
frosch 1b85c10a5b (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). 2009-04-11 14:54:03 +00:00
frosch f436a58b5e (svn r15888) -Fix (r15103)[FS#2772]: Round the production rate up, so e.g. oilrigs always produce some passengers on lowest production level. 2009-03-29 11:41:42 +00:00
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 2009-03-15 00:32:18 +00:00
rubidium 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 2009-03-14 18:16:29 +00:00
yexo a0c4f1156a (svn r15585) -Codechange: Remove TILE_ASSERT and replace all instances with assert(tile < MapSize()). 2009-02-25 21:50:54 +00:00
frosch c5684e56ec (svn r15583) -Fix: Do not use TILE_MASK when you do not want to wrap around them map. 2009-02-25 21:29:50 +00:00
rubidium b68a870fe3 (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. 2009-02-21 21:38:46 +00:00
frosch 565602fe90 (svn r15458) -Fix: Missing 'static'. 2009-02-12 18:08:47 +00:00
frosch 81cf1cac8f (svn r15453) -Fix [FS#2450](r14613): Founding industries as OWNER_TOWN resulted in unwanted effects. 2009-02-11 20:09:29 +00:00
rubidium d846eef0b6 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 2009-02-09 21:20:05 +00:00
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 2009-02-09 02:57:15 +00:00
rubidium 377ce6c5bf (svn r15410) -Cleanup: get rid of most of the references to the 'patches' except where it's used for backward compatability. 2009-02-08 12:25:13 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
Yexo db3ee34b44 (svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map. 2009-01-21 02:31:55 +00:00
frosch 2cc217cabf (svn r15119) -Fix: several issues with result 0x4 (standard production change of primary industries) of callbacks 0x29 and 0x35. 2009-01-17 14:49:31 +00:00
frosch cdd3676478 (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. 2009-01-16 11:32:35 +00:00
peter1138 792d1bd883 (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. 2009-01-13 20:43:53 +00:00
peter1138 02bda12599 (svn r15067) -Fix [FS#2531]: Possible compiler bug, alleviated by using SmallVector instead of using std::set. SmallVector does everything needed anyway. 2009-01-13 18:18:53 +00:00
truebrain a3dd7506d3 (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
2009-01-12 17:11:45 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
frosch 4fafb723aa (svn r14936) -Fix: INDUSTRYBEH_ONLY_NEARTOWN bypassed the clear-test and could e.g. result in incomplete clearing of protected houses. 2009-01-09 15:11:35 +00:00
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 2009-01-04 15:32:25 +00:00
rubidium 702c372744 (svn r14823) -Document: some variables/structs (Alberth) 2009-01-04 11:32:26 +00:00
smatz 254e19da91 (svn r14807) -Codechange: use INVALID_TILE instead of 0 to mark invalid depots, industries, towns and waypoints 2009-01-03 16:06:58 +00:00
rubidium 1357b0a4c2 (svn r14789) -Feature: allow scrolling with the left mouse button pressed (if enabled). Primarily useful for systems with touch screen (aapo) 2009-01-02 22:42:05 +00:00
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 2008-12-28 14:37:19 +00:00
smatz 73ca72922c (svn r14746) -Fix: don't let any disaster vehicle (Helicopter or Airplane) target invalid industry 2008-12-26 19:37:50 +00:00
frosch e35be92a3a (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. 2008-11-23 16:34:27 +00:00
frosch b759ccd032 (svn r14604) -Codechange: Simplify a function and rename it, and fix some comments. 2008-11-22 15:48:43 +00:00
frosch e1bf231727 (svn r14562) -Fix (r14561): 8 bits are enough. The rest stays reserved. 2008-11-03 20:23:51 +00:00
frosch ec4b30f9d9 (svn r14561) -Feature(ette)[FS#2334]: Add result 0x0F to callbacks 0x29/0x35. (Yexo) 2008-11-03 19:25:52 +00:00
rubidium 272b2ef0e9 (svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus) 2008-10-14 18:38:51 +00:00
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 2008-09-30 20:39:50 +00:00
belugas 0682dc3a0d (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
2008-09-15 17:18:22 +00:00
rubidium 2f5caa63f8 (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). 2008-08-17 13:56:11 +00:00
belugas d358eff64d (svn r13872) -Feature: Split the news message announcing opening and closure of industries into two news of their own 2008-07-30 01:53:03 +00:00
belugas ec58ec4a73 (svn r13864) -Feature(FS #2164): All industry creations are now generating a news event, even those funded by a real player. 2008-07-28 23:37:19 +00:00
frosch 16c80d031c (svn r13838) -Codechange: Make industry tiles aware of WaterClasses. 2008-07-26 16:14:10 +00:00
smatz 05c2a8eba4 (svn r13830) -Feature: show additional NewGRF info in the Tile Info window for stations, houses and industries 2008-07-25 22:37:34 +00:00
frosch 4e6d827ea6 (svn r13632) -Codechange: Use 'void *' for user-data of CircularTileSearch(). 2008-06-25 18:46:05 +00:00
frosch 79ad51867a (svn r13499) -Codechange: Allow drawing (ugly) leveled foundations on steep slopes, just in case someone needs them for fallback. 2008-06-12 21:36:56 +00:00
belugas b0ada3fbbf (svn r13367) -Codechange: Allow CircularTileSearch function to return the tile where search has been successful, or INVALID_TILE if it has not 2008-06-03 02:20:27 +00:00
rubidium d19c347fd0 (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. 2008-05-31 22:43:42 +00:00
rubidium 923e21129c (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. 2008-05-29 15:13:28 +00:00
rubidium 8c9cc415e3 (svn r13255) -Codechange: move _opt to _settings. 2008-05-25 22:36:44 +00:00
rubidium 4625695653 (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.
2008-05-25 19:17:03 +00:00
frosch eca692ef90 (svn r13206) -Feature(ette): Display all owners of a tile in the tile-info-window. 2008-05-21 22:15:39 +00:00
peter1138 510c0acb4a (svn r13205) -Codechange: Remove unnecessary code-style-buggering-up macro. 2008-05-21 12:06:05 +00:00
glx 17a1873843 (svn r13174) -Codechange: make a class of the IndustryDirectoryWindow. 2008-05-18 23:36:33 +00:00
rubidium 76b8970a33 (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. 2008-05-15 13:39:36 +00:00
rubidium d03994098b (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. 2008-05-06 15:11:33 +00:00
glx 49484eedca (svn r12933) -Fix: minor errors related to industries accepted/produced cargo 2008-05-01 22:51:53 +00:00
rubidium 6939569362 (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. 2008-04-23 20:56:08 +00:00
rubidium 2d860049a7 (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. 2008-04-23 00:14:49 +00:00
rubidium b139756e2b (svn r12804) -Codechange: move the effect vehicle handling out of vehicle.cpp 2008-04-20 11:12:07 +00:00
rubidium f55ffd14bd (svn r12803) -Cleanup: rename SpecialVehicle to EffectVehicle to have a uniform naming of the thing instead of using both names for the same thing. 2008-04-20 10:13:54 +00:00
rubidium 15680e477a (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. 2008-04-20 08:22:59 +00:00
rubidium b1d1a4ac66 (svn r12757) -Codechange: move all cheat related stuff from all over the place to a single location. 2008-04-17 21:21:01 +00:00
rubidium d74c6ffb62 (svn r12617) -Codechange: add type safety to the Order's load and unload types. 2008-04-07 20:03:46 +00:00
smatz 6af1fb2bdd (svn r12599) -Codechange: force AllocateSafeRaw() to be linked to simplify compiler's decisions about inlining 2008-04-06 23:49:45 +00:00
rubidium fb1c4eccd8 (svn r12593) -Codechange: hide Order's flags in most of the code. 2008-04-06 15:09:45 +00:00
rubidium d6623cf654 (svn r12588) -Codechange: do not access the destination of an order directly. 2008-04-06 07:48:51 +00:00
rubidium 5b47f81b0f (svn r12584) -Codechange: do not access the order type directly. 2008-04-05 23:36:54 +00:00
smatz febc5150c9 (svn r12547) -Feature: invisibility options to make objects invisible instead of transparent 2008-04-03 19:55:40 +00:00
rubidium 2edd403656 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h. 2008-03-31 00:06:17 +00:00
rubidium eeabab4555 (svn r12459) -Codechange: split news.h into news_type.h and news_func.h. 2008-03-28 08:53:36 +00:00
peter1138 9ccce57438 (svn r12317) -Fix [FS#1815]: Map string IDs that are embedded from other strings. 2008-02-29 08:48:01 +00:00
frosch b7993793c8 (svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus(). 2008-02-20 17:49:50 +00:00
smatz 29125c0e68 (svn r12177) -Codechange: use 'side' parameter in GetTileTrackStatus so there can be less checks in pathfinders for depots/stations/tunnels/bridges 2008-02-18 16:11:31 +00:00
belugas cebb86777a (svn r12092) -Fix(r11532)[FS#1755]: Make sure the production level will not get out of delimited boundaries, while using var result 0D/0E and than multiplying/dividing it.
And use multiply/divide operations instead of shifting.  It does the same, just adds a bit more readability
2008-02-09 03:12:05 +00:00
belugas a782ab3903 (svn r12091) -Codechange : remove all production level magic numbers and replace them by enums 2008-02-09 03:03:09 +00:00
peter1138 1d891a8b15 (svn r12042) -Fix [FS#1676]: Reimplement how rivers and canals are stored in the map, allowing the sea/river/canal status to also be
stored for buoys, docks, locks and depots. All these are now allowed on rivers and removal of them will revert to the 
original water type.
2008-02-02 09:28:43 +00:00
frosch a1c543e064 (svn r12029) -Feature: Allow trees on shore. 2008-01-31 17:54:13 +00:00
rubidium 1629699094 (svn r12006) -Fix: implement FS#1697 without the nasty side effects as specified in FS#1712. 2008-01-29 00:36:55 +00:00
belugas 44d085af6c (svn r11977) -Fix(r11976): not a typo, not a bug. Just a removal that should have been done.
Would help to compile first...
2008-01-24 18:28:52 +00:00
belugas 1fc0c0d2dc (svn r11976) -Fix: It seems that industries using results 0D/0E on callback cb29/35 were a bit too eager to close down. 2008-01-24 18:16:04 +00:00
peter1138 da53070a38 (svn r11952) -Fix (r11926): Prevent industries from being built on rivers, unless they require water. 2008-01-22 22:17:28 +00:00
rubidium aa0412e0bc (svn r11925) -Fix (r122, r9867): loading old, pre savegame version 2, savegames. 2008-01-19 14:00:04 +00:00
frosch 5659cbe6fe (svn r11876) -Fix: Start industry tile animation also for overridden industry tiles. (Will only apply to new games or newly build industries.) 2008-01-16 15:06:48 +00:00
rubidium 576f8ad93e (svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*. 2008-01-15 18:44:22 +00:00
rubidium d4e6a6bf57 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 2008-01-13 01:21:35 +00:00
belugas 6375ea065b (svn r11798) -Codechange: add comments and give a more representative function's name 2008-01-09 18:35:18 +00:00
rubidium 46650c54b6 (svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114). 2008-01-09 16:55:48 +00:00
rubidium b4b3190b62 (svn r11788) -Fix (11787): makedepend doesn't mark delete files as changed... 2008-01-09 09:57:48 +00:00
belugas f9a592cfdd (svn r11766) -Codechange: Last fine tunings on smooth economy, by Sirkoz. 2008-01-06 01:06:12 +00:00
rubidium e5e75bd8f8 (svn r11719) -Codechange: split sound.h in a header with types and one with functions. 2007-12-29 09:24:26 +00:00
glx c87f20ff37 (svn r11716) -Fix [FS#1561]: don't put more than one Random() in function calls because parameter evaluation order is not guaranteed in the c++ standard (can lead to desyncs) 2007-12-28 16:21:29 +00:00
rubidium 384503e7d3 (svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes. 2007-12-27 13:35:39 +00:00
rubidium b9046c97fb (svn r11702) -Codechange: move all date related stuff to date*. 2007-12-26 13:50:40 +00:00
rubidium 2786d789a1 (svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h). 2007-12-26 11:45:43 +00:00
rubidium 429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 2007-12-25 11:26:07 +00:00
rubidium 6a9e77e079 (svn r11680) -Codechange: refactor more out of openttd.h and functions.h. 2007-12-21 22:50:51 +00:00
rubidium 9e9cfe6e59 (svn r11677) -Codechange: move price and command related types/functions to their respective places. 2007-12-21 21:50:46 +00:00
rubidium 433a9f3c09 (svn r11675) -Codechange: split the string types from the string functions. 2007-12-21 19:49:27 +00:00
rubidium 5b49e75453 (svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h 2007-12-19 23:26:02 +00:00
glx ac7c79f039 (svn r11615) -Fix (r11609): temperate banks can only be built in towns (over a house) 2007-12-10 17:26:49 +00:00
rubidium 6aaa72c918 (svn r11609) -Fix [FS#1524]: wrong error messages were shown when trying to build some industries in the scenario editor. 2007-12-09 18:51:25 +00:00
glx 8aaa4e7da6 (svn r11590) -Fix (r11193): IsSlopeRefused() result was half wrong 2007-12-07 21:16:38 +00:00
belugas 4f030bbfff (svn r11545) -Revert(r11543): The result is not what was expected. Looks like more work might be needed 2007-12-01 02:59:22 +00:00
belugas aa0d37854d (svn r11543) -Codechange: Give a more adequate message when trying to place an industry required to be built over a house on any other type of tiles.
In reference to FS#1492, and other "bugs" like that one
2007-12-01 01:31:05 +00:00
belugas b10eea628d (svn r11534) -Feature(newgrf): Implement property 23h for Industries.
This will add a cost to the removal of an industry using the cheat magic bulldozer.
Note that the removal of regular or newgrf industries without specified removal cost will have no cost applied to.
This is a difference from original spec, where a default base cost is added.
2007-11-27 17:13:49 +00:00
belugas 9402d4054a (svn r11532) -Feature[newgrf]: Add decrement(0x0D) / increment(0x0E) production operations from result of production callback cb29/35.
Only var 0x93 will be affected by these operations
2007-11-27 04:16:08 +00:00
maedhros 8e273e0f88 (svn r11528) -Fix (r11500): With smooth economy enabled, industries that should only decrease production would always increase it when more than 60% was transported. 2007-11-26 19:23:53 +00:00
skidd13 734b22e070 (svn r11526) -Codechange: Rename the function delta fitting to the naming style 2007-11-26 16:01:29 +00:00
skidd13 bdc7fd2d76 (svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
2007-11-25 15:35:25 +00:00
rubidium ea072322fa (svn r11504) -Fix [FS#1467]: removing docks/ship depots could result in non-canal water where canals should have been build. 2007-11-24 08:45:04 +00:00
glx c8add52504 (svn r11502) -Fix (r11144): don't do standard production change if callbacks 29/35 failed
-Fix (r11144): disable smooth economy for industries using callbacks 29/35
2007-11-23 16:50:54 +00:00
belugas 536be43411 (svn r11500) -Codechange: Smooth economy fine-tuning, making industries more responsive. Patch by Sirkoz. 2007-11-23 12:12:07 +00:00
glx ee81e00082 (svn r11499) -Fix (r11144): mul/div factor were wrong (off by two) 2007-11-23 04:17:41 +00:00
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 2007-11-19 21:02:30 +00:00
skidd13 8be526e499 (svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style 2007-11-19 18:38:10 +00:00
rubidium 4dcd71038d (svn r11442) -Feature: make news messages related to the industry (production) changes better configurable; you can now disable news messages popping up for industries you are not servicing. Patch by Alberth. 2007-11-15 22:20:33 +00:00
rubidium 9d85d9d41f (svn r11420) -Fix [FS#1006]: industry closure news not properly shown when the news item pops up after the industry has been removed from the map. 2007-11-12 18:32:04 +00:00
rubidium 21c02fee87 (svn r11412) -Fix (r11403): animation was not turned on properly.
-Fix (r11410): wrong assumption about random reseeds made the whole thing reseed way too often, making the animation look very ugly.
2007-11-11 18:22:06 +00:00
rubidium af5c2a785f (svn r11410) -Codechange: implement random triggers for industries. 2007-11-11 17:56:37 +00:00
rubidium d32604d59e (svn r11403) -Fix: NewIndustries GRF assume that tiles are already animated during construction. 2007-11-11 00:53:59 +00:00
glx 63b36d9330 (svn r11402) -Fix [FS#1382]: incorrect handling of industry behaviour 'must be in town with population large than 1200' 2007-11-11 00:04:52 +00:00
belugas f55fdfb7c4 (svn r11399) -Feature(ette): transparency settings can now be saved and thus remembered.
-Codechange: Wrap all transparency settings in accessors, hiding the implementation
-Change: Clicking "transparent building" menu will toggle Houses And Trees only.  The other options can be used in the transparency gui.
Initial patch by Smatz (FS#1349), with some rework by BigBB and your humble servant.
2007-11-10 01:17:15 +00:00
rubidium 9e69fc8114 (svn r11373) -Fix [FS#1398]: do not even think about building disabled industries. 2007-11-03 23:34:12 +00:00
rubidium a416f540fa (svn r11371) -Fix [FS#1396]: the industry protection only kicked in when it should not kick in. 2007-11-03 15:21:26 +00:00
glx 0204f501df (svn r11356) -Fix (r11305): funding industries in MP game was causing desync 2007-10-29 23:29:06 +00:00
rubidium 21981fd8cb (svn r11349) -Fix [FS#1372]: crash when moving "invalid" cargo to a station. 2007-10-27 11:20:47 +00:00
glx 0215607d91 (svn r11305) -Codechange: randomise layout when building an industry ingame 2007-10-20 00:20:23 +00:00
rubidium 95f2181a1d (svn r11303) -Fix: EnsureNoVehicle and EnsureNoVehicleOnGround were both used to check whether there was no vehicle on the ground, except that the former didn't take care of aircraft shadows. So now we only use EnsureNoVehicleOnGround. 2007-10-19 22:46:55 +00:00
glx 9371ac1307 (svn r11302) -Fix (r9520): typo 2007-10-19 21:14:38 +00:00
glx c706b31eb7 (svn r11301) -Fix: water check when building industries didn't work 2007-10-19 21:05:25 +00:00
glx f3d79154eb (svn r11293) -Fix: newgrf defined industry news messages use TTD format for args, which is not the same as our. So we must detect those strings and pass them the right params 2007-10-18 20:35:59 +00:00
glx ad0574c226 (svn r11285) -Fix: 'site unsuitable' was always shown instead specified message when trying to build industry ingame (Csaboka) 2007-10-17 15:47:49 +00:00
rubidium ba7c595d84 (svn r11276) -Codechange: be more consistent with naming of some accessors.
-Fix: make sure canals are never owned by water. Based on a patch by boekabart.
2007-10-16 19:48:58 +00:00
belugas a1e1d85361 (svn r11268) -Fix[FS#1336]: Call IsSlopeRefused whenever it is required. Looks like there was one spot missing. Thanks frosch 2007-10-15 18:36:20 +00:00
glx 9a190237ca (svn r11207) -Fix [FS#1301]: don't use smooth_economy for industries using production callbacks as they may have no production for more than a month 2007-10-05 17:53:45 +00:00
belugas 7525f791c7 (svn r11197) -Fix: It is not useful to reset the override of an entity every time a new grf file is been submitted.
Since newhouses showed the way to newindustries(meaning I copied/adapted a lot of code and processes from it), the behaviour was there for newhouses too.
2007-10-03 00:57:54 +00:00
rubidium 2b56d11276 (svn r11194) -Fix: industries with not all tiles custom slope checked (but at least one) would be build on wrongly sloped tiles. 2007-10-02 17:48:17 +00:00
rubidium 531fe3e070 (svn r11193) -Fix: be more compliant with the specifications of callback #2F (and undocumented side effects in TTDP in corner cases). 2007-10-02 16:56:45 +00:00
rubidium 32c0c3a644 (svn r11186) -Fix: only fill the accepted cargo fields once, not multiple times. 2007-09-30 14:29:45 +00:00