Commit Graph

147 Commits

Author SHA1 Message Date
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 2024-01-22 09:04:34 -05:00
Peter Nelson c0ab436077
Codechange: Store Colours in Colours type. (#11625)
This reduces casts, some magic numbers, and introduces a bit of type-safety.
2024-01-21 13:23:04 +00:00
Peter Nelson 278b42d078 Codechange: Document Industry::GetCargoProduced/Accepted and add const-variant. 2023-11-01 21:37:53 +00:00
Peter Nelson 4f3adc038a Cleanup: Use standard comment codestyle. 2023-11-01 21:37:53 +00:00
Michael Lutz 1c56991213 Add: [Script] Game script control of industry production level. 2023-09-02 16:20:59 +02: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
PeterN 584faaf064
Change: Reorganise industry accept/produce arrays. (#10853)
Use a array of struct for each cargo instead of an array for each statistic.
This makes iterating for acceptance and production much simpler.
pct_transported is now calculated when needed.
2023-05-25 21:25:46 +01:00
Peter Nelson 09408e8e46 Codechange: Add IsCargoAccepted/Produced() helpers. 2023-05-24 17:34:11 +01:00
Peter Nelson 76516d7f70 Codechange: Use IsValidCargoID/IsValidCargoType.
IsValidCargoType() is used only for unmapped IDs.
2023-05-22 20:43:40 +01:00
Tyler Trahan ba3de0383a
Codechange: Pass more std::string to StringFilter::AddLine() (#10743) 2023-04-30 10:23:05 +02:00
Tyler Trahan 930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 2023-04-26 07:14:03 -04:00
Tyler Trahan 6830e5f5f7
Cleanup: Don't use a magic number when closing processing industries (#10710) 2023-04-24 19:58:48 +00:00
dP fe2c8a1240
Codechange: Decouple INDUSTRY_CTRL into separate commands (#10475) 2023-02-14 11:29:11 +01:00
dP bab7de6cf2 Feature: Allow GameScripts to add additional text to Industry view window 2021-01-22 09:50:53 +00:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
Pavel Stupnikov 9a45a0f535
Feature: Set exclusive access to industry from GS (#8115) 2020-12-22 14:29:48 +01:00
Niels Martin Hansen b7751c483e
Feature: Influence industry production changes from GS (#7912) 2020-12-22 14:21:31 +01:00
Jonathan G Rennison c3223903ed Codechange: Cache resolved town, station and industry name strings 2020-01-12 19:37:43 +00:00
Jonathan G Rennison f1734e7815 Change: Only resort industry directory window on production change if necessary 2020-01-12 19:37:43 +00:00
glx 00c2a98cf3 Codechange: Replace FOR_ALL_INDUSTRIES with range-based for loops 2019-12-21 20:13:03 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Charles Pigott 0a53ee8cfe Codechange: Remove PartOfSubsidyByte 2019-04-29 17:40:22 +01:00
Charles Pigott 5b34c8019f Codechange: Remove Company/OwnerByte types 2019-04-29 17:40:22 +01:00
Peter Nelson 8b1b3fd0f9 Feature: Non-rectangular sparse station catchment area. 2019-03-09 16:33:47 +00:00
PeterN dd20ccee88
Feature: Industries with neutral stations (e.g. Oil Rig) only supply/accept cargo to/from their neutral station. (#7234)
This change is a controlled by a game setting, located under Environment ->
Industries which allows toggling the behaviour. It defaults to enabled.

"Company stations can serve industries with attached neutral stations"

When enabled, industries with attached neutral station (such as Oil Rigs) may
also be served by company-owned stations built nearby. This is the traditional
behaviour.

When disabled, these industries may only be served by their neutral station.
Any nearby company-owned stations won't be able to serve them, nor will the
neutral station serve anything else other than the industry.
2019-03-08 18:30:44 +00: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
frosch 135ad9c6c9 (svn r27929) -Cleanup: Remove unused Industry::random_triggers 2017-10-25 15:38:19 +00: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
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
yexo 6aae285b72 (svn r23457) -Codechange: introduce Industry::TileBelongsToIndustry() to simplify code checking for that 2011-12-09 16:11:42 +00:00
frosch 3eddb9c23f (svn r23049) -Fix [FS#4810]: Use the same forest-check for the vegetation-map colour as for nearby station names. 2011-10-21 19:10:35 +00:00
terkhen 00e5c1df18 (svn r22567) -Codechange: Store persistent storages inside a pool. 2011-06-12 20:47:45 +00:00
terkhen d7ec492887 (svn r22556) -Codechange: Remove constness from the town pointer at industries. 2011-06-12 20:31:44 +00:00
alberth 9d899b3758 (svn r21267) -Doc: Typo fixes. 2010-11-20 13:33:24 +00:00
alberth a245db6360 (svn r21173) -Codechange: Don't recompute target industry counts each time. 2010-11-13 15:19:43 +00:00
alberth eb4ab0091a (svn r21172) -Feature: Better control over how many new industries are created during the game. 2010-11-13 15:17:55 +00:00
alberth f22fb0d53d (svn r21171) -Change: Reset industry build data at game start or load. 2010-11-13 15:15:25 +00:00
alberth 4d419b9f3e (svn r21170) -Codechange: Store industry management data in the save game (some of it is used in the very near future). 2010-11-13 15:13:14 +00:00
alberth 3211ab301e (svn r21168) -Feature: Use desired industry counts rather than relative probability to decide which industry to build. 2010-11-13 15:07:34 +00:00
alberth e861487bcb (svn r21167) -Codechange: Use IndustryBuildData::builddata instead of a local variable. 2010-11-13 15:04:58 +00:00
alberth 1bf94674df (svn r21166) -Codechange: Move MaybeNewIndustry() to IndustryBuildData::TryBuildNewIndustry(). 2010-11-13 15:02:31 +00:00
frosch 8a5571a264 (svn r20900) -Codechange: Move ProductionLevels enum to industry.h 2010-10-04 20:10:31 +00:00
frosch 7f060bdaf5 (svn r20896) -Codechange: Split recompution of productionrates for non-smooth economy to separate function. 2010-10-04 19:23:50 +00:00
alberth be59c90e86 (svn r20674) -Codechange: Remove declared functions that do not exist (anymore) otherwise. 2010-08-28 20:15:45 +00:00
frosch c049bf3f38 (svn r19497) -Fix: [NewGRF] Bytes and words get sign-extended for temporary/persistent storage. (Spotted by yexo) 2010-03-21 11:05:39 +00:00
frosch 116a5f56a4 (svn r19481) -Codechange: Turn _industry_counts into a static member of Industry. 2010-03-20 14:30:16 +00:00
terkhen b9f06f3f29 (svn r19062) -Codechange: Move smallmap related functions to their own header. 2010-02-08 21:19:41 +00:00