J0anJosep
d9a37c915f
Cleanup #9725 : Replace cmd_helper related functions and remove cmd_helper.h.
2022-02-02 21:30:15 +01:00
Michael Lutz
c521b965bd
Codechange: Don't use a global for the terrforming error tile.
2021-12-16 22:28:32 +01:00
Michael Lutz
58cff7b081
Codechange: Un-bitstuff the remaining on-map commands.
2021-12-16 22:28:32 +01:00
Michael Lutz
c6d7b98808
Codechange: Un-bitstuff landscape commands.
2021-12-16 22:28:32 +01:00
Michael Lutz
e740c24eb7
Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
2021-12-16 22:28:32 +01:00
Michael Lutz
7048e1522f
Codechange: Move flags in CommandProc in front of the command arguments.
2021-12-16 22:28:32 +01:00
Michael Lutz
33ca4f2b99
Codechange: Let the compile generate the master command table out of templated command traits.
...
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
2021-12-16 22:28:32 +01:00
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
2021-12-16 22:28:32 +01:00
Michael Lutz
20a30825a0
Fix: Insufficient input validation for CmdIndustryCtrl. ( #9711 )
2021-11-20 23:27:45 +01:00
Patric Stout
28e90769f7
Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
...
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
2021-06-03 17:30:00 +02:00
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
2021-05-29 21:08:25 +02:00
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
2021-05-29 19:02:18 +02:00
glx22
38c97e1492
Codechange: Replace TILE_AREA_LOOP with range-based for loops
2021-05-13 00:13:54 +02:00
William Davis
881e1da51d
Change: Use gender-neutral pronouns in console command messages (and comments) ( #9203 )
2021-05-08 11:02:30 +01:00
Patric Stout
fece1c57ca
Codechange: Suppress warnings when asserts are disabled ( #8917 )
2021-04-01 11:16:19 +02:00
frosch
d9b4413bc9
Codechange: rename sound ids to make more sense. ( #8701 )
2021-02-20 19:01:04 +01:00
dP
bab7de6cf2
Feature: Allow GameScripts to add additional text to Industry view window
2021-01-22 09:50:53 +00: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
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
glx22
d8605ad18d
Codechange: Replace FOR_VEHICLE_ORDERS with range-based for loops
2020-12-27 10:28:46 +00: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
Pavel Stupnikov
c9fd85528a
Add: new economy "frozen" that stops production changes and industry closures ( #8282 )
2020-12-14 23:35:07 +01:00
frosch
df5362a008
Fix #8311 , b98c7763de4: Industry probability at map generation was scaled differently when set via property or callback.
2020-09-24 19:29:52 +02: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
dP
f2a9a1e2a5
Fix #8137 : New clients can't join (desync) after funding an industry
2020-05-13 08:43:01 +01:00
dP
7bd52970a1
Codechange: Refactor FindStationsAroundTiles to avoid code duplication
2020-05-13 08:43:01 +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
Niels Martin Hansen
86107028a4
Fix: Allow old NewGRF industries to blank out in/out cargo slots ( #7882 )
2019-12-29 14:36:45 +01:00
glx
d8a1be48cd
Codechange: Replace vehicle related FOR_ALL with range-based for loops
2019-12-21 20:13:03 +01: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
Jonathan G Rennison
2be619ea88
Fix #7820 : Heap use after free when removing oil rig
2019-11-03 00:39:38 +01:00
glx22
880680304d
Fix 53f8d0b81: signed/unsigned warnings ( #7803 )
2019-10-26 01:34:19 +02:00
Niels Martin Hansen
53f8d0b815
Codechange: Use std::vector for industry tile layouts
2019-10-19 17:16:25 +01:00
abmyii
ac21118736
Fix #7703 : Prevent sounds being produced by inactive industries ( #7752 )
2019-10-12 10:16:16 +02:00
Niels Martin Hansen
5feb06e3f3
Add: Scale oil refinery edge distance up by map size
...
Also scales oil rig distance up, since they use the same algorithm.
2019-08-17 22:02:22 +01:00
peter1138
f538179878
Feature: Multi-tile docks and docking points.
2019-06-30 16:46:32 +02:00
Charles Pigott
5b34c8019f
Codechange: Remove Company/OwnerByte types
2019-04-29 17:40:22 +01:00
PeterN
abe8cf4985
Codechange: Replace duplicated code with TileArea::Expand() ( #7467 )
2019-04-13 14:12:34 +01:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
2019-03-26 20:15:57 +00:00
PeterN
a4073895ae
Fix #7411 : Use industry production callback (if used) on initial industry cargo generation. ( #7412 )
2019-03-25 19:30:23 +00:00
Peter Nelson
8b1b3fd0f9
Feature: Non-rectangular sparse station catchment area.
2019-03-09 16:33:47 +00:00
peter1138
94b40fd530
Codechange: Convert IndustryVector to a std::set.
2019-03-09 16:33:47 +00:00
peter1138
ed6084523d
Codechange: Convert StationList from SmallVector to std::set.
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
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
2018-10-31 12:35:54 +01:00
PeterN
4cebebcf68
Change: Add CargoTypes type for cargo masks. ( #6790 )
2018-05-21 22:08:39 +01:00
frosch
6347e5f11e
(svn r27932) -Fix (r0) [FS#6639]: Forest, candyfloss forest and battery farm skipped the first animation frame.
2017-11-25 16:50:28 +00:00
peter1138
27033a2231
(svn r27841) -Fix: Don't consider locks or ship depots as clear water when placing industries.
2017-04-02 17:36:53 +00:00
rubidium
9daf7e749c
(svn r26879) -Codechange: remove most MayHaveBridgeAbove calls since the data is now always accessible
2014-09-21 11:24:51 +00:00
alberth
87dd209784
(svn r26729) -Feature: Warn about missing industries after generating a map.
2014-08-13 19:31:45 +00:00
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-04-23 20:13:33 +00:00
planetmaker
2aa545a842
(svn r26457) -Codechange: Remove unused parameter from SetIndustryCompleted
2014-04-12 11:43:04 +00:00
frosch
03169121c2
(svn r26328) -Fix: Warnings and compilation failures.
2014-02-10 17:13:54 +00:00
rubidium
c7629735a3
(svn r26312) -Codechange: iterate the nearby tiles instead of the industry list for a conflicting industry when the number of industries is really large (MJP)
2014-02-06 21:05:00 +00:00
rubidium
30a95966ec
(svn r26308) -Fix-ish: do not try to build more towns/industries than the pool can hold (MJP)
2014-02-06 20:42:09 +00:00
zuu
e50478c053
(svn r25853) -Codechange: Simplify SetupFarmFieldFence by replacing the Axis and north parameter with a direction parameter and taking adventage of the new unified SetFence function (cirdan, LordAro)
2013-10-12 22:28:38 +00:00
zuu
fb5dc7762b
(svn r25852) -Codechange: Merge GetFenceXX/SetFenceXX into one common GetFonce/SetFence for all directions that take an extra direction parameter (cirdan, LordAro)
2013-10-12 22:23:43 +00:00
zuu
e7c6786016
(svn r25850) -Codechange: Merge IsBadFarmFieldTile and IsValidFarmFieldTile into IsSuitableForFarmField (cirdan, LordAro)
2013-10-12 22:17:11 +00:00
zuu
dfb5663313
(svn r25849) -Codechange: Introduce IsTileFlat to not compute full slope information for situations when we only want to know if a tile is flat or not (cirdan, LordAro)
2013-10-12 22:07:58 +00:00
alberth
1b5b4db690
(svn r25238) -Feature: Display imminent closure of an industry in its view window.
2013-05-12 19:38:30 +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
frosch
3ce8d2ce70
(svn r24846) -Add: Advanced settings to disable certain sound effects.
2012-12-23 21:09:09 +00:00
zuu
0826994821
(svn r24623) -Feature: Allow GameScripts to construct and prospect industries without having a sponsor
2012-10-22 18:56:21 +00:00
frosch
bcac3d16b6
(svn r24513) -Add: [Script] ScriptIndustryType::IsProcessingIndustry.
2012-09-08 12:14:00 +00:00
frosch
a8c88f43b6
(svn r24284) -Codechange: Remove NewsSubtypes and directly use NewsTypes and NewsFlag instead.
2012-05-26 14:16:03 +00:00
frosch
a0be398da9
(svn r24283) -Codechange: Add AddTileNewsItem function to preemptively deduplicate code.
2012-05-26 14:15:57 +00:00
frosch
16b310d8ce
(svn r24186) -Feature: [NewGRF] Callback to set industry production level on construction. (andythenorth)
2012-04-28 16:44:01 +00:00
frosch
789c95d4b8
(svn r24185) -Codechange: Deduplicate some only partly deduplicated code.
2012-04-28 16:07:28 +00:00
rubidium
41e5c839e0
(svn r24179) -Codechange: move some variables of Town to TownCache
2012-04-25 20:50:13 +00:00
frosch
c425368a17
(svn r24107) -Fix [FS#5143] (r3181): Glass-sprite of bubble-generator was not drawn anymore for completely constructed tiles.
2012-04-09 10:18:10 +00:00
frosch
a1f2ad880d
(svn r24040) -Fix [FS#5095]: Improve error messages wrt. the placement restrictions of banks, water towers and toy shops.
2012-03-17 19:48:26 +00:00
rubidium
6d6be50ae0
(svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files
2012-01-03 21:32:51 +00:00
alberth
4af8c2d5e1
(svn r23704) -Doc: Doxygen comment fixes and additions.
2012-01-01 17:22:32 +00:00
truebrain
77b7366c29
(svn r23622) -Add: a set of events to trigger in a GameScript
2011-12-19 20:59:36 +00:00
rubidium
3d88c74389
(svn r23526) -Codechange: unify cargos vs cargoes
2011-12-15 21:56:00 +00:00
yexo
2b1a380902
(svn r23458) -Fix: don't assume all industries that cut trees have tile 0,0
...
-Fix: wait until all tiles of an industry are completed before starting to cut trees
2011-12-09 16:12:38 +00:00
truebrain
98103121d4
(svn r23355) -Codechange: rename all AI* to Script* (Rubidium)
2011-11-29 23:15:35 +00:00
yexo
5c838ff1c3
(svn r23168) -Feature [FS#1824]: always draw fences around field tiles
2011-11-08 19:48:47 +00:00
frosch
52774235eb
(svn r23148) -Change: [NewGRF] Check the results of various callbacks for validness.
2011-11-08 17:27:13 +00:00
frosch
30874b5e81
(svn r23147) -Change: [NewGRF v8] Unify the return values of boolean callbacks, and check the results for validity.
2011-11-08 17:26:49 +00:00
frosch
b98c7763de
(svn r23146) -Change: [NewGRF v8] Make callback 22 return a probability to use instead of property 18.
2011-11-08 17:26:13 +00:00
rubidium
2a2c102b0b
(svn r23108) -Codechange: more uint -> int / byte -> int conversions for Z related variables
2011-11-04 11:52:19 +00:00
rubidium
459c9523e8
(svn r23107) -Codechange: let GetSlopePixelZ and TerraformTile tile type functions use int z as well
2011-11-04 11:36:10 +00:00
rubidium
19eabdba2c
(svn r23106) -Codechange: pass int* to GetTileSlope and friends
2011-11-04 11:30:37 +00:00
rubidium
798f5a8608
(svn r23102) -Codechange: remove the remaining pointless multiplications by TILE_HEIGHT
2011-11-04 10:31:46 +00:00
rubidium
1dc685aeea
(svn r23100) -Codechange: remove pointless multiplications by TILE_HEIGHT for the terraform code
2011-11-04 10:30:10 +00:00
rubidium
69162621d8
(svn r23096) -Codechange: remove useless divisions and multiplications by TILE_HEIGHT for the snow line code
2011-11-04 10:25:58 +00:00
rubidium
2ed0f93bfb
(svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it
2011-11-04 10:22:27 +00:00
rubidium
7757a2ed40
(svn r23091) -Codechange: rename some Get*Z functions to Get*PixelZ functions if they return the Z in pixels (like TilePixelHeight)
2011-11-04 10:18:13 +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
planetmaker
dfa45e79fe
(svn r22673) -Add #4690 : Provide random bits in var 0x10 for callback 0x3B in all cases (Hirundo)
2011-07-19 16:52:30 +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
planetmaker
e5a88a1077
(svn r22548) -Codechange: Name also the magic number for the lumber mill's tree cutting action (FeyFre)
2011-06-09 16:35:09 +00:00