mirror of https://github.com/OpenTTD/OpenTTD
Fix: [AI/GS] Consider neutral station setting when creating tile lists
parent
971201b3b7
commit
424770d662
|
@ -79,6 +79,9 @@ ScriptTileList_IndustryAccepting::ScriptTileList_IndustryAccepting(IndustryID in
|
||||||
|
|
||||||
const Industry *i = ::Industry::Get(industry_id);
|
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 */
|
/* Check if this industry accepts anything */
|
||||||
{
|
{
|
||||||
bool cargo_accepts = false;
|
bool cargo_accepts = false;
|
||||||
|
@ -116,6 +119,9 @@ ScriptTileList_IndustryProducing::ScriptTileList_IndustryProducing(IndustryID in
|
||||||
|
|
||||||
const Industry *i = ::Industry::Get(industry_id);
|
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 */
|
/* Check if this industry produces anything */
|
||||||
bool cargo_produces = false;
|
bool cargo_produces = false;
|
||||||
for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
|
for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
|
||||||
|
|
Loading…
Reference in New Issue