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

inheriting ActionIcon breaks _base_path #12

Closed
Pheubel opened this issue Oct 21, 2024 · 3 comments · Fixed by #13
Closed

inheriting ActionIcon breaks _base_path #12

Pheubel opened this issue Oct 21, 2024 · 3 comments · Fixed by #13

Comments

@Pheubel
Copy link
Contributor

Pheubel commented Oct 21, 2024

godot version 4.3

Whenever you create a script that inherits from the ActionIcon script, it can cause _base_path to be set to the wrong value and whenever the icon get's changed, it will no longer point to the right directory.

Possible Solution

instead of making _base_path a static variable that you set inside of the _init() function, couldn't it be set as a constant instead? since the script already relies on being a in a specific path (the icon for the script has a fully defined path). Trying this locally seems to work just fine

@KoBeWi
Copy link
Owner

KoBeWi commented Oct 21, 2024

tbh I don't remember why I made it static variable. It allows to move the addon (except the icon, but it's not important), however it's not very useful 🤔

@Pheubel
Copy link
Contributor Author

Pheubel commented Oct 24, 2024

the changes needed to make it work shouldn't be that bad, and i could make a PR for it if it should be made const instead.

@KoBeWi
Copy link
Owner

KoBeWi commented Oct 24, 2024

Yeah feel free to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants