Dynamically adjust E/Space hint in Old Computer depending on input mode.

This commit is contained in:
yagigreg committed 2026-10-18 15:00:43 -05:00
1 parent 3ebe7d57f9
commit 741600b2ce
2 files changed
+17 -4

No files matched your search

+1 -1
View File
@@ -101,6 +101,6 @@ text = "[center]>> PharaOS 2000 Boot Sequence
>> [color=red]WARN[/color]: Detected anomalies! >> [color=red]WARN[/color]: Detected anomalies!
>> [color=red]WARN[/color]: Memory integrity at [color=red]%d%%[/color]! >> [color=red]WARN[/color]: Memory integrity at [color=red]%d%%[/color]!
>> [color=green]User[/color]: Please load backup data disk ([color=green]1 of 4[/color]) >> [color=green]User[/color]: Please load backup data disk ([color=green]1 of 4[/color])
>> [color=#4278ff]Player[/color]: Press [color=#4278ff]interact [E][/color] or [color=#4278ff]jump [Space][/color] to exit." >> [color=#4278ff]Player[/color]: Press [color=#4278ff]interact [{INTERACT}][/color] or [color=#4278ff]jump [{JUMP}][/color] to exit."
fit_content = true fit_content = true
vertical_alignment = 1 vertical_alignment = 1
+16 -3
View File
@@ -6,8 +6,10 @@ var disks_loaded = []
var starting_integrity = 2 var starting_integrity = 2
var total_integrity = starting_integrity + len(disks_wanted) var total_integrity = starting_integrity + len(disks_wanted)
var base_text: String = ""
func _ready() -> void: func _ready() -> void:
$ConsoleText.text = $ConsoleText.text % get_memory_integrity() base_text = $ConsoleText.text % get_memory_integrity()
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):
@@ -34,7 +36,7 @@ func load_disk(disk_num: int) -> bool:
">> [color=green]System initialization complete[/color]. Beginning reactivation sequence." ">> [color=green]System initialization complete[/color]. Beginning reactivation sequence."
) )
printline( printline(
">> [color=#4278ff]Player[/color]: Press [color=#4278ff][E][/color] or [color=#4278ff][Space][/color] to return to the outside world." ">> [color=#4278ff]Player[/color]: Press [color=#4278ff][{INTERACT}][/color] or [color=#4278ff][{JUMP}][/color] to return to the outside world."
) )
return true return true
@@ -51,13 +53,24 @@ func has_finished_initialization() -> bool:
return disks_wanted.is_empty() return disks_wanted.is_empty()
func open() -> void: func open() -> void:
render_text()
visible = true visible = true
$BackgroundPanel/ForegroundPanel/ScreenPanel/OldComputerShader.show() $BackgroundPanel/ForegroundPanel/ScreenPanel/OldComputerShader.show()
%Player2D/Parallax2D.hide() %Player2D/Parallax2D.hide()
func printline(line: String) -> void: func printline(line: String) -> void:
open() open()
$ConsoleText.text += "\n" + line base_text += "\n" + line
render_text()
func render_text() -> void:
var interact_key = "E"
var jump_key = "Space"
if %Player2D.controller_ui:
interact_key = "B"
jump_key = "A"
$ConsoleText.text = base_text.replace("{INTERACT}", interact_key).replace("{JUMP}", jump_key)
func close() -> void: func close() -> void:
if has_finished_initialization(): if has_finished_initialization():