From cb1b5795447163adfcd423eb78dcc8528f21f1e4 Mon Sep 17 00:00:00 2001 From: Gregory Marco Date: Sun, 18 Oct 2026 01:43:41 -0500 Subject: [PATCH 1/4] Block all input other than E/Space when OldComputer is up. Make it so that exiting out of OldComputer does not jump. --- player_2d.gd | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/player_2d.gd b/player_2d.gd index b23e03e..e66e32b 100644 --- a/player_2d.gd +++ b/player_2d.gd @@ -119,8 +119,10 @@ func _process(delta: float) -> void: if Input.is_action_just_released("restart") or (Input.is_action_pressed("controller_restart_left") and Input.is_action_pressed("controller_restart_right")): get_tree().reload_current_scene() - if Input.is_action_just_released("interact"): - %OldComputer.close() + if %OldComputer.visible: + if Input.is_action_just_released("interact") or Input.is_action_just_released("jump"): + %OldComputer.close() + return if Input.is_action_just_pressed("jump"): %OldComputer.close() @@ -140,9 +142,6 @@ func _process(delta: float) -> void: #velocity.y = 0 #velocity.x = 0 - if %OldComputer.visible: - return - var direction = Input.get_axis("move_left","move_right") if direction < 0: From f061e1905f8e5d17e47a49ef12e18a12a0b7f950 Mon Sep 17 00:00:00 2001 From: Gregory Marco Date: Sun, 18 Oct 2026 01:52:22 -0500 Subject: [PATCH 2/4] Remove hello world dialogue demonstration. --- player_2d.gd | 1 - 1 file changed, 1 deletion(-) diff --git a/player_2d.gd b/player_2d.gd index e66e32b..3c93e8b 100644 --- a/player_2d.gd +++ b/player_2d.gd @@ -26,7 +26,6 @@ func _ready() -> void: spawn_point = position DisplayServer.window_set_title("JUMPS EQUALS JUMPS") give_objective("sarc", 0, "Open the Sarcophagus") - %Dialogue.show_text("Hello world!").dismiss_after(2) func refresh_dash(new_dashes): if new_dashes: From 93baf56fd5a203ca57f123a23d69e8b1ffd00ff7 Mon Sep 17 00:00:00 2001 From: Gregory Marco Date: Sun, 18 Oct 2026 02:05:51 -0500 Subject: [PATCH 3/4] Move interactable input handling into Player2D so we can selectively block it from working if OldComputer is open We probably could have special-cased that check in Interactable now that I think about it --- interactable.gd | 16 ++++++++++------ pharaoh.gd | 2 +- player_2d.gd | 4 ++++ player_2d.tscn | 4 ++-- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/interactable.gd b/interactable.gd index d2d729a..2668cce 100644 --- a/interactable.gd +++ b/interactable.gd @@ -7,7 +7,7 @@ var checked_teleport var telecam_speed_mult = 4 var enabled = true var cooldown = 2 -var is_interactable = false +var _is_interactable = false func disable(): enabled = false @@ -17,10 +17,12 @@ func enable(): enabled = true $Sprite2D.modulate = Color.WHITE -func _process(delta: float) -> void: - if not (is_interactable and Input.is_action_just_released("interact")): - return +func is_interactable() -> bool: + return _is_interactable +func interact() -> void: + if not is_interactable(): + return interacted.emit() func _physics_process(delta: float) -> void: @@ -29,11 +31,13 @@ func _physics_process(delta: float) -> void: func _on_approach(body) -> void: if body!=%Player2D: return - is_interactable = true + _is_interactable = true + self.add_to_group("nearby_interactables") $Sprite2D/ButtonPrompt.show() func _on_abandon(body) -> void: if body!=%Player2D: return - is_interactable = false + _is_interactable = false + self.remove_from_group("nearby_interactables") $Sprite2D/ButtonPrompt.hide() diff --git a/pharaoh.gd b/pharaoh.gd index c3d369a..dd5aca6 100644 --- a/pharaoh.gd +++ b/pharaoh.gd @@ -1,7 +1,7 @@ extends Interactable func _on_interacted() -> void: - #%OldComputer.open() + %OldComputer.open() #Accomodate some collision antics. var new_spawn_point = global_position + Vector2(0,-10) diff --git a/player_2d.gd b/player_2d.gd index 3c93e8b..ab5ded5 100644 --- a/player_2d.gd +++ b/player_2d.gd @@ -123,6 +123,10 @@ func _process(delta: float) -> void: %OldComputer.close() return + if Input.is_action_just_released("interact"): + for interactable in get_tree().get_nodes_in_group("nearby_interactables"): + interactable.interact() + if Input.is_action_just_pressed("jump"): %OldComputer.close() diff --git a/player_2d.tscn b/player_2d.tscn index a1ca4c2..054e43d 100644 --- a/player_2d.tscn +++ b/player_2d.tscn @@ -11,10 +11,10 @@ [ext_resource type="Texture2D" uid="uid://dyxbitw8hbd3s" path="res://art/player/crouch/frame2.png" id="7_lu0ka"] [ext_resource type="Texture2D" uid="uid://bfyd1tro3s0gl" path="res://art/player/crystal2.png" id="7_oy4pt"] [ext_resource type="Texture2D" uid="uid://dh7a1knyqn5nd" path="res://art/player/running/frame3.png" id="7_pmt5n"] -[ext_resource type="Texture2D" uid="uid://lk0f1qyswyxv" path="res://art/player/running/frame1.png" id="8_3prq1"] +[ext_resource type="Texture2D" uid="uid://lk0f1qyswyxv" path="res://art/player/idle/frame1.png" id="8_3prq1"] [ext_resource type="Texture2D" uid="uid://yf13nw31k8ua" path="res://art/player/running/frame4.png" id="8_nj6as"] [ext_resource type="Texture2D" uid="uid://du5i0tg6u1lal" path="res://art/player/crystal3.png" id="8_ukfft"] -[ext_resource type="Texture2D" uid="uid://lmje8plw76e1" path="res://art/player/running/frame2.png" id="9_lu0ka"] +[ext_resource type="Texture2D" uid="uid://lmje8plw76e1" path="res://art/player/idle/frame2.png" id="9_lu0ka"] [ext_resource type="Texture2D" uid="uid://bko8dvawpul3c" path="res://art/player/crystal4.png" id="9_ur4nw"] [ext_resource type="Texture2D" uid="uid://m5djssna67e1" path="res://art/player/crouch/frame3.png" id="9_w0gjo"] [ext_resource type="Texture2D" uid="uid://ba4kjeulthw1g" path="res://art/hats/dunce1.png" id="10_5s8kx"] From 9ba305b6a1225779364f361c7d178959e63e769b Mon Sep 17 00:00:00 2001 From: Gregory Marco Date: Sun, 18 Oct 2026 02:08:56 -0500 Subject: [PATCH 4/4] Hide dialogue box by default --- Dialogue.tscn | 1 + 1 file changed, 1 insertion(+) diff --git a/Dialogue.tscn b/Dialogue.tscn index 46fabd0..a084c6b 100644 --- a/Dialogue.tscn +++ b/Dialogue.tscn @@ -3,6 +3,7 @@ [ext_resource type="Script" uid="uid://byj4ibepgm6oa" path="res://dialogue.gd" id="1_tgtc2"] [node name="Dialogue" type="Control" unique_id=1025022375] +visible = false layout_mode = 3 anchors_preset = 15 anchor_right = 1.0