Commit Graph

171 Commits (jgrpp)

Author SHA1 Message Date
Niels Martin Hansen e66cec8f86 Add: NewGRF support for 16-in-16-out industries 6 years ago
Niels Martin Hansen 8859381d30 Add: Industries can produce and accept up to 16 different cargoes 6 years ago
frosch 135ad9c6c9 (svn r27929) -Cleanup: Remove unused Industry::random_triggers 7 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
rubidium e40eb8177a (svn r23735) -Codechange: remove ~50 includes from headers that weren't needed 13 years ago
truebrain 1c9bec1999 (svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC) 13 years ago
yexo 6aae285b72 (svn r23457) -Codechange: introduce Industry::TileBelongsToIndustry() to simplify code checking for that 13 years ago
frosch 3eddb9c23f (svn r23049) -Fix [FS#4810]: Use the same forest-check for the vegetation-map colour as for nearby station names. 13 years ago
terkhen 00e5c1df18 (svn r22567) -Codechange: Store persistent storages inside a pool. 13 years ago
terkhen d7ec492887 (svn r22556) -Codechange: Remove constness from the town pointer at industries. 13 years ago
alberth 9d899b3758 (svn r21267) -Doc: Typo fixes. 14 years ago
alberth a245db6360 (svn r21173) -Codechange: Don't recompute target industry counts each time. 14 years ago
alberth eb4ab0091a (svn r21172) -Feature: Better control over how many new industries are created during the game. 14 years ago
alberth f22fb0d53d (svn r21171) -Change: Reset industry build data at game start or load. 14 years ago
alberth 4d419b9f3e (svn r21170) -Codechange: Store industry management data in the save game (some of it is used in the very near future). 14 years ago
alberth 3211ab301e (svn r21168) -Feature: Use desired industry counts rather than relative probability to decide which industry to build. 14 years ago
alberth e861487bcb (svn r21167) -Codechange: Use IndustryBuildData::builddata instead of a local variable. 14 years ago
alberth 1bf94674df (svn r21166) -Codechange: Move MaybeNewIndustry() to IndustryBuildData::TryBuildNewIndustry(). 14 years ago
frosch 8a5571a264 (svn r20900) -Codechange: Move ProductionLevels enum to industry.h 14 years ago
frosch 7f060bdaf5 (svn r20896) -Codechange: Split recompution of productionrates for non-smooth economy to separate function. 14 years ago
alberth be59c90e86 (svn r20674) -Codechange: Remove declared functions that do not exist (anymore) otherwise. 14 years ago
frosch c049bf3f38 (svn r19497) -Fix: [NewGRF] Bytes and words get sign-extended for temporary/persistent storage. (Spotted by yexo) 14 years ago
frosch 116a5f56a4 (svn r19481) -Codechange: Turn _industry_counts into a static member of Industry. 14 years ago
terkhen b9f06f3f29 (svn r19062) -Codechange: Move smallmap related functions to their own header. 15 years ago
rubidium 82fc28f77f (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 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. 15 years ago
rubidium e8ddf001c8 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 15 years ago
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 15 years ago
smatz ee685c8287 (svn r17316) -Codechange: use Industry::GetByTile() instead of GetIndustryByTile() 15 years ago
smatz c94b9973e6 (svn r17315) -Codechange: move code related to industry types to separate file 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
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
15 years ago
rubidium 6e3d999dce (svn r16914) -Codechange: split Station and BaseStation into different files 15 years ago
frosch 6ffa9f50db (svn r16725) -Documentation: raw_industry_cost_multiplier 15 years ago
smatz ff33ed94ce (svn r16667) -Codechange: replace GetRandomTown() and GetRandomIndustry() by Town::GetRandom() and Industry::GetRandom() 15 years ago
smatz 56a7b70591 (svn r16380) -Codechange: rename pool.hpp to pool_type.hpp 15 years ago
smatz 10d1ef5447 (svn r16379) -Codechange: remove GetNumTowns(), GetNumIndustries() and GetActiveCompanyCount(), use PoolItem::GetNumItems() instead 15 years ago
smatz 62a7948af0 (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 04723b240e (svn r16377) -Codechange: unify FOR_ALL_* macros, use separate index variable instead of var->index 15 years ago
rubidium 88201ccd5c (svn r16333) -Cleanup: remove a bunch of unused wrapper functions. 15 years ago
rubidium e7dedf4e1b (svn r16332) -Codechange: replace some -1 + 1 with 'nothing' or <= .. - 1 with < .. - 1 (both caused due to wrapper functions) 15 years ago
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 15 years ago
smatz ed1e54bd84 (svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize() 15 years ago
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
smatz 8585aa71ed (svn r15726) -Codechange: unify coding style for const pointers 15 years ago
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 16 years ago
smatz 254e19da91 (svn r14807) -Codechange: use INVALID_TILE instead of 0 to mark invalid depots, industries, towns and waypoints 16 years ago
smatz 73ca72922c (svn r14746) -Fix: don't let any disaster vehicle (Helicopter or Airplane) target invalid industry 16 years ago
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
16 years ago
belugas f2f2bcf23c (svn r14105) -Fix: Some typos that are more grammatical errors, as it seems.
Provided by ln
I've added a little fix on currency.cpp too, why not :)
16 years ago
glx 17a1873843 (svn r13174) -Codechange: make a class of the IndustryDirectoryWindow. 16 years ago
rubidium 7ccda80b0b (svn r12986) -Codechange: move the landscape and transport related types from openttd.h to their own headers. 16 years ago
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. 16 years ago
rubidium 00f0bf98ee (svn r12751) -Codechange: do what has been done in r11862 in a different way so it uses less memory. 16 years ago
belugas 7cf2c83462 (svn r12041) -Codechange: Add the loader and the property for action 00 industries, prop 24, nearby station name.
No assignation yet, no real work either.
17 years ago
rubidium 26c621945d (svn r11862) -Fix [FS#1559]: when two NewGRFs 'fight' to define the same cargo it could happen that the strings are defined by one cargo and the 'action2' by another and when one assumes that both come from the same NewGRF... So store the GRF ID with the strings. To be extra sure add the same protection mechanism to industries and towns too. 17 years ago
rubidium d4e6a6bf57 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 17 years ago
rubidium 38115acf5a (svn r11776) -Codechange: more header splittings to reduce the dependencies. 17 years ago
rubidium b9046c97fb (svn r11702) -Codechange: move all date related stuff to date*. 17 years ago
rubidium 2786d789a1 (svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h). 17 years ago
rubidium aac835171e (svn r11700) -Codechange: reduce the amount of unnecessary includes. 17 years ago
rubidium 6a9e77e079 (svn r11680) -Codechange: refactor more out of openttd.h and functions.h. 17 years ago
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.
17 years ago
rubidium af5c2a785f (svn r11410) -Codechange: implement random triggers for industries. 17 years ago
glx 9371ac1307 (svn r11302) -Fix (r9520): typo 17 years ago
rubidium 136d726b6f (svn r11185) -Codechange: prepare some more code for the introduction of NewIndustries. Patch by Belugas. 17 years ago
glx 5e45e73037 (svn r11176) -Revert (r9867): as it is needed for newgrf callbacks 14B and 14C 17 years ago
rubidium 7455676941 (svn r11170) -Fix (r11152): a variable's type was too small for the data that is going to put into it when NewIndustries are finally activated. For now it just removes a warning and doesn't really fix anything. 17 years ago
rubidium c00db50edc (svn r11143) -Fix: the random bits were not set for the production callback when the NewGRF asked for it. 17 years ago
rubidium 60f1eb21fa (svn r11139) -Codechange: add support for persistent storage for NewGRFs. 17 years ago
belugas 47dd4989a8 (svn r11137) -Feature: [NewGRF] Add support for bit 17 of property 1A for Industries. This bit enables the protection of the last instance of an industry type once raise. 17 years ago
rubidium 8a6cc3aa10 (svn r11009) -Codechange: unvirtualise IsValid as that isn't needed with templates. This gives up to 10% performance increase in games with lots of vehicles. 17 years ago
belugas 36c5b4e1ef (svn r10980) -Fix [FS#1158] : This will hopefully fix the case of an assert that happens when an industry uses a special gfx index (tile spec 0xFF). This 0xFF is the sentinel of a special check done for oil rigs, where water need to be around, but no tile will be constructed on it.
Problem is that the upper limit of gfx tiles is currently at 175.  So, of course the system will assert with 255 ;)
17 years ago
belugas 99158287fd (svn r10972) -Codechange: Implement the counterpart(GetTranslatedIndustryTileID) of getindustileid of TTDPatch. This allows to ensure that the ID of a tile (taken out of the map or not) is still a valid one regarding the possible override it may have been flagged to.
It is not the strict same thing, but is what we need regarding the slightly different approach we took for newindustries.
17 years ago
belugas d921cf88a3 (svn r10963) -Revert(10700): Although the idea was good, it was more prone of errors than usefull.
So now, it will be better to jump to the overriden tile when it is been marked as an override
17 years ago
belugas 116de48fdf (svn r10961) -Codechange: Flag default substitutes of industry/tiles with a value that cannot be legal.
This avoids the forest of coal mine error in the futur
17 years ago
belugas fafe33cdd2 (svn r10903) -Feature: [NewGRF] Add support for variable 44 of Variational Action 2 for Industries 17 years ago
rubidium e4149482ec (svn r10759) -Codechange: make the industry struct use the pool item class as super class. 17 years ago
belugas 8ad3a6f8fd (svn r10700) -Codechange: Enable to jump (by default) to the overriding industry tile spec of the one been queried.
Only on certain very specific circumstances do we need the original spec
17 years ago
rubidium fe8e297995 (svn r10675) -Codechange: unhardcode the industry types used in several locations of the source code. 17 years ago
belugas f9d3463af1 (svn r10639) -Codechange: Give meaninfull name to a magic number 17 years ago
belugas 6d22aa54cf (svn r10570) -Codechange: Add enum required for Callback 0x22: CBID_INDUSTRY_AVAILABLE
-Documentation: Add documentation for enum IndustryConstructionType, which describes how the industry has been created
17 years ago
rubidium 79d04412b0 (svn r10508) -Codechange: allow customizable animation schemes for industries. 17 years ago
rubidium 9a55c79fd1 (svn r10460) -Codechange: add some more variables needed for newindustries regarding to the creation of the industries. 17 years ago
rubidium c86015203a (svn r10459) -Codechange: add helper functions to determine whether an industry is a primary industry and how much it costs to build such an industry. 17 years ago
rubidium 0d68a919d9 (svn r10451) -Add: support for "prospecting" raw industries, i.e. you pay an amount of money and then it might (with a given chance) build a raw industry somewhere on the map. 17 years ago
belugas f21f6554d8 (svn r10447) -Codechange: Don't need to specify values on an enum when those values are contiguous 17 years ago
rubidium 1bdb72ebd4 (svn r10439) -Codechange: initial steps for customized industry productions. 17 years ago
rubidium b67cfd4825 (svn r10418) -Codechange: implement/resurrect the industry production flags. 17 years ago
rubidium d73e490c52 (svn r10406) -Fix [FS#968]: only industries in the temperate climate should be affected by the "do not increase production" flag. 17 years ago
belugas 42f0593b82 (svn r10379) -Codechange: silence a compiler warning (which was right) about a variable too little for what's been asked to do 17 years ago
belugas 94200b63b8 (svn r10088) -Codechange: A typo and a code-style 17 years ago
belugas 08c9365971 (svn r10078) -Codechange: Centralize all industry counts data and access 17 years ago
belugas f51b869e69 (svn r10064) -Fix(r10063): compile again, when changing stuff. DOn't trust first run 17 years ago
belugas 7586143e3b (svn r10063) -Codechange: Change VARDEF for extern
-CodeChange: Add the count of industries, basic support for variable 67, var action02 forindustries
17 years ago
rubidium 8a74b2ebe1 (svn r10058) -Codechange: give some industry variable sensible names (like not telling "last_mo_production" when it is the production of the current month). 17 years ago
rubidium 40cea6c3ef (svn r10054) -Codechange: make the industries cost modifier look more like the original one, so it's much easier to support industries that use this original format. 17 years ago
belugas f8da1b6e1a (svn r10001) -Codechange: Add support for removing dynamically allocated newgrf data 17 years ago
belugas 0cb8413a8f (svn r9976) -Codechange: Declare a writable array of specs for industry and industry tiles.
It will be initialized by the original data upon game start.
Rename some enums to be more consistent too
17 years ago
belugas 4cb32f903e (svn r9974) -Codechange: Remove the enabled member of GRFFileProps, since it'snot really grf related 17 years ago