Changeset - r24124:0cf0215963dd
[Not reviewed]
master
0 1 0
SamuXarick - 4 years ago 2020-03-03 20:46:54
43006711+SamuXarick@users.noreply.github.com
Fix: [AI/GS] Consider neutral station setting when creating tile lists
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_tilelist.cpp
Show inline comments
 
@@ -79,6 +79,9 @@ ScriptTileList_IndustryAccepting::Script
 

	
 
	const Industry *i = ::Industry::Get(industry_id);
 

	
 
	/* Check if this industry is only served by its neutral station */
 
	if (i->neutral_station != nullptr && !_settings_game.station.serve_neutral_industries) return;
 

	
 
	/* Check if this industry accepts anything */
 
	{
 
		bool cargo_accepts = false;
 
@@ -116,6 +119,9 @@ ScriptTileList_IndustryProducing::Script
 

	
 
	const Industry *i = ::Industry::Get(industry_id);
 

	
 
	/* Check if this industry is only served by its neutral station */
 
	if (i->neutral_station != nullptr && !_settings_game.station.serve_neutral_industries) return;
 

	
 
	/* Check if this industry produces anything */
 
	bool cargo_produces = false;
 
	for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
0 comments (0 inline, 0 general)