Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in GSIndustryType.IsProcessingIndustry()? #5836

Closed
DorpsGek opened this issue Dec 23, 2013 · 4 comments
Closed

Bug in GSIndustryType.IsProcessingIndustry()? #5836

DorpsGek opened this issue Dec 23, 2013 · 4 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

R2dical opened the ticket and wrote:

It seems an issue crept in sometime recently with the GSIndustryType.IsProcessingIndustry() function, as it provides a "false" positive for industries it explicitly shouldn't, like Bank, Power Station and Water Tower. At least it is in my WIP version 3 GS, as this code will illustrate:

local ind_list = GSIndustryTypeList();
foreach(ind, _ in ind_list) {
if(GSIndustryType.IsProcessingIndustry(ind))
GSLog.Info("Processor: " + GSIndustryType.GetName(ind));
}

Reported version: trunk
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/5836
@DorpsGek
Copy link
Member Author

Rubidium wrote:

http://nogo.openttd.org/api/trunk/classGSIndustryType.html# d971f5ac44938c5eacdcef5ed11993d0

The note says that it doesn't include, amongst others, the power plants.

http://newgrf-specs.tt-wiki.net/wiki/Action0/Industries# Industry_production_type_.280B.29 shows the "types" there are; the first second and third are "raw", the fourth is "processing", and the first is neither.

http://newgrf-specs.tt-wiki.net/wiki/IndustryDefaultProps# Climate_independent_properties shows the above type in the "0B" column; if it is 04, it is a "processing" industry. The bank, power station and water tower all have type 0 and are therefor not "processing".

The documentation might not be entirely clear on the subject, but it isn't a bug in the code.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5836#comment12842

@DorpsGek
Copy link
Member Author

R2dical wrote:

Ahh, apologies, your reference to newgrf made me try without opengfx+ industries and with default it works fine.

So maybe its a "bug" with opengfx+ specifying 04 for Action0B and not 00.

Sorry should have tried that first before thinking NoGO/NoAI, thanks for taking a look.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5836#comment12843

@DorpsGek
Copy link
Member Author

frosch wrote:

I believe OpenGfx+Industries allows water towers and such to close. That's why they might be classified as processing industries.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5836#comment12956

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Not a bug

Caused by NewGRF. Intentional or not.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5836

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant