Commit Graph

428 Commits

Author SHA1 Message Date
truebrain e9f584ac21 (svn r23531) -Codechange: document and rename widgets to be consistent and understandable 2011-12-16 16:27:45 +00:00
truebrain 2aa774e831 (svn r23528) -Codechange: move widget enums to widgets/NNN_type.h 2011-12-15 22:22:55 +00:00
rubidium 3d88c74389 (svn r23526) -Codechange: unify cargos vs cargoes 2011-12-15 21:56:00 +00:00
michi_cc 7f8162c324 (svn r23508) -Add: Engine sorter for aircraft range. 2011-12-13 01:18:40 +00:00
michi_cc def8e7215b (svn r23504) -Feature: Aircraft range. 2011-12-13 00:43:35 +00:00
frosch 2ba05f1601 (svn r23335) -Change: Make determination of vehicle weight when loaded consistent between road and rail vehicle purchase info. 2011-11-26 14:52:33 +00:00
frosch 3e780a794b (svn r23334) -Fix [FS#4820]: Road vehicle purchase info failed to display vehicles carrying no cargo. (Can only happen when NewGRFs are screwed up.) 2011-11-26 14:51:06 +00:00
frosch d8f8909f85 (svn r23142) -Change: [NewGRF v8] Unify the return values of callbacks returning D0xx texts. 2011-11-08 17:24:43 +00:00
frosch bbc3409942 (svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs. 2011-11-01 16:51:47 +00:00
frosch acc3c75951 (svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code. 2011-11-01 00:23:41 +00:00
yexo 46321ac310 (svn r23045) -Change: copy 6 registers to newgrf textstack after cb23 instead of 4 2011-10-20 19:02:13 +00:00
yexo d8a80adf0e (svn r23040) -Add: [NewGRF] allow use of newgrf textstack during callback 23 2011-10-20 16:49:30 +00:00
frosch 8a9b68d964 (svn r22850) -Feature: Display separate ocean and canal speeds in the ship purchase list, if they differ. 2011-08-27 10:34:31 +00:00
frosch f93c8ce5aa (svn r22627) -Codechange: Rename PrepareTextRefStackUsage() to StartTextRefStackUsage() to make it more obvious that you must call StopTextRefStackUsage() at some point. Also extent the documentation. 2011-07-03 13:49:29 +00:00
rubidium 46c242b1dc (svn r22385) -Fix [FS#4603]: strnatcmp is in string.cpp, so it ought to be declared in string_func.h. 2011-04-30 14:24:23 +00:00
terkhen 10caf391a1 (svn r22343) -Change: Remove pixel limiter for query strings. 2011-04-17 18:42:17 +00:00
frosch ec9540a12a (svn r22241) -Codechange: Add additional to-be-used parameter to OnInvalidateData(). 2011-03-13 21:31:29 +00:00
terkhen 679cd3c21b (svn r21803) -Cleanup: Remove unnecessary semicolons. 2011-01-15 15:36:58 +00:00
rubidium ab9cc74ba5 (svn r21410) -Codechange: limit engine name by amount of characters, not bytes 2010-12-05 22:24:20 +00:00
terkhen 75f86a7a21 (svn r21344) -Feature [FS#4214]: Natural sorting of strings using ICU. 2010-11-27 22:52:12 +00:00
rubidium 30637a8340 (svn r21157) -Codechange: remove information about the text direction out of the language "list" 2010-11-13 09:56:25 +00:00
rubidium 0fc5206a5b (svn r21151) -Fix [FS#4221]: Sort arrow wasn't accounted for in two windows causing it to be overwritten by the "sort by" string 2010-11-12 16:29:09 +00:00
planetmaker 1ee62de0a3 (svn r21105) -Feature-ish: Allow to sort purchase lists for trains and road vehicles by tractive effort 2010-11-06 20:20:03 +00:00
planetmaker 2364ac83a0 (svn r21104) -Doc: Add doxygen commands to a few functions 2010-11-06 20:12:20 +00:00
planetmaker eaae7ab8b1 (svn r21103) -Change: Use the same sorting of the sorting criteria for both trains and road vehicles 2010-11-06 20:11:36 +00:00
alberth 7e48d85104 (svn r21060) -Doc: Improved wording of comments (mostly by __ln__) 2010-10-30 17:51:07 +00:00
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 2010-08-26 22:01:16 +00:00
alberth 35fec79700 (svn r20499) -Doc: Spelling fixes, and one doxygen comment addition. 2010-08-15 14:06:43 +00:00
frosch 9e538acc03 (svn r20461) -Codechange: Replace WWT_HSCROLLBAR, WWT_SCROLLBAR and WWT_SCROLL2BAR with NWID_HSCROLLBAR and NWID_VSCROLLBAR. 2010-08-12 09:16:43 +00:00
frosch 71ca58c2bb (svn r20453) -Codechange: Remove direct accesses to Window::hscroll, vscroll and vscroll2.
Note: All windows get individual members with the same names, which are initialised via Window::GetScrollbar(). This caching is not required at all, but simplifies conversion.
2010-08-12 08:37:01 +00:00
frosch 10339c60c0 (svn r20452) -Codechange: Remove NWidgetCore::FindScrollbar() and associate scrollbar explicitly using a NWidgetPart via SetScrollbar(). 2010-08-12 06:44:45 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
rubidium e356cb9405 (svn r20281) -Codechange: unify case scope closure + break coding style 2010-08-01 18:53:30 +00:00
rubidium ab47c9dea7 (svn r20242) -Change: remove the need for "{WHITE}" control codes in some of the railtype NewGRF strings
-Fix: make it possible to properly assess the length of the rail toolbar caption
2010-07-30 12:15:22 +00:00
alberth 4203e641f8 (svn r20223) -Codechange: Replace scrolled row calculations by a call to GetScrolledRowFromWidget(). 2010-07-26 13:08:48 +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
yexo 2330851d1d (svn r19669) -Fix: don't display an error message when double clicking on a vehicle in the 'available vehicles'-window 2010-04-17 23:38:00 +00:00
terkhen 869fac9964 (svn r19573) -Fix (r19541): Special cargos did not appear at the refit list. 2010-04-07 14:17:29 +00:00
terkhen 8660890bbb (svn r19539) -Codechange: Use a macro to loop through the list of sorted cargo specifications. 2010-04-02 12:20:41 +00:00
terkhen b68fb8c6ed (svn r19536) -Feature: Sort cargos at the filter by cargo dropdown in the build vehicle window. 2010-04-01 19:52:13 +00:00
terkhen e27e5febb6 (svn r19480) -Fix: Stop reducing the size of the vehicle list after selecting a vehicle with a long description. 2010-03-20 12:21:01 +00:00
terkhen 81ca76a655 (svn r19475) -Cleanup: Remove an unneeded for when drawing detail panels. 2010-03-19 21:00:15 +00:00
yexo e037512a6f (svn r19451) -Cleanup: remove some unused code 2010-03-18 15:20:49 +00:00
terkhen 3ed1442e05 (svn r19348) -Add: Allow to sort road vehicles by power and by power vs running cost at the engine preview window. 2010-03-06 13:03:17 +00:00
terkhen be3b839ded (svn r19347) -Add: Vehicle GUI now shows power, weight and tractive effort for road vehicles. 2010-03-06 12:59:28 +00:00
rubidium 0072503496 (svn r19087) -Codechange: some typos in StringIDs 2010-02-10 20:20:18 +00:00
frosch 88019e64e1 (svn r18966) -Codechange: Remove Window::OnDoubleClick() in favour of a parameter for OnClick(). 2010-01-30 18:34:48 +00:00
terkhen 272f2cd93e (svn r18963) -Codechange: Give AccelerationModel a generical name. 2010-01-30 16:27:35 +00:00
rubidium 879668811c (svn r18818) -Fix [FS#3526] (r18766): some train acceleration type conversions were missed 2010-01-15 22:21:50 +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 66b900215a (svn r18797) -Fix (r18781): building wagons didn't add them to a train 2010-01-13 21:49:15 +00:00
rubidium 2b97f38cd1 (svn r18781) -Codechange: pass the CommandCost to the callback instead of whether it succeeded or not.
-Fix: AIs did update their last cost incorrectly in network games if the cost of the DC_EXEC phase differed from the ~DC_EXEC phase.
2010-01-11 18:46:09 +00:00
rubidium 833c6f36f3 (svn r18779) -Codechange: merge the command callbacks of the primary vehicles; they are identical 2010-01-11 18:34:02 +00:00
alberth 52c7d9897e (svn r18612) -Fix [FS#3407]: Buy vehicle window did not properly disable panel drawing while shaded. 2009-12-23 10:12:43 +00:00
alberth 3323d64f28 (svn r18606) -Codechange: Introduce several forms of zero-size stacked display planes. 2009-12-22 20:43:25 +00:00
alberth 91872aca48 (svn r18588) -Feature [FS#2943]: Add shading and unshading of windows. 2009-12-21 16:24:29 +00:00
alberth 5a083f183e (svn r18580) -Codechange: Use widget information only for setting scrollbar capacity. 2009-12-20 20:08:39 +00:00
alberth 64f1e18830 (svn r18464) -Fix (r17863): Caption of the build vehicle window did not have company colours. 2009-12-11 20:37:24 +00:00
rubidium ac4ef286f4 (svn r18447) -Change: make some more windows (e.g. graphs, company view) stickyable 2009-12-09 17:10:57 +00:00
rubidium 293dfd7c3e (svn r18322) -Codechange: remove the WDP duplication; no need to tell the same twice. 2009-11-28 14:42:35 +00:00
rubidium 8d6e323ef8 (svn r18280) -Codechange: remove widget indices that are not needed for custom drawing/handling input 2009-11-24 21:13:36 +00:00
rubidium 14300d309c (svn r18277) -Codechange: remove unneeded widget indices for close, resize and sticky boxes and for window captions 2009-11-24 18:05:55 +00:00
rubidium 69b6d9309a (svn r18274) -Codechange: remove the unused WDF flags 2009-11-24 17:28:29 +00:00
alberth 450e40b997 (svn r18230) -Codechange: Allow fill stepsize to be set from Window::UpdateWidgetSize(). 2009-11-22 18:28:14 +00:00
alberth 2b6f792513 (svn r18229) -Codechange: Make fill_x, fill_y a number instead of a bool. 2009-11-22 18:26:01 +00:00
alberth bf93372ca2 (svn r18220) -Codechange: Reduce number of nested widget dynamic casts. 2009-11-22 13:22:53 +00:00
rubidium d913282e7a (svn r18212) -Codechange: remove unneeded 'parameters' for WWT_CAPTION, WWT_CLOSEBOX and WWT_STICKYBOX in the nested widget arrays 2009-11-22 11:20:12 +00:00
rubidium 5f2ddfbc5a (svn r18152) -Codechange: remove the 'minimum window size' from the WindowDesc; it's determined from the (nested) widgets 2009-11-17 19:16:48 +00:00
rubidium ef11ce84ee (svn r18128) -Codechange: rename GetVehicleListHeight to GetVehicleHeight as it has nothing to do with the height of the vehicle lists. 2009-11-16 20:58:38 +00:00
rubidium fdbe2d827c (svn r18122) -Fix: the build vehicle GUI would draw a (few) pixels over the border 2009-11-16 17:56:59 +00:00
rubidium 1c5a92ae98 (svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions 2009-11-16 17:15:42 +00:00
rubidium e7dd53dffc (svn r18119) -Codechange/Fix: always call OnResize so the matrices/scrollbars are initialised without the need for duplicating the OnResize code 2009-11-16 16:42:04 +00:00
rubidium 5589792d0c (svn r18118) -Codechange: improve behaviour of the engine lists (both build vehicle/autoreplace) w.r.t. large(r) fonts and RTL. RTL support for 'wider than usual' vehicles is still needed though. 2009-11-16 16:22:14 +00:00
rubidium f025475535 (svn r18117) -Codechange: don't pass the location of the vehicle count but whether to show the vehicle count 2009-11-16 15:11:54 +00:00
rubidium 3d2d7af88f (svn r18086) -Codechange: remove 'widget' from WindowDesc 2009-11-15 10:26:01 +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
frosch 67cae40ec1 (svn r17926) -Fix (r9352): Make the decision whether aircraft carry mail consistent. Now always the cargo class decides. 2009-10-31 17:48:09 +00:00
rubidium b7630b0e2a (svn r17863) -Codechange: make the build vehicle window nested 2009-10-25 00:26:40 +00:00
rubidium ca0521f89f (svn r17853) -Codechange: remove the 'delta' parameter from OnResize; it was used in ways that aren't always wanted, causing bugs and the like. Also with nested widgets most reasons for handling OnResize have gone. 2009-10-24 14:53:55 +00:00
rubidium 2f41c0411c (svn r17850) -Codechange: remove most usage of delta on OnResize 2009-10-24 09:47:02 +00:00
rubidium d1d35b95b6 (svn r17786) -Fix [FS#3265]: graphical glitches (matrices/scrollbars with wrong 'size') upon reiniting windows 2009-10-17 14:29:10 +00:00
frosch 1cab0dbc1d (svn r17729) -Cleanup: Deduplicate some code. 2009-10-06 19:56:43 +00:00
frosch 9a9d0ee7c0 (svn r17728) -Cleanup: Remove some more unneeded/unused parameters. 2009-10-06 19:52:38 +00:00
frosch f3aacb8fe3 (svn r17725) -Codechange: Reduce usage of EngInfo and XxxVehInfo, esp. when a Engine * is already present. 2009-10-06 19:17:07 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
rubidium e8ddf001c8 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 2009-09-19 09:51:14 +00:00
rubidium 17313b6e3f (svn r17530) -Codechange: use QSortT instead of qsort for sorting EngineIDs 2009-09-13 17:47:07 +00:00
rubidium 1f21a5cb41 (svn r17446) -Codechange: rename BUILD with BUY for strings that are about building (in the future buying) vehicles. 2009-09-07 08:59:43 +00:00
rubidium e69e3378b0 (svn r17367) -Codechange: make the autoreplace, bridge and build vehicle GUIs use the scrollbar wrappers 2009-09-02 07:17:15 +00:00
alberth 1a15f7e6a7 (svn r17325) -Codechange: Un-duplicate engine drawing routines. 2009-08-30 17:38:28 +00:00
smatz 100ae8efcc (svn r17292) -Codechange: use unified ToPercent() function to convert fract numbers to percents 2009-08-27 13:31:26 +00:00
rubidium aca7ba714a (svn r17271) -Fix: SetFill sometimes used 1/0 when it should be using true/false 2009-08-23 19:03:09 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +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 e9bc557b2a (svn r16930) -Codechange: more StringID name unification and grouping 2009-07-23 19:31:50 +00:00
rubidium b04ba7dcea (svn r16922) -Codechange: unduplicate some vehicle CMD_*s and move the setting of the error message to a single place 2009-07-22 23:39:35 +00:00
rubidium 9980af2898 (svn r16921) -Codechange: make it more clear what strings are related to road vehicles; only ROAD isn't always enough. Also unify the way of writing it. 2009-07-22 22:44:56 +00:00
rubidium 2962d8f0fc (svn r16920) -Codechange: shuffle some strings around to simplify looking up vehicle type specific strings for a specific message 2009-07-22 20:17:07 +00:00
rubidium c17c31b5b6 (svn r16919) -Codechange: unify some more StringID w.r.t. their naming 2009-07-22 19:12:20 +00:00
smatz 77d13eae61 (svn r16852) -Codechange: use FOR_ALL_CARGOSPECS for iterating over all valid CargoSpecs 2009-07-16 20:40:06 +00:00
smatz 1f29e38b83 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 2009-07-16 19:00:13 +00:00
alberth d0a47fc1b4 (svn r16845) -Codechange: Introduction of constants for describing the bits in a WWT_MATRIX data field. 2009-07-16 16:22:23 +00:00
frosch 1e09854cb7 (svn r16679) -Codechange: Let GetCapacityOfArticulatedParts() return a CargoArray instead of a pointer to a static array. 2009-06-27 21:36:04 +00:00
yexo 8bc9adde19 (svn r16648) -Codechange: move some more includes around 2009-06-24 22:38:47 +00:00
yexo 44c15e4196 (svn r16647) -Codechange: remove newgrf.h include from newgrf_engine.h to prevent unnecessary inclusion newgrf.h anyway 2009-06-24 21:33:11 +00:00
smatz 8343340acb (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() 2009-06-24 17:39:54 +00:00
rubidium 512b021e26 (svn r16581) -Codechange: unify the access to Engine::lifelength. 2009-06-16 13:52:18 +00:00
frosch 09d64ff79d (svn r16386) -Codechange: Move ShowAdditionalText() to build_vehicle_gui and make it static. 2009-05-22 19:47:26 +00:00
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
rubidium 53887e07bb (svn r16160) -Codechange: remove the need for explicit TC_FROMSTRING for DrawString. 2009-04-26 14:52:56 +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 d338fff1b9 (svn r16110) -Codechange: use {CARGO} instead hardcoded cargo name (there is always something duplicated :p) 2009-04-21 16:52:58 +00:00
frosch f46f8bd427 (svn r16044) -Fix (r16042): Win compilation. (Swallow) 2009-04-12 18:40:39 +00:00
frosch 6ebe8d7fc6 (svn r16042) -Feature [FS#1941]: Allow filtering of vehicle purchase lists by cargo. Based on patch by sbr. 2009-04-12 17:38:01 +00:00
frosch 07a5f529bf (svn r16038) -Codechange: Remove BuildVehicleWindow::regenerate_list in favor of the GUIList flag. 2009-04-12 14:12:17 +00:00
alberth 9d2738b9c4 (svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback 2009-03-29 09:49:11 +00:00
rubidium 89ceed55bf (svn r15850) -Codechange: replace some magic constants with the less magic line height constant 2009-03-25 20:16:09 +00:00
alberth 6567a29e18 (svn r15820) -Codechange: Some windows using nested widgets 2009-03-22 21:16:57 +00:00
alberth 3b2f47c470 (svn r15809) -Codechange: Add name comments to build vehicle widgets 2009-03-22 12:14:44 +00:00
rubidium dfe5dad5f6 (svn r15807) -Codechange: let the build vehicle gui helper function pass around left and right instead of only left and assuming infinite width. 2009-03-22 11:06:25 +00:00
rubidium 45f189fdca (svn r15785) -Codechange: remove the *Truncated part of the old text drawing API. 2009-03-21 20:12:12 +00:00
rubidium 529dd0867f (svn r15778) -Fix [FS#2749] (r15666): when sorting on cost don't sort on the running cost (sbr) 2009-03-21 11:16:10 +00:00
frosch 6dd04a9a78 (svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere. 2009-03-18 19:32:13 +00:00
rubidium f9def73be6 (svn r15723) -Codechange: use a constructor for WindowDescs as that makes expanding them much easier (Alberth) 2009-03-15 15:12:06 +00:00
rubidium 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 2009-03-14 18:16:29 +00:00
frosch fa35dc10e5 (svn r15705) -Fix: Do not show passenger-/mail-capacity if the aircraft carries only cargo. 2009-03-13 23:49:12 +00:00
rubidium fa78027ffd (svn r15666) -Fix [FS#2689]: sorting of engines in the purchase list didn't use the same numbers as the GUI showed, e.g. articulated parts weren't taken into accound when ordering by capacity. 2009-03-10 21:17:00 +00:00
frosch e01106f66b (svn r15592) -Fix: Refit-info in purchase list did only check the first articulated part. 2009-02-27 20:40:39 +00:00
frosch d3850e101c (svn r15541) -Revert (r15399): 'v->cargo_type' is also used in other places, which cannot accept CT_INVALID.
-Codechange: Add Engine::GetDefaultCargoType() and Engine::CanCarryCargo() and use them.
-Fix [FS#2617]: When articulated parts have no available default cargo, use the cargo type of the first part for livery selection.
-Change: To decide whether a vehicle is refittable do not test its current capacity for being zero, but always use the 'capacity property'.
  Note: The property is used unmodifed without calling CB 15/36. By setting it to a non-zero value and returning zero in the callback vehicles can be refitted to/from zero capacity for e.g. livery effects.
  Note: It is intentional that you cannot control refittability by CB 36.
2009-02-21 12:52:41 +00:00
rubidium a5f30dd553 (svn r15521) -Codechange: add helper function to get the display tractive effort of a vehicle. 2009-02-19 09:45:44 +00:00
rubidium 90e2465d7d (svn r15427) -Codechange: give w->caption_color a more sensible name as it holds the owner of whatever is shown in the window 2009-02-09 02:33:10 +00:00
rubidium ac7757324e (svn r15338) -Fix [FS#2598]: close all construction related windows whenever changing company. 2009-02-04 16:59:41 +00:00
frosch c28c4c1986 (svn r15306) -Codechange: Deduplicate code by adding Engine::GetDisplayMaxSpeed(), GetPower() and GetDisplayWeight(). (and using them) 2009-02-01 16:10:06 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
glx c1cf3934fa (svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication. 2009-01-25 00:57:03 +00:00
glx e8b5f49861 (svn r15261) -Add: added Engine::GetRunningCost() to remove some code duplication. Also stops AIs decrementing vehicle counter of first company 2009-01-24 20:14:15 +00:00
peter1138 3d404c2927 (svn r15236) -Codechange: Rename realistic_acceleration patch option to train_acceleration_model, and change from boolean to value. Don't forget to update your settings. 2009-01-23 20:53:43 +00:00
rubidium c8f3630e64 (svn r14953) -Fix (r14952): the "available aircraft" list caused a crash 2009-01-10 10:41:22 +00:00
rubidium 3d6c09b38d (svn r14952) -Codechange: unify the "can vehicle go to station" tests 2009-01-10 09:51:14 +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 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 2008-12-28 14:37:19 +00:00
rubidium c7c65cf5bc (svn r14683) -Change: only say a engine/vehicle is refittable when it can be refitted to at least two cargo type or when it has subcargos.
NOTE: it is still possible that a vehicle is marked refittable when there is nothing to refit to, e.g. when only one subcargo is available but that cannot be determined without a vehicle chain.
2008-12-16 22:02:12 +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
smatz 1266b1a73f (svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies) 2008-09-15 19:02:50 +00:00
smatz 606f4defdc (svn r14331) -Codechange: use an enum as additional parameter for ShowQueryString() 2008-09-15 16:29:40 +00:00
frosch e6688ab190 (svn r14239) -Fix [FS#2267]: The engine-purchase-list-sorter doubled running-cost and halfed capacity of double-headed engines. 2008-09-03 18:05:02 +00:00
peter1138 ff07598ce2 (svn r14157) -Codechange: Add and use string properties for rail types instead of relying on consecutive string IDs. 2008-08-24 21:31:24 +00:00
peter1138 9d0e1b635a (svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is. 2008-08-15 17:54:43 +00:00
rubidium 97c184f8f8 (svn r14063) -Codechange: replace some "magic" constants with enumified constants. 2008-08-13 06:05:01 +00:00
belugas 1737ce45e3 (svn r13887) -Codechange: Replace numbers with Colours enum on autoreplace, build_vehicle, cheat, depot and dock guis.
The fact that it goes alphabetically is pure coincidence.
2008-07-31 02:36:01 +00:00
peter1138 49769dffba (svn r13784) -Codechange: Truncate vehicle names in purchase list to width of window. 2008-07-22 16:13:42 +00:00
peter1138 00e052ad39 (svn r13760) -Codechange: With multiple NewGRF engine sets, engine IDs may not be allocated in the order expected by GRF authors, so sort by 'list position' instead of engine ID for all vehicle types. 2008-07-20 21:21:51 +00:00
belugas f666fd5a9b (svn r13696) -Fix[GUI]: The Build button of the vehicle list is now hidden, instead of just disabled. It will be only visible when called from the Depot Building Window.
Less confusion, hopefully.  Suggested by Eddi.
2008-07-13 02:43:46 +00:00
rubidium e74743227b (svn r13694) -Change: make it more explicit that you've opened the available train/ship/etc. list instead of the one where you can actually build vehicles by setting the appropriate title for the window. 2008-07-12 22:28:34 +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 f954a93ee0 (svn r13314) -Codechange: Switch EngineList from std::vector to GUIList 2008-05-28 17:29:27 +00:00
peter1138 bb00206736 (svn r13306) -Fix (r8362): Pass engine list by pointer instead of making a copy of it. 2008-05-28 10:29:48 +00:00
peter1138 f7a9c4f522 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp 2008-05-27 12:24:23 +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
smatz 5cedf77a9a (svn r13190) -Cleanup: remove unused variable 2008-05-19 16:44:50 +00:00
rubidium 27c38052b7 (svn r13185) -Codechange: remove everything related to the WindowProc callbacks. 2008-05-19 09:48:47 +00:00
rubidium 87015f5b63 (svn r13140) -Codechange: move the gui-list-sorting out of window_gui.h so window_gui.h only needs to be included in *_gui.cpp. 2008-05-17 13:01:30 +00:00
rubidium 8b54212900 (svn r13139) -Codechange: move DrawWindowWidgets and DrawWindowViewport to the Window class and remove Window from their naming. 2008-05-17 12:48:06 +00:00
peter1138 eb112946a7 (svn r13074) -Fix: For multiheaded engines, halve power and running cost when used instead of when loading, to allow callback values to work properly. 2008-05-13 20:39:57 +00:00
rubidium dddfaaac7d (svn r13069) -Codechange: it is no longer needed to pass a void *data pointer with the WE_CREATE message because nothing uses it anymore. 2008-05-13 14:43:33 +00:00
rubidium db69f81fe7 (svn r13068) -Codechange: make a class of the BuildVehicleWindow. 2008-05-13 14:28:27 +00:00
rubidium f23026cce8 (svn r13027) -Codechange: use StrEmpty instead of arr[0] == '\0' and remove the need for WE_ON_EDIT_TEXT_CANCEL. 2008-05-10 08:58:52 +00:00
glx 0b37b81956 (svn r13019) -Fix [FS#1997]: silence some more MSVC x64 warnings (michi_cc) 2008-05-08 20:05:32 +00:00
rubidium 23fc96c3e8 (svn r13005) -Codechange: prepare AllocateWindowDescFront for subclassing of Window. 2008-05-08 11:50:34 +00:00
smatz 3445b8054c (svn r12995) -Codechange: use std::vector for EngineList instead of C/C++ wrapper for CBlobT 2008-05-07 18:31:29 +00:00
rubidium 9bf519f26b (svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL. 2008-05-06 22:08:18 +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
peter1138 a00371c8db (svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist. 2008-04-29 21:31:29 +00:00
bjarni 501b89b8de (svn r12843) -Feature [FS#1945]: The autoreplace window is now resizable in both directions
The code to open this window is also unified for all vehicle types
2008-04-22 23:16:36 +00:00
rubidium 02cdf01507 (svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h. 2008-04-17 19:10:30 +00:00
rubidium ef2be7d0fc (svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h. 2008-03-31 00:17:39 +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
peter1138 dda6cab17a (svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it. 2008-02-21 19:09:10 +00:00
peter1138 79b6b9cb66 (svn r12205) -Codechange: rename RailVehicleInfo::running_cost_base to running_cost, inline with other vehicle types (It is the factor, not the base) 2008-02-20 20:56:54 +00:00
peter1138 7394b9d030 (svn r12164) -Fix (r12137, FS#1775]: Variable scope bug crept in 2008-02-16 23:09:33 +00:00
peter1138 3371d02449 (svn r12137) -Fix [FS#1769]: Show cargo capacity for articulated vehicles correctly in the purchase list. Multiple cargo types can also now been shown. 2008-02-14 07:25:24 +00:00
peter1138 a528dc89c7 (svn r12054) -Cleanup: Use VehicleType instead of byte for vehicle types... 2008-02-04 11:28:12 +00:00
peter1138 c99eb9e456 (svn r11988) -Codechange: Add a generic way of changing a widget's size and adjust the widgets around it to suit. 2008-01-26 20:55:04 +00:00
peter1138 9515328962 (svn r11959) -Codechange: Use macro to loop for specific engine types instead of using specific indexes each time.
-Codechange: Minor scope changes in said loops.
2008-01-23 13:20:51 +00:00
peter1138 70025a149d (svn r11918) -Codechange: Draw engine lists at widget positions instead of fixed pixel positions 2008-01-18 18:18:39 +00:00
peter1138 68707808c0 (svn r11915) -Codechange: Add a function to draw a sort button's up/down arrow. Arrows are now drawn in a consistent position based on the widget, instead of randomly positioned by pixel. 2008-01-18 10:36:55 +00:00
peter1138 d80e04d6f6 (svn r11904) -Codechange: use dropdown widget in 3 more windows, build vehicle, group vehicle list and station list. 2008-01-17 18:49:39 +00:00
peter1138 e4c05f8d78 (svn r11848) -Codechange: New class-based drop down list functionality. Lists are now dynamically generated, and can include parameters, or be extended however needed. 2008-01-14 16:10:58 +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
rubidium ac528411df (svn r11818) -Codechange: split player.h into smaller pieces. 2008-01-12 14:10:35 +00:00
rubidium 0e517fe023 (svn r11787) -Codechange: more header rewrites. This time related to viewport.h. 2008-01-09 09:45:45 +00:00
rubidium cd92981e9f (svn r11785) -Codechange: remove some unneeded includes. 2008-01-09 00:59:02 +00:00
peter1138 4479c06e2d (svn r11781) -Codechange: variable scope and initialization 2008-01-07 22:38:30 +00:00
rubidium b0ac283aec (svn r11774) -Change: do not include variables.h in a header when it is not needed. 2008-01-07 00:57:19 +00:00
bjarni 6196fa01ab (svn r11710) -Feature: [build vehicles windows] added sorting for cost, running costs and speed to road vehicles and ships build windows 2007-12-27 15:47:08 +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 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