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

VehicleIsInDepot() #1346

Closed
DorpsGek opened this issue Oct 17, 2007 · 5 comments
Closed

VehicleIsInDepot() #1346

DorpsGek opened this issue Oct 17, 2007 · 5 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

dihedral opened the ticket and wrote:

adds VehicleIsInDepot(vehicle_id) to the ai api.
including all the regression.nut calles to test :-)

ah - against r11286

Attachments

Reported version: trunk
Operating system: Linux


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

TrueBrain wrote:

Please correct the spaces. The first char is a tab, not 4 spaces. See diff in browser. Also, space error in:

return (::GetVehicle(vehicle_id)-> IsStoppedInDepot());

And the () are useless. If you can correct this, it is ready for commit.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1346#comment2448

@DorpsGek
Copy link
Member Author

dihedral wrote:

try that :)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1346#comment2449

@DorpsGek
Copy link
Member Author

TrueBrain wrote:

k, now it is codewise okay, but some other comments (sorry, it is late, I missed them earlier :)):

VehicleIsInDepot <- the name doesn't tell it is also stopped. Maybe add two functions, that would be best :)

Second, the comment-block is not like other comment blocks. First, we use capitals at the start of a sentence, and a dot at the end. Second, the param comment at vehicle_id is a bit fuzzy. Please check other functions for some ideas :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/1346#comment2450

@DorpsGek
Copy link
Member Author

dihedral wrote:

changes:
* @param comment as found on line 36 and 43
* dot at end of line in comments ;-)
* shorter function names, AIVehicle::VehicleIsInDepot() makes as much sense as AIVehicle::IsInDepot() :-)
* added AIVehicle::IsStoppedInDepot()
* regression.nut includes calles to AIVehicle::IsStoppedInDepot()

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1346#comment2451

@DorpsGek
Copy link
Member Author

TrueBrain closed the ticket.

Reason for closing: Implemented

Added in r11289


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

@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 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