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

Startup ticks don't allow multiple DoCommands #6712

Closed
TrueBrain opened this issue Apr 14, 2018 · 3 comments
Closed

Startup ticks don't allow multiple DoCommands #6712

TrueBrain opened this issue Apr 14, 2018 · 3 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! flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers

Comments

@TrueBrain
Copy link
Member

TrueBrain commented Apr 14, 2018

Part of issue #5304, but deserving his own ticket:

Yexo wrote:

When generating a new game a GameScript should have 2500 ticks to initialize everything it wants as long as it doesn't call Sleep(). However this is currently broken since not only a sleep but also any DoCommand will stop the initialization and start the game. These 2500 ticks could be increased easily, it then doesn't take any time at all to call SetCargoGoal on all towns. I've discussed this with frosch and we both think this is a better solution than introducing a function that works on all towns since such a function would be pretty limited.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5304#comment11519
@TrueBrain TrueBrain added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Goal/Game script enhancement Issue would be a good enhancement; we accept Pull Requests! labels Apr 14, 2018
@frosch123 frosch123 added component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) and removed Goal/Game script labels Apr 14, 2018
@stale
Copy link

stale bot commented Jan 24, 2019

This issue has been automatically marked as stale because it has not had any activity in the last two months.
If you believe the issue is still relevant, please test on the latest nightly and report back.
It will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@stale stale bot added the stale Stale issues label Jan 24, 2019
@LordAro
Copy link
Member

LordAro commented Jan 24, 2019

Still relevant, and should be a relatively simple change, if I understand the issue correctly

@stale stale bot removed the stale Stale issues label Jan 24, 2019
@LordAro LordAro added the good first issue Good for newcomers label Jan 24, 2019
@TrueBrain TrueBrain removed the pinned label Jan 3, 2021
@TrueBrain
Copy link
Member Author

Mostly solved with the introduction of GSAsyncMode. In this mode, you can queue commands and will not be scheduled out. It is not exactly what was asked for, but most likely the best we can do within the current constraints of the system.

Given in 4 years nobody mentioned this as an issue anymore, and given we now have something that kinda solves it, going to close this bug as solved.

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! flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants