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]: There is no way to autofill signals, even with a straight section of track, in the AI API #11099

Closed
btzy opened this issue Jul 2, 2023 · 2 comments
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) enhancement Issue would be a good enhancement; we accept Pull Requests!

Comments

@btzy
Copy link
Contributor

btzy commented Jul 2, 2023

Version of OpenTTD

13.1, Win 10

Expected result

Human players can drag the signal tool over a straight section of track to place signals on the entire section (with pre-chosen spacing). They can also hold down Ctrl to place signals until the next junction.

Both humans and AIs can build a straight section of track in a single command. For AIs this is the AIRail::BuildRail command.

As building signals are almost as important as building tracks, and we already have a way to build a straight section of track in the AI API, it is expected that we should have something similar for building signals too.

Actual result

There is no such function in the AI API, so AIs need to build signals individually, despite being able to build arbitrarily-long straight sections of track in a single command.

Steps to reproduce

Look at the AIRail API reference and observe that no such function exists.

@2TallTyler 2TallTyler added enhancement Issue would be a good enhancement; we accept Pull Requests! component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) labels Jul 2, 2023
@2TallTyler
Copy link
Member

I don't think this is a bug, but a feature request. An AI can use its own algorithm to place signals on a segment of track. I'd be happy to review a PR giving AIs access to this command, but I don't think the feature request belongs in the issue tracker.

@2TallTyler 2TallTyler closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2023
@nielsmh
Copy link
Contributor

nielsmh commented Dec 25, 2023

The actual issue here might be that it's an instance where a player can perform a large-area action in a single command, while an AI would need to perform multiple commands, of which it can only perform a single command per tick.

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) enhancement Issue would be a good enhancement; we accept Pull Requests!
Projects
None yet
Development

No branches or pull requests

3 participants