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

chore: use Signal.emit instead of emit_signal to avoid UNUSED_SIGNAL warning #41

Merged

Conversation

akien-mga
Copy link
Contributor

Alternatively, the UNUSED_SIGNAL warning could be fully disabled.

Upstream bug report: godotengine/godot#89632

@akien-mga
Copy link
Contributor Author

akien-mga commented Sep 5, 2024

Actually this shouldn't be needed once godotengine/godot#89675 is merged and cherry-picked.

Another alternative would be the use Signal.emit instead of emit_signal. I'll update the PR to do that.

Edit: I was wrong, 89675 / changing one of the call to emit fixes one occurrence of the warning, but the second occurrence actually rightfully exposes a bug: the foot_step signal never seems to be emitted. And indeed I checked with some prints and play_foot_step_sound is never called during gameplay.

$ rg foot_step
Player/CharacterSkin.gd
4:signal foot_step

Player/Player.gd
235:func play_foot_step_sound() -> void:

Player/Player.tscn
270:[connection signal="foot_step" from="CharacterRotationRoot/CharacterSkin" to="." method="play_foot_step_sound"]

Opened a dedicated bug report for that: #42.

@akien-mga akien-mga force-pushed the silence-unused-signal-warnings branch from bddb321 to 757b54e Compare September 5, 2024 17:12
@akien-mga akien-mga changed the title chore: silence incorrect UNUSED_SIGNAL warnings chore: use Signal.emit instead of emit_signal to avoid UNUSED_SIGNAL warning Sep 5, 2024
@akien-mga akien-mga force-pushed the silence-unused-signal-warnings branch from 757b54e to 06640ed Compare September 5, 2024 17:13
@akien-mga akien-mga changed the title chore: use Signal.emit instead of emit_signal to avoid UNUSED_SIGNAL warning chore: use Signal.emit instead of emit_signal to avoid UNUSED_SIGNAL warning Sep 5, 2024
@NathanLovato NathanLovato merged commit a1da802 into gdquest-demos:main Sep 6, 2024
@NathanLovato
Copy link
Contributor

Thanks!

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 this pull request may close these issues.

2 participants