-
Notifications
You must be signed in to change notification settings - Fork 119
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
Fix: Avoid globals starting with 'i/' #556
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More of me being pedantic. :)
addons/escoria-core/game/core-scripts/esc/esc_globals_manager.gd
Outdated
Show resolved
Hide resolved
@StraToN I'm confused. Wouldn't it make more sense to check in |
@dploeger That would also make sense but in this PR I wanted above all to forbid a global having 2 / characters in its name. Since inventory_add calls set_global, I intended to catch all cases there. |
Shouldn't have a global no / in the name at all? Even i/ is only a hack to work with inventory items. 🤔 |
We could indeed modify the global manager to separate globals from inventory globals instead. Technically, nothing blocks the use of / characters in globals. And I'm just thinking that could actually be useful to keep, so that gamedevs can kind of "classify" their globals. Which would advocate for a change in inventory_add instead as you mentioned. I'll change that tomorrow morning. |
Fixes godot-escoria/escoria-issues#153