Commit Graph

176 Commits

Author SHA1 Message Date
rubidium 41e5c839e0 (svn r24179) -Codechange: move some variables of Town to TownCache 2012-04-25 20:50:13 +00:00
rubidium e40eb8177a (svn r23735) -Codechange: remove ~50 includes from headers that weren't needed 2012-01-03 20:26:05 +00:00
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) 2011-12-20 17:57:56 +00:00
truebrain ad48ab9237 (svn r23626) -Add: ScriptTown::SetText, which adds custom text to the Town GUI 2011-12-19 21:00:55 +00:00
truebrain afcf07ac8a (svn r23620) -Add: ScriptTown::SetCargoGoal and ScriptTown::SetGrowthRate (GameScript only) 2011-12-19 20:59:19 +00:00
rubidium df16ebd730 (svn r23595) -Codechange: add comma after last enum to get a more uniform coding style 2011-12-19 17:48:04 +00:00
rubidium 3d88c74389 (svn r23526) -Codechange: unify cargos vs cargoes 2011-12-15 21:56:00 +00:00
terkhen de0bf0663a (svn r23407) -Codechange: Keep a bitmap of all cargos accepted by towns. 2011-12-03 22:23:10 +00:00
terkhen 59d8b0204f (svn r23405) -Codechange: Keep a matrix of cargos accepted by houses for each town (michi_cc). 2011-12-03 22:21:27 +00:00
truebrain f906ebd2a5 (svn r23300) -Add: show on the GUI when a town grows and make a general framework to store goals of a town 2011-11-23 16:07:14 +00:00
truebrain 229e572663 (svn r23298) -Add: track statistics of all incoming and outgoing goods. Incoming based on TownEffect, outgoing based on CargoType (based on patch by Terkhen) 2011-11-23 16:05:19 +00:00
truebrain 389ffec7db (svn r23296) -Codechange: I found a fund building, but do I fund found buildings? 2011-11-23 13:42:23 +00:00
michi_cc 6548ec6e9e (svn r23233) -Codechange: Refactor maximum and actually transported cargo amount of towns into a reusable struct. 2011-11-15 20:47:53 +00:00
yexo 40d5419cd2 (svn r22920) -Cleanup: replace two very old town variables taht were rarely used by small functions that compute there value on-the-fly when necessary 2011-09-11 11:47:18 +00:00
frosch a3eb319415 (svn r22888) -Doc: Doxygenize Town struct. (adf88) 2011-09-04 09:06:07 +00:00
terkhen 7ffc8c0173 (svn r22568) -Change: Add a list of persistent storages to the Town class. 2011-06-12 20:49:07 +00:00
frosch 474b4799e8 (svn r22482) -Codechange: Add some contants for the number of ticks between certain cyclical tasks. 2011-05-21 11:26:37 +00:00
rubidium af18c30f30 (svn r20816) -Codechange [FS#3835]: make waypoint default names work like depots, stations and vehicles (Krille) 2010-09-16 16:31:57 +00:00
rubidium 1dbd2223ad (svn r20443) -Codechange: more TileHash to a more generic location 2010-08-10 23:31:43 +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
alberth dc6ed2c2c0 (svn r20279) -Doc: Doxygen additions/improvements. 2010-08-01 17:45:53 +00:00
terkhen c960e1a5eb (svn r20150) -Cleanup: Remove an unused function header. 2010-07-14 19:37:04 +00:00
rubidium 398418b8fa (svn r19812) -Codechange: give some unnamed enums a name or, in case they consisted of unrelated values use static const (u)int 2010-05-13 09:44:44 +00:00
rubidium 863ff6522b (svn r19798) -Codechange: generalise the waypoint naming method 2010-05-12 18:31:39 +00:00
smatz 53aaabe6e9 (svn r19507) -Codechange: remove semicolon after DECLARE_POSTFIX_INCREMENT and DECLARE_ENUM_AS_BIT_SET 2010-03-23 22:25:43 +00:00
alberth 6b6ff9c52b (svn r19400) -Codechange: CheckforTownRating returns a CommandCost. 2010-03-13 15:33:07 +00:00
alberth 7134201524 (svn r19399) -Doc: Doxyment enum TownRatingCheckType. 2010-03-13 15:13:19 +00:00
alberth 566f87b2de (svn r19279) -Codechange: CheckIfAuthorityAllowsNewStation() returns CommandCost. 2010-02-27 17:42:55 +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 c2221885f4 (svn r18027) -Codechange: make some unneededly global variables static and remove some unused variables 2009-11-09 09:59:35 +00:00
smatz 1da745c9ad (svn r17612) -Feature: possibility to choose (randomise or enter custom) town name before its creation (original patch by Terkhen) 2009-09-22 13:54:54 +00:00
smatz 93d275f1be (svn r17608) -Codechange: use CmdFoundTown when founding 'Random town' too 2009-09-21 20:22:56 +00:00
alberth 17a52eb852 (svn r17582) -Codechange: Move TownActions and _town_action_costs[] to a header file to allow sharing. 2009-09-20 10:08:10 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +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
rubidium e067d4a4b8 (svn r16821) -Codechange: unify the naming of type::UpdateVirtCoord and UpdateAll[Type]VirtCoords. 2009-07-13 22:33:25 +00:00
smatz 59f94619c7 (svn r16746) -Codechange: use Town::PostDestructor() instead of not very clean construct for invalidating nearest town for road tiles 2009-07-05 13:21:51 +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 af78d6a9bb (svn r16665) -Codechange: replace GetTownByTile() by Town::GetByTile() 2009-06-26 13:46:23 +00:00
smatz e6a165881c (svn r16664) -Codechange: move house-related stuff from town.h and town_type.h to separate files 2009-06-26 13:44:14 +00:00
smatz a50ba1b8c1 (svn r16632) -Codechange: rename Town::flags12 to Town::flags 2009-06-23 09:52:26 +00:00
smatz 56a7b70591 (svn r16380) -Codechange: rename pool.hpp to pool_type.hpp 2009-05-22 15:39:22 +00:00
smatz 10d1ef5447 (svn r16379) -Codechange: remove GetNumTowns(), GetNumIndustries() and GetActiveCompanyCount(), use PoolItem::GetNumItems() instead 2009-05-22 15:23:47 +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 04723b240e (svn r16377) -Codechange: unify FOR_ALL_* macros, use separate index variable instead of var->index 2009-05-22 14:23:36 +00:00
rubidium 88201ccd5c (svn r16333) -Cleanup: remove a bunch of unused wrapper functions. 2009-05-17 11:18:34 +00:00
rubidium e7dedf4e1b (svn r16332) -Codechange: replace some -1 + 1 with 'nothing' or <= .. - 1 with < .. - 1 (both caused due to wrapper functions) 2009-05-17 11:17:53 +00:00
rubidium f457cff73c (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) 2009-05-17 10:35:13 +00:00
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 2009-05-17 01:00:56 +00:00
smatz ed1e54bd84 (svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize() 2009-05-16 23:44:36 +00:00
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
smatz e1e6687bfd (svn r16277) -Codechange: enumerize values and remove unneeded values used for testing town rating 2009-05-11 11:55:41 +00:00
frosch 4710c3fe31 (svn r16274) -Fix: Disable multitile houses for which the newgrf does not define proper additional tiles. (instead of crashing later) 2009-05-10 22:16:51 +00:00
frosch c7345c6db0 (svn r15755) -Fix: Number of houses in house variables 0x44, 0x60 and 0x61 were incorrect after 0xFF had been reached and could desync clients joining afterwards. 2009-03-17 19:40:10 +00:00
rubidium 2adbf67968 (svn r15697) -Fix (r15695): warning about comparing signed vs unsigned. 2009-03-13 00:48:03 +00:00
belugas f6e4bc765a (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
2009-03-12 23:54:20 +00:00
belugas 7f650197d7 (svn r15679) -Cleanup: Little code-style application 2009-03-12 01:35:27 +00:00
smatz 7c8474da13 (svn r15642) -Codechange: use a default parameter value in CalcClosestTownFromTile 2009-03-08 01:20:11 +00:00
yexo fb7b0536e7 (svn r15584) -Codechange: Move several variables from variables.h to more appropriate headers. 2009-02-25 21:45:14 +00:00
smatz 0878541cf2 (svn r15505) -Codechange: pass name of new town as parameter to CMD_BUILD_TOWN 2009-02-16 23:23:33 +00:00
frosch 032346cf8a (svn r15452) -Codechange: Add DC_NO_MODIFY_TOWN_RATING. 2009-02-11 18:50:47 +00:00
rubidium d846eef0b6 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 2009-02-09 21:20:05 +00:00
smatz aa692a99a9 (svn r15352) -Codechange: make the arguments passed around while founding a town a bit more readable 2009-02-05 13:33:37 +00:00
smatz df2a387fc3 (svn r15342) -Feature: allow changing town layout in the 'Found new town' window 2009-02-04 22:52:34 +00:00
smatz 832e392855 (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
2009-02-04 20:17:25 +00:00
peter1138 481c2164d0 (svn r15149) -Codechange: GetMaskOfTownActions() is used by a Cmd handler, therefore it does not belong in _gui. 2009-01-19 12:07:01 +00:00
frosch f5cff71284 (svn r14992) -Codechange: Rename 'CheckIfAuthorityAllows' to 'CheckIfAuthorityAllowsNewStation' and unduplicate a tiny bit of code. 2009-01-11 14:26:11 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +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
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 c3746a55bb (svn r14732) -Codechange: replace some magic number with less magic constants and use the proper type for a few variables. 2008-12-23 21:03:43 +00:00
michi_cc ac722661a5 (svn r14505) -Fix (r14504): Missing include. 2008-10-20 19:46:49 +00:00
michi_cc 02c99bdf66 (svn r14504) -Cleanup: Use the right variable type for tile offsets. 2008-10-20 19:35:48 +00:00
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +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
rubidium 1a4ac3ee5c (svn r13821) -Codechange: replace some uint8/bytes with more specificly named typedefs and replace a few magic numbers. 2008-07-25 10:00:03 +00:00
frosch 17de6f9ced (svn r13634) -Codechange: Let house var 0x65 ignore the house, the variable is queried for. 2008-06-25 20:04:27 +00:00
belugas 4f3eb7f3cd (svn r13383) -Codechange: Put the cost of house removal in a class member 2008-06-05 01:43:03 +00:00
belugas 4b4e73c1dd (svn r13368) -Codechange: give house's min/max_date a better name, as it is really year, not date 2008-06-03 03:06:16 +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
peter1138 cfb962c7f1 (svn r13297) -Codechange: Use GUIList for the town directory window 2008-05-27 20:05:36 +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
belugas fc35ad9ee9 (svn r13226) -Feature: Allow to have more than only two airports per town. The number of airports is now controlled by the noise each of them generates, the distance from town's center and how tolerant the town is.
Initial concept : TTDPatch (moreairpots),  Initial code : Pasky
Thanks to BigBB (help coding), Smatz Skidd13 and frosch for bugcatches and advices
2008-05-24 02:54:47 +00:00
rubidium 3d5567ccf7 (svn r12987) -Codechange: split viewport and tile selection. 2008-05-07 13:10:15 +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
rubidium 9c675afb91 (svn r12859) -Fix: make the town rating tests use less memory and much quicker; from 13% to unnoticable in the profile in games with lots of towns and lots of very active AIs. 2008-04-23 22:55:11 +00:00
rubidium 00f0bf98ee (svn r12751) -Codechange: do what has been done in r11862 in a different way so it uses less memory. 2008-04-17 11:47:22 +00:00
rubidium 9d3a08523a (svn r12726) -Fix [FS#1877]: overflow causing strange building behaviour in towns. 2008-04-15 22:27:28 +00:00
smatz 42ed287506 (svn r12560) -Cleanup: town_cmd.cpp and header files - variable scope and a bit of coding style 2008-04-04 14:53:06 +00:00
skidd13 584bbfd7e7 (svn r12534) -Feature: Add a new type of town road layouts - random for each town 2008-04-01 16:27:01 +00:00
skidd13 4cc6140619 (svn r12513) -Codechange: rename OriginalTileRandomiser something more descriptive 2008-03-31 15:10:24 +00:00
skidd13 a887b79f90 (svn r12381) -Fix [FS1835] [FS1535] (r11855): The number of houses wasn't computed right. A few other things regaring the updating had to be changed. Big thanks for support to frosch123 and SmatZ, to name just a few. (Inspired by a patch of bilbo) 2008-03-18 12:28:21 +00:00
belugas 7a66d5e21d (svn r11873) -Codechange: less a few magical numbers and a tiny bit more comments on town zones 2008-01-16 02:53:55 +00:00
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. 2008-01-15 13:19:49 +00:00
rubidium 5c4150d304 (svn r11832) -Codechange: get rid of (quite) some VARDEFs. 2008-01-13 13:36:01 +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
peter1138 ab8382c0db (svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is
no limit to the amount of names.
-Fix: NewGRF engines could not be renamed.
2008-01-12 19:58:06 +00:00