Commit Graph

168 Commits

Author SHA1 Message Date
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