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

NoAI economy patch for build 12167 #1779

Closed
DorpsGek opened this issue Feb 17, 2008 · 2 comments
Closed

NoAI economy patch for build 12167 #1779

DorpsGek opened this issue Feb 17, 2008 · 2 comments
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

Morloth opened the ticket and wrote:

I noticed a lot of functions (virtually all) should be static while they're not. For example, there is no reason why 'IndustryID GetMaxIndustryID ()' should be non-static. I haven't updated all functions (will do that in another patch), but I added a new function to AITile:

static IndustryID GetIndustry(TileIndex tile);

This function returns the industry (if any) is located at the given tile.

Also the following functions have been changed:
AITile.GetCargoAcceptance
AITile.GetCargoProduction

The prior functions only gave some numbers, GetCargoAcceptence said if the returning value is below 8, the cargo is not accepted; Higher is better. I changed these functions so they simply give true or false back as values. It'd be better of course if the function would return the actual production on a tile. But we'll leave that for the next version :).

Note: The last 2 changes might break existing AI implementations!

- Bram

Reported version: trunk
Operating system: All


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

Morloth wrote:

The actual patch!


This comment was imported from FlySpray: https://bugs.openttd.org/task/1779#comment3510

@DorpsGek
Copy link
Member Author

SmatZ closed the ticket.

Reason for closing: Duplicate

Of #1783


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

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay duplicate component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant