From 0f998f94b6369dd49366efce37d624dbfd39f74f Mon Sep 17 00:00:00 2001 From: Gregory Marco Date: Sat, 17 Oct 2026 22:26:36 -0500 Subject: [PATCH 1/3] Track priority of quest objectives (i.e. "find disk 2" has higher priority than "install disk 4") --- disk.gd | 2 +- objectives_label.gd | 4 ++-- pharaoh.gd | 2 +- player_2d.gd | 20 ++++++++++++++++---- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/disk.gd b/disk.gd index 8b9c616..584a618 100644 --- a/disk.gd +++ b/disk.gd @@ -7,5 +7,5 @@ func _ready() -> void: func _on_picked_up() -> void: %Player2D.give_disk(disk_num) - %Player2D.give_objective("disk%d" % disk_num, "Install data disk %d" % disk_num) + %Player2D.give_objective("disk%d" % disk_num, disk_num, "Install data disk %d" % disk_num) print("Picked up disk ", disk_num) diff --git a/objectives_label.gd b/objectives_label.gd index c766a16..430c947 100644 --- a/objectives_label.gd +++ b/objectives_label.gd @@ -3,6 +3,6 @@ extends RichTextLabel # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: var new_text = "OBJECTIVES:\n" - for objective in %Player2D.objectives: - new_text = new_text + %Player2D.objectives[objective] + "\n" + for objective in %Player2D.get_current_objectives(): + new_text = new_text + objective + "\n" text = new_text diff --git a/pharaoh.gd b/pharaoh.gd index 274967a..2f7418c 100644 --- a/pharaoh.gd +++ b/pharaoh.gd @@ -36,4 +36,4 @@ func _on_interacted() -> void: if (not wanted_disk) or %Player2D.has_disk(wanted_disk): return - %Player2D.give_objective("disk%d" % wanted_disk, "Locate data disk %d" % wanted_disk) + %Player2D.give_objective("disk%d" % wanted_disk, wanted_disk, "Locate data disk %d" % wanted_disk) diff --git a/player_2d.gd b/player_2d.gd index 66a4438..6f11c18 100644 --- a/player_2d.gd +++ b/player_2d.gd @@ -52,14 +52,26 @@ func take_disk(disk_num) -> bool: func has_disk(disk_num: int) -> bool: return disk_num in data_disks -func give_objective(id: String, description: String) -> void: - objectives[id] = description +func give_objective(id: String, priority: int, description: String) -> void: + objectives[id] = { + "priority": priority, + "description": description, + "completed": false + } func has_objective(id: String) -> bool: - return objectives.has(id) + return objectives.has(id) and not objectives[id].completed + +func get_current_objectives() -> Array[String]: + var current_objectives = objectives.values() + current_objectives.sort_custom(func(a, b): return a.priority < b.priority) + return current_objectives.filter(func(objective): return not objective.completed).map(func(objective): return objective.description) func complete_objective(id: String) -> bool: - return objectives.erase(id) + if not has_objective(id): + return false + objectives[id].completed = true + return true func on_teleport(): refresh_jump(1) From a5f45800bafe3863c3a1473c4010a25f6e2f4823 Mon Sep 17 00:00:00 2001 From: Gregory Marco Date: Sat, 17 Oct 2026 22:42:00 -0500 Subject: [PATCH 2/3] If player does not have the disk 1 objective and the pharaoh wants disk 1 then give the player the objective. --- pharaoh.gd | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pharaoh.gd b/pharaoh.gd index 2f7418c..a09fc01 100644 --- a/pharaoh.gd +++ b/pharaoh.gd @@ -18,8 +18,16 @@ func get_memory_integrity(): return 100.0 / total_integrity * (starting_integrity + len(disks_loaded)) func _on_interacted() -> void: + #%OldComputer.open() + var wanted_disk = disks_wanted.front() if not %Player2D.take_disk(wanted_disk): + if wanted_disk == 1 and not %Player2D.has_objective("disk%d" % wanted_disk): + %OldComputer.open() + %Player2D.give_objective( + "disk%d" % wanted_disk, + wanted_disk, "Locate data disk %d" % wanted_disk + ) return if not load_disk(wanted_disk): From fb5fb19df18dd661f14f169078cfbc6f3be1ee2b Mon Sep 17 00:00:00 2001 From: Gregory Marco Date: Sat, 17 Oct 2026 22:44:01 -0500 Subject: [PATCH 3/3] Don't show the OC at startup, since it now comes after the intro comic + tutorial level. --- OldComputer.tscn | 1 + old_computer.gd | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/OldComputer.tscn b/OldComputer.tscn index e8d6cbe..7cf4d16 100644 --- a/OldComputer.tscn +++ b/OldComputer.tscn @@ -7,6 +7,7 @@ bg_color = Color(0.28627452, 0.25490198, 0.22745098, 1) [node name="OldComputer" type="CanvasLayer" unique_id=1944134941] +visible = false script = ExtResource("1_6jyhx") [node name="BackgroundPanel" type="Panel" parent="." unique_id=1876350245] diff --git a/old_computer.gd b/old_computer.gd index 1bb19de..0caef5b 100644 --- a/old_computer.gd +++ b/old_computer.gd @@ -2,7 +2,6 @@ extends CanvasLayer func _ready() -> void: $ConsoleText.text = $ConsoleText.text % %Pharaoh.get_memory_integrity() - open() func open() -> void: visible = true