Commit Graph

33 Commits

Author SHA1 Message Date
Peter Nelson 934545a674
Fix: Calculation of initial engine age was inaccurate. (#11660)
Engine age in months was calculated as the difference in days / 32, instead of the actually difference in months. This would result in engines being artificially younger if a game was started at a later date.
2023-12-31 15:47:32 +00:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Tyler Trahan 930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 2023-04-26 07:14:03 -04:00
Jonathan G Rennison 10e76b2788 Fix #10032: Capacities of articulated vehicles in build window
See also: #9954
2023-01-14 18:52:01 +01:00
Peter Nelson cbf48c4dd9 Change: Add extra random seed to StartupEngines().
This means that calling reset_engines will rerandomise introduction dates
and reliability.

Probably not necessary.
2022-12-25 16:41:58 +00:00
Peter Nelson 3485709f53 Add: Additional vehicle flags to control variants. 2022-12-25 16:41:58 +00:00
glx b50d77b831 Fix #8064: Incorrect display of refit capacity 2020-04-06 16:21:30 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
peter1138 e6bb90543e Change: Show additional cost and refitted capacity in build vehicle window. 2019-03-24 15:28:48 +00:00
PeterN 4cebebcf68
Change: Add CargoTypes type for cargo masks. (#6790) 2018-05-21 22:08:39 +01:00
alberth bc84c52b30 (svn r26849) -Fix[FS#6113]: Better display of refit information in articulated vehicles. 2014-09-18 19:53:22 +00:00
rubidium 1efc64fa7d (svn r25553) -Fix [FS#5530]: provide a warning when no vehicles are available, and tell what to do in that case 2013-07-02 18:57:26 +00:00
frosch b78a459613 (svn r22977) -Codechange: Rename SetCachedEngineCounts() to GroupStatistics::UpdateAfterLoad(). 2011-10-03 17:20:56 +00:00
alberth 7303f7d199 (svn r21595) -Codechange: Some header files had their name changed, update the ifndef/define/endif lines. 2010-12-22 11:46:41 +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 1c5a92ae98 (svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions 2009-11-16 17:15:42 +00:00
frosch 9a9d0ee7c0 (svn r17728) -Cleanup: Remove some more unneeded/unused parameters. 2009-10-06 19:52:38 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +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 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
peter1138 748d4d2fb9 (svn r15412) -Fix: Clearing custom engine names could cause desyncs due to be client-side only; GUI parts of save/load of custom engine names also removed as it was never implemented. 2009-02-08 12:58:14 +00:00
smatz 6dffd8ae82 (svn r15216) -Feature: native support for Transport Tycoon (Original) savegames. Based on SVXConverter's source code and documentation by Roman Vetter 2009-01-23 02:35:17 +00:00
smatz a9a8bb3590 (svn r15166) -Codechange: reduce number of includes in afterload.cpp 2009-01-20 13:56:35 +00:00
peter1138 0052c85002 (svn r14926) -Feature: Automatically set last engine ageing year to the last 'introduction year plus half model life', to allow engines later than 2050 to appear. 2009-01-08 21:48:59 +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 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
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
smatz a9cc987929 (svn r13077) -Codechange: move function that updates cached num_engines to engine.cpp, make it run only 1 loop 2008-05-13 21:36:09 +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 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
rubidium c84fe27ca9 (svn r12787) -Documentation: add/fix documentation of some functions. Patch by Alberth. 2008-04-19 13:05:05 +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
Renamed from src/engine.h (Browse further)