Skip to content

HookableArea: Use it only as a node#2094

Merged
wjt merged 4 commits intomainfrom
more-grapple
Apr 2, 2026
Merged

HookableArea: Use it only as a node#2094
wjt merged 4 commits intomainfrom
more-grapple

Conversation

@manuq
Copy link
Copy Markdown
Collaborator

@manuq manuq commented Apr 1, 2026

PlayerHook: Split to its own scene

So it is a reusable component. In the future, a different player than
the StoryWeaver with a grappling hook could be built by composition.

Same as the recent change done for PlayerRepel.


after_the_tremor: Improve hookable cables

Make it a component scene, that uses HookableArea as node (not as instance).
Instantiate hookable_cable in the level instead of duplicating nodes.

Use AllHooked signals to avoid extending the logic, and remove the
all_hooked_1.gd script.

This also prepares the StoryQuest for the next commit.


HookableArea: Use it only as a node

Automatically set the area to the corresponding collision layer in the script.
Remove the warning because now is not needed. And remove the scene, using the
script as a node directly instead.

Like it was done recently for InteractArea and Teleporter.

Adapt the hookable_needle scene that was using the HookableArea as scene to use
it as node.

@manuq manuq requested review from a team as code owners April 1, 2026 21:08
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Play this branch at https://play.threadbare.game/branches/endlessm/more-grapple/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

Comment on lines +28 to +30
if not sprite_2d:
prints("TODO")
return
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be new in this branch.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha! I had to add this conditional while modifying the level to keep it working. The TODO note was for myself. Good catch! Removing it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing this I realize that mouse input should be disabled in the Input HUD. Otherwise the cables below can't be hooked by grappling:

image

I'll fix that in a separate PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

manuq added 4 commits April 2, 2026 10:47
So it is a reusable component. In the future, a different player than
the StoryWeaver with a grappling hook could be built by composition.

Same as the recent change done for PlayerRepel.
Make it a component scene, that uses HookableArea as node (not as instance).
Instantiate hookable_cable in the level instead of duplicating nodes.

Use AllHooked signals to avoid extending the logic, and remove the
all_hooked_1.gd script.

This also prepares the StoryQuest for the next commit.
Automatically set the area to the corresponding collision layer in the script.
Remove the warning because now is not needed. And remove the scene, using the
script as a node directly instead.

Like it was done recently for InteractArea and Teleporter.

Adapt the hookable_needle scene that was using the HookableArea as scene to use
it as node.
@wjt wjt merged commit 227de58 into main Apr 2, 2026
6 checks passed
@wjt wjt deleted the more-grapple branch April 2, 2026 14:27
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