Commit Graph

44 Commits

Author SHA1 Message Date
Peter Nelson f146680121
Codechange: Use vector for industry random sounds. (#12606)
Use a vector to store the list of random sounds played for an industry.

The removes manual memory allocation, flags to control memory management, a separate count member, and a try/catch block.
2024-05-01 19:55:00 +00:00
Rubidium e441033d68 Codechange: use std::array instead of C-style array for produced/accepts cargo 2024-04-20 11:29:55 +02:00
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Peter Nelson 5c630e10b7
Fix 2fd90960: Missing default vehicles and industry acceptance/production. (#12000)
* Fix 2fd90960: Missing default vehicles and industry acceptance/production.

Some default definitions are used across multiple climate types and relied on climate-independent cargo slot even though they specified a climate-dependent cargo type.

Add MixedCargoType that indirectly allows multiple labels to be specified for these.
2024-02-05 23:11:32 +00:00
Peter Nelson 2fd9096070
Change: Decouple and remove landscape-dependent cargo types. (#11719)
Cargo types of default engines, industries and houses are now specified in terms of label.
2024-02-04 10:16:08 +00:00
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 2024-01-06 13:37:33 +01:00
Peter Nelson e5aed24395
Codechange: Use std::array for industry tile cargo acceptance. (#11498)
This avoids use of memcpy/memset to copy or fill.
2023-11-27 23:17:55 +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
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 2023-05-17 10:14:41 +01:00
Rubidium 68ff3fd062 Change: include fmt.h C++ headers in stdafx.h
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
2023-05-08 16:49:23 +02:00
frosch b3d048dfcf
Change: [NewGRF] industry special flag 19 now specifically targets only passenger production, instead of the second cargo of any water-based industry. (#8590)
This behavior is less surprising to NewGRF authors, and may even be intentional behavior for some industries.
2021-01-18 22:42:10 +01:00
Pavel Stupnikov c9fd85528a
Add: new economy "frozen" that stops production changes and industry closures (#8282) 2020-12-14 23:35:07 +01:00
Michael Lutz 6d3c2edc59 Add: [NewGRF] Industry behaviour flag to override second cargo production clamping for water industries when using smooth economy.
Smooth economy is only used when the corresponding setting is enabled and the industries does not use the production callback.
2020-06-28 15:33:37 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Niels Martin Hansen 53f8d0b815 Codechange: Use std::vector for industry tile layouts 2019-10-19 17:16:25 +01:00
glx 48f99fd980 Codechange: use std::array for _sorted_industry_types 2019-04-18 21:49:34 +02:00
Niels Martin Hansen e66cec8f86 Add: NewGRF support for 16-in-16-out industries 2018-11-03 21:43:54 +01:00
Niels Martin Hansen 8859381d30 Add: Industries can produce and accept up to 16 different cargoes 2018-11-03 21:43:54 +01:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
frosch bcac3d16b6 (svn r24513) -Add: [Script] ScriptIndustryType::IsProcessingIndustry. 2012-09-08 12:14:00 +00:00
rubidium e40eb8177a (svn r23735) -Codechange: remove ~50 includes from headers that weren't needed 2012-01-03 20:26:05 +00:00
alberth 4af8c2d5e1 (svn r23704) -Doc: Doxygen comment fixes and additions. 2012-01-01 17:22:32 +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 eaadd215be (svn r23594) -Codechange: follow coding style with multi line comments 2011-12-19 17:40:54 +00:00
rubidium 3d88c74389 (svn r23526) -Codechange: unify cargos vs cargoes 2011-12-15 21:56:00 +00:00
rubidium 7efd7e19ed (svn r21845) -Codechange: move documentation towards the code to make it more likely to be updates [d-m]. 2011-01-18 22:31:06 +00:00
alberth 9d899b3758 (svn r21267) -Doc: Typo fixes. 2010-11-20 13:33:24 +00:00
frosch b65f463e33 (svn r20850) -Codechange: Add IndustrySpec::UsesSmoothEconomy() to deduplicate code. 2010-09-26 11:04:30 +00:00
rubidium e2e26190d5 (svn r20623) -Codechange: unify the storing of animation related information 2010-08-26 15:31:40 +00:00
rubidium af9d8824bd (svn r20398) -Codechange: move some variables of GRFFileProps into (the new) GRFFilePropsBase 2010-08-07 20:51:07 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +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
terkhen 217a98e69b (svn r19521) -Codechange: Use a IndustryType array to sort industries by name instead of a LegendAndColour array. 2010-03-28 12:25:09 +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
frosch 116a5f56a4 (svn r19481) -Codechange: Turn _industry_counts into a static member of Industry. 2010-03-20 14:30:16 +00:00
yexo 683ad53d21 (svn r19193) -Codechange: increase the maximum number of airport tiles to 256 and introduce AirportTileOverrideManager 2010-02-22 14:15:48 +00:00
alberth bb5261a075 (svn r19136) -Doc: Added Doxygen comments for industry checking procedures. 2010-02-15 09:49:10 +00:00
yexo 3c627747d3 (svn r19063) -Codechange: type in constant name (andythenorth) 2010-02-08 23:05:29 +00:00
frosch fb9b833dc4 (svn r19053) -Codechange: Add an enum for the special flags of industry tiles. (based on andythenorth' work) 2010-02-07 12:04:44 +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 6803672c88 (svn r18563) -Document: some industry related functions 2009-12-20 13:45:43 +00:00
frosch 8da21d58a9 (svn r18282) -Codechange: Remove IndustrySpec::raw_industry_cost_multiplier and use 8 * cost_multiplier instead. 2009-11-24 22:02:23 +00:00
rubidium 64bafcbe18 (svn r17534) -Codechange: unify the naming of callback masks/flags 2009-09-14 12:22:57 +00:00
smatz c94b9973e6 (svn r17315) -Codechange: move code related to industry types to separate file 2009-08-30 11:40:01 +00:00