From 532e5a9c00479613f971ff8ce7e5ca58d7e310df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= Date: Tue, 11 Aug 2026 09:29:57 -0300 Subject: [PATCH] HookableArea: Consistently use purple as debug color in shapes Like done for InteractArea in 064df7ff --- .../props/hookable_area/components/hookable_area.gd | 13 +++++++++++++ .../props/hookable_box/hookable_box.tscn | 2 +- .../hookable_button_item/hookable_button_item.tscn | 2 +- .../props/hookable_lever/hookable_lever.tscn | 2 +- .../props/hookable_needle/hookable_needle.tscn | 2 +- .../props/hookable_pin/hookable_pin.tscn | 2 +- scenes/game_elements/props/powerup/powerup.tscn | 4 ++-- .../stealth_components/hookable_cable.tscn | 2 +- 8 files changed, 21 insertions(+), 8 deletions(-) diff --git a/scenes/game_elements/props/hookable_area/components/hookable_area.gd b/scenes/game_elements/props/hookable_area/components/hookable_area.gd index e4360c9f65..c492a0dca9 100644 --- a/scenes/game_elements/props/hookable_area/components/hookable_area.gd +++ b/scenes/game_elements/props/hookable_area/components/hookable_area.gd @@ -36,6 +36,7 @@ signal pull_released(cancelled: bool) signal observers_changed const HOOKABLE_INDICATOR = preload("uid://dyldoadlxd7po") +const SHAPE_DEBUG_COLOR := Color(0.68, 0.28, 1.0, 0.42) ## The game entity that becomes hookable. ## [br][br] @@ -87,6 +88,12 @@ func _enter_tree() -> void: controlled_entity = get_parent() +func _notification(what: int) -> void: + match what: + NOTIFICATION_CHILD_ORDER_CHANGED when Engine.is_editor_hint(): + _recolor_shapes() + + func _ready() -> void: collision_layer = 0 collision_mask = 0 @@ -157,3 +164,9 @@ func _set_hook_control(new_hook_control: HookControl) -> void: func _on_observers_changed() -> void: _indicator.bouncing = is_being_observed + + +func _recolor_shapes() -> void: + for child: Node in get_children(): + if child is CollisionShape2D: + child.debug_color = SHAPE_DEBUG_COLOR diff --git a/scenes/game_elements/props/hookable_box/hookable_box.tscn b/scenes/game_elements/props/hookable_box/hookable_box.tscn index 01972e47a4..7e326f5ed2 100644 --- a/scenes/game_elements/props/hookable_box/hookable_box.tscn +++ b/scenes/game_elements/props/hookable_box/hookable_box.tscn @@ -60,7 +60,7 @@ metadata/_custom_type_script = "uid://dabvr3pqmyya4" [node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=68720889] position = Vector2(0, -32) shape = SubResource("RectangleShape2D_ml4a5") -debug_color = Color(0.689707, 0.288376, 1, 0.42) +debug_color = Color(0.68, 0.28, 1, 0.42) [node name="AnchorMarker" type="Marker2D" parent="HookableArea" unique_id=1758696959] position = Vector2(0, -16) diff --git a/scenes/game_elements/props/hookable_button_item/hookable_button_item.tscn b/scenes/game_elements/props/hookable_button_item/hookable_button_item.tscn index 6f9b38fdf4..1bf3e21361 100644 --- a/scenes/game_elements/props/hookable_button_item/hookable_button_item.tscn +++ b/scenes/game_elements/props/hookable_button_item/hookable_button_item.tscn @@ -76,7 +76,7 @@ weight = 0.0 [node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=1258628892] position = Vector2(0, -24) shape = SubResource("RectangleShape2D_atpgr") -debug_color = Color(0.689707, 0.288376, 1, 0.42) +debug_color = Color(0.68, 0.28, 1, 0.42) [node name="Marker2D" type="Marker2D" parent="HookableArea" unique_id=646102193] position = Vector2(0, -24) diff --git a/scenes/game_elements/props/hookable_lever/hookable_lever.tscn b/scenes/game_elements/props/hookable_lever/hookable_lever.tscn index ef02a55b0c..bebfa161ca 100644 --- a/scenes/game_elements/props/hookable_lever/hookable_lever.tscn +++ b/scenes/game_elements/props/hookable_lever/hookable_lever.tscn @@ -48,4 +48,4 @@ metadata/_custom_type_script = "uid://dabvr3pqmyya4" [node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=503665020] shape = SubResource("RectangleShape2D_h3468") -debug_color = Color(0.689707, 0.288376, 1, 0.42) +debug_color = Color(0.68, 0.28, 1, 0.42) diff --git a/scenes/game_elements/props/hookable_needle/hookable_needle.tscn b/scenes/game_elements/props/hookable_needle/hookable_needle.tscn index b9187d79ce..01dd630463 100644 --- a/scenes/game_elements/props/hookable_needle/hookable_needle.tscn +++ b/scenes/game_elements/props/hookable_needle/hookable_needle.tscn @@ -29,7 +29,7 @@ metadata/_custom_type_script = "uid://dabvr3pqmyya4" [node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=1279070361] position = Vector2(0, -28) shape = SubResource("RectangleShape2D_bfd1i") -debug_color = Color(0.689707, 0.288376, 1, 0.42) +debug_color = Color(0.68, 0.28, 1, 0.42) [node name="Marker2D" type="Marker2D" parent="HookableArea" unique_id=335701191] position = Vector2(0, -45) diff --git a/scenes/game_elements/props/hookable_pin/hookable_pin.tscn b/scenes/game_elements/props/hookable_pin/hookable_pin.tscn index f01c40dee6..b859e5d3da 100644 --- a/scenes/game_elements/props/hookable_pin/hookable_pin.tscn +++ b/scenes/game_elements/props/hookable_pin/hookable_pin.tscn @@ -26,7 +26,7 @@ anchor_point = NodePath("Marker2D") [node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=1548966519] position = Vector2(0, -28) shape = SubResource("RectangleShape2D_bfd1i") -debug_color = Color(0.689707, 0.288376, 1, 0.42) +debug_color = Color(0.68, 0.28, 1, 0.42) [node name="Marker2D" type="Marker2D" parent="HookableArea" unique_id=286043670] position = Vector2(0, -46) diff --git a/scenes/game_elements/props/powerup/powerup.tscn b/scenes/game_elements/props/powerup/powerup.tscn index c5b8c09d0b..18d306c48b 100644 --- a/scenes/game_elements/props/powerup/powerup.tscn +++ b/scenes/game_elements/props/powerup/powerup.tscn @@ -90,7 +90,7 @@ action = "Collect Repel" unique_name_in_owner = true position = Vector2(0, -33) shape = SubResource("CircleShape2D_5vrqc") -debug_color = Color(0.600391, 0.54335, 0, 0.42) +debug_color = Color(0.6, 0.545, 0, 0.42) [node name="PowerupShadow" type="Sprite2D" parent="InteractArea" unique_id=1565501906] position = Vector2(0, -34) @@ -126,7 +126,7 @@ metadata/_custom_type_script = "uid://dabvr3pqmyya4" unique_name_in_owner = true position = Vector2(0, -33) shape = SubResource("RectangleShape2D_spw1e") -debug_color = Color(0.689707, 0.288376, 1, 0.42) +debug_color = Color(0.68, 0.28, 1, 0.42) [node name="Marker2D" type="Marker2D" parent="HookableArea" unique_id=1698747164] position = Vector2(0, -33) diff --git a/scenes/quests/story_quests/after_the_tremor/2_colegiojuego/stealth_components/hookable_cable.tscn b/scenes/quests/story_quests/after_the_tremor/2_colegiojuego/stealth_components/hookable_cable.tscn index 442a70edc5..15b997c800 100644 --- a/scenes/quests/story_quests/after_the_tremor/2_colegiojuego/stealth_components/hookable_cable.tscn +++ b/scenes/quests/story_quests/after_the_tremor/2_colegiojuego/stealth_components/hookable_cable.tscn @@ -25,7 +25,7 @@ metadata/_custom_type_script = "uid://dabvr3pqmyya4" [node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=1356949742] position = Vector2(0, -28) shape = SubResource("RectangleShape2D_vrucw") -debug_color = Color(0.689707, 0.288376, 1, 0.42) +debug_color = Color(0.68, 0.28, 1, 0.42) [node name="Marker2D" type="Marker2D" parent="HookableArea" unique_id=1674666531] position = Vector2(0, -48)