Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Inconsistency]: No 'remove table' function for GSLeagueTable, unlike GSStoryPage and GSGoal #11097

Closed
James103 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! good first issue Good for newcomers

Comments

@James103
Copy link
Contributor

James103 commented Jul 2, 2023

Version of OpenTTD

Since #10001

Expected result

There should be a function GSLeagueTable.Remove(table_id) which takes in the ID of a custom League Table and removes that table if it exists.

Use case: A cleanup script should also be able to remove league tables, along with goals and story pages, allowing for a clean slate when swapping or removing game scripts.

Actual result

No such function or command exists; league tables are permanent once created.

This may have been overlooked during the review phase of #10001 before the PR was merged.

Steps to reproduce

Try to remove a League Table using GS, only to notice there's no such function.

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

@ldpl Are you willing to fix this and #11098 before we release 14.0? (So sometime in the next few months)

@ldpl
Copy link
Contributor

ldpl commented Dec 24, 2023

Maybe. I didn't initially include these functions since I didn't know the use case for them. But I guess they're so straightforward, there aren't multiple ways of doing them anyway.

@TrueBrain TrueBrain added the good first issue Good for newcomers label Jan 7, 2024
@OpenTTD OpenTTD locked and limited conversation to collaborators Jan 7, 2024
@TrueBrain TrueBrain converted this issue into discussion #11702 Jan 7, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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! good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants