Add the old computer screen popup.

This commit is contained in:
yagigreg committed 2026-10-17 20:56:59 -05:00
1 parent fef374fe95
commit 81322e787a
8 files changed
+131 -4

No files matched your search

+49
View File
@@ -0,0 +1,49 @@
[gd_scene format=3 uid="uid://bcu7ftukipiyy"]
[ext_resource type="Script" uid="uid://d0lvnnd3mqfxh" path="res://old_computer.gd" id="1_6jyhx"]
[ext_resource type="Texture2D" uid="uid://brppyauh1xyif" path="res://art/computer/background.png" id="2_2wyuv"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2wyuv"]
bg_color = Color(0.28627452, 0.25490198, 0.22745098, 1)
[node name="OldComputer" type="CanvasLayer" unique_id=1944134941]
script = ExtResource("1_6jyhx")
[node name="BackgroundPanel" type="Panel" parent="." unique_id=1876350245]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="ForegroundPanel" type="Panel" parent="BackgroundPanel" unique_id=1797726425]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_2wyuv")
[node name="ScreenPanel" type="Panel" parent="BackgroundPanel/ForegroundPanel" unique_id=528166777]
layout_mode = 0
offset_left = 82.0
offset_top = 42.0
offset_right = 122.81183
offset_bottom = 85.64739
scale = Vector2(27.099607, 14.530945)
[node name="Sprite2D" type="Sprite2D" parent="BackgroundPanel" unique_id=856709145]
position = Vector2(618, 349)
texture = ExtResource("2_2wyuv")
[node name="ConsoleText" type="RichTextLabel" parent="." unique_id=715961645]
offset_left = 150.0
offset_top = 105.0
offset_right = 1102.0
offset_bottom = 652.0
text = ">> Pharaoh OS 2000 Boot Sequence
>> WARN: Detected anomalies!
>> WARN: Memory integrity at %d%%!
>> User: Please load backup data disk (1 of 4)
>> Player: Press interact [E] or jump [Space] to exit."
Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

+43
View File
@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://brppyauh1xyif"
path="res://.godot/imported/background.png-26b98ec3cc5bed410faa484fde97db25.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/computer/background.png"
dest_files=["res://.godot/imported/background.png-26b98ec3cc5bed410faa484fde97db25.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/high_quality_mode=0
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
mipmaps/preserve_alpha_test_coverage=false
mipmaps/alpha_test_threshold=0.5
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
+15
View File
@@ -0,0 +1,15 @@
extends CanvasLayer
func _ready() -> void:
$ConsoleText.text = $ConsoleText.text % %Pharaoh.get_memory_integrity()
open()
func open() -> void:
visible = true
func printline(line: String) -> void:
open()
$ConsoleText.text += "\n" + line
func close() -> void:
visible = false
+1
View File
@@ -0,0 +1 @@
uid://d0lvnnd3mqfxh
+10 -3
View File
@@ -3,8 +3,8 @@ extends Interactable
var disks_wanted = [1, 2, 3, 4] var disks_wanted = [1, 2, 3, 4]
var disks_loaded = [] var disks_loaded = []
func _ready() -> void: var starting_integrity = 2
pass # Replace with function body. var total_integrity = starting_integrity + len(disks_wanted)
func load_disk(disk_num: int) -> bool: func load_disk(disk_num: int) -> bool:
if !disk_num or (disk_num in disks_loaded): if !disk_num or (disk_num in disks_loaded):
@@ -14,6 +14,9 @@ func load_disk(disk_num: int) -> bool:
disks_wanted.remove_at(disks_wanted.find(disk_num)) disks_wanted.remove_at(disks_wanted.find(disk_num))
return true return true
func get_memory_integrity():
return 100.0 / total_integrity * (starting_integrity + len(disks_loaded))
func _on_interacted() -> void: func _on_interacted() -> void:
var wanted_disk = disks_wanted.front() var wanted_disk = disks_wanted.front()
if not %Player2D.take_disk(wanted_disk): if not %Player2D.take_disk(wanted_disk):
@@ -24,9 +27,13 @@ func _on_interacted() -> void:
%Player2D.complete_objective("disk%d" % wanted_disk) %Player2D.complete_objective("disk%d" % wanted_disk)
print("Loaded up disk ", wanted_disk) print("Loaded up disk ", wanted_disk)
%OldComputer.printline(
">> Loaded data disk %d (of %d). Memory integrity now at %d%%" %
[wanted_disk, len(disks_wanted) + len(disks_loaded), get_memory_integrity()]
)
wanted_disk = disks_wanted.front() wanted_disk = disks_wanted.front()
if wanted_disk and %Player2D.has_disk(wanted_disk): if (not wanted_disk) or %Player2D.has_disk(wanted_disk):
return return
%Player2D.give_objective("disk%d" % wanted_disk, "Locate data disk %d" % wanted_disk) %Player2D.give_objective("disk%d" % wanted_disk, "Locate data disk %d" % wanted_disk)
+9 -1
View File
@@ -99,7 +99,12 @@ 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")): 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() get_tree().reload_current_scene()
if Input.is_action_just_released("interact"):
%OldComputer.close()
if Input.is_action_just_pressed("jump"): if Input.is_action_just_pressed("jump"):
%OldComputer.close()
if is_on_floor(): if is_on_floor():
velocity.y = JUMP_VELOCITY velocity.y = JUMP_VELOCITY
elif !is_on_floor() and jumps >= 1: elif !is_on_floor() and jumps >= 1:
@@ -114,7 +119,10 @@ func _process(delta: float) -> void:
print("WALL HANGING") print("WALL HANGING")
#velocity.y = 0 #velocity.y = 0
#velocity.x = 0 #velocity.x = 0
if %OldComputer.visible:
return
var direction = Input.get_axis("move_left","move_right") var direction = Input.get_axis("move_left","move_right")
if direction < 0: if direction < 0:
+4
View File
@@ -18,6 +18,7 @@
[ext_resource type="Script" uid="uid://d3rx82psovcpp" path="res://music_button.gd" id="14_70uel"] [ext_resource type="Script" uid="uid://d3rx82psovcpp" path="res://music_button.gd" id="14_70uel"]
[ext_resource type="Script" uid="uid://oyyhhy1gemg0" path="res://objectives_label.gd" id="14_ikiii"] [ext_resource type="Script" uid="uid://oyyhhy1gemg0" path="res://objectives_label.gd" id="14_ikiii"]
[ext_resource type="PackedScene" uid="uid://dr8h8xij3qw2h" path="res://pharaoh.tscn" id="15_hiqwa"] [ext_resource type="PackedScene" uid="uid://dr8h8xij3qw2h" path="res://pharaoh.tscn" id="15_hiqwa"]
[ext_resource type="PackedScene" uid="uid://bcu7ftukipiyy" path="res://OldComputer.tscn" id="19_cbp6q"]
[node name="World" type="Node2D" unique_id=1327991900] [node name="World" type="Node2D" unique_id=1327991900]
process_mode = 1 process_mode = 1
@@ -359,4 +360,7 @@ script = ExtResource("14_70uel")
unique_name_in_owner = true unique_name_in_owner = true
position = Vector2(192, 185.11545) position = Vector2(192, 185.11545)
[node name="OldComputer" parent="." unique_id=1951254108 instance=ExtResource("19_cbp6q")]
unique_name_in_owner = true
[connection signal="toggled" from="CanvasLayer/MusicButton" to="CanvasLayer/MusicButton" method="_on_toggled"] [connection signal="toggled" from="CanvasLayer/MusicButton" to="CanvasLayer/MusicButton" method="_on_toggled"]