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

GameScript function for CmdClearArea #5313

Closed
DorpsGek opened this issue Sep 30, 2012 · 1 comment
Closed

GameScript function for CmdClearArea #5313

DorpsGek opened this issue Sep 30, 2012 · 1 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/)

Comments

@DorpsGek
Copy link
Member

xOR opened the ticket and wrote:

Right now there is only GSTile.DemolishTile(tile) which invokes the DoCommand CmdLandscapeClear. However, there is no function to invoke the DoCommand CmdClearArea, so if the GS needs to clear a bigger area it has to call GSTile.DemolishTile() lots of times from a loop, causing lots of unnecessary DoCommands.
Therefore a new function should be added, e.g. GSTile.DemolishTiles(start, end), which internally uses the CmdClearArea DoCommand to clear an area of tiles.

Reported version: 1.2.2
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5313
@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Goal/Game script labels Apr 7, 2018
@TrueBrain
Copy link
Member

This was always done deliberately. It means a GS can not do all too crazy stuff in a short time. I am a bit reluctant to add it. GS is limited in amount of commands it can execute per tick, so doing lots of commands at least slows down destructive behavior.

Please rebuttal if you disagree!

@frosch123 frosch123 added the component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) label Apr 14, 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/)
Projects
None yet
Development

No branches or pull requests

3 participants