Skip to content

Conversation

@wjt
Copy link
Member

@wjt wjt commented Dec 8, 2025

shjourney: Remove stray instance of directional_input_hint.gd

This scene has a TextureRect with directional_input_hint.gd attached.
Its name is InteractInput which might lead one to suspect that the
script attached used to be different. And indeed before
commit 9d03c40 and
commit 783701b the attached script was
input_key.gd which was as follows:

# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
extends TextureRect

@export var action_name: StringName

func _physics_process(_delta: float) -> void:
    if Input.is_action_pressed(action_name):
        modulate = Color.GRAY
    else:
        modulate = Color.WHITE

This relied on the scene designer setting the correct texture for the
corresponding button. The action_name property was set to "running" in the
scene.

Over the course of those two commits, this simple script morphed into the
directional_input_hint.gd script that we have today, and the action_name was
unset. As a result, when you run this scene, the following is printed on each
physics frame:

ERROR: The InputMap action "" doesn't exist.
   at: is_action_pressed (core/input/input.cpp:376)
   GDScript backtrace (most recent call first):
       [0] _physics_process (res://scenes/game_elements/props/hint/input_key/directional_input_hint.gd:77)

However, having looked through the Git commit history for the original fork, the
TextureRect node that the script is attached to has never had a texture assigned
to it; so it has never had any visible effect. Its functional purpose is to be
the parent to a Label that reads "Puerta desbloqueada" (door unlocked), which is
hidden at the start of the scene, and temporarily made visible when the player
collects the final key.

Remove the script, leaving it as a bare, invisible TextureRect. (It's referenced
by path in a script.)

This scene has a TextureRect with directional_input_hint.gd attached.
Its name is InteractInput which might lead one to suspect that the
script attached used to be different. And indeed before
commit 9d03c40 and
commit 783701b the attached script was
input_key.gd which was as follows:

    # SPDX-FileCopyrightText: The Threadbare Authors
    # SPDX-License-Identifier: MPL-2.0
    extends TextureRect

    @export var action_name: StringName

    func _physics_process(_delta: float) -> void:
        if Input.is_action_pressed(action_name):
            modulate = Color.GRAY
        else:
            modulate = Color.WHITE

This relied on the scene designer setting the correct texture for the
corresponding button. The action_name property was set to "running" in the
scene.

Over the course of those two commits, this simple script morphed into the
directional_input_hint.gd script that we have today, and the action_name was
unset. As a result, when you run this scene, the following is printed on each
physics frame:

    ERROR: The InputMap action "" doesn't exist.
       at: is_action_pressed (core/input/input.cpp:376)
       GDScript backtrace (most recent call first):
           [0] _physics_process (res://scenes/game_elements/props/hint/input_key/directional_input_hint.gd:77)

However, having looked through the Git commit history for the original fork, the
TextureRect node that the script is attached to has never had a texture assigned
to it; so it has never had any visible effect. Its functional purpose is to be
the parent to a Label that reads "Puerta desbloqueada" (door unlocked), which is
hidden at the start of the scene, and temporarily made visible when the player
collects the final key.

Remove the script, leaving it as a bare, invisible TextureRect. (It's referenced
by path in a script.)
@wjt wjt requested review from a team as code owners December 8, 2025 13:23
@wjt wjt added the StoryQuest New StoryQuests or updates to existing ones label Dec 8, 2025
@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Play this branch at https://play.threadbare.game/branches/endlessm/wjt/shjourney-remove-stray-instance-of-directional-input-hint-gd.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

StoryQuest New StoryQuests or updates to existing ones

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants