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

+16 -3
View File
@@ -6,8 +6,10 @@ var disks_loaded = []
var starting_integrity = 2
var total_integrity = starting_integrity + len(disks_wanted)
var base_text: String = ""
func _ready() -> void:
$ConsoleText.text = $ConsoleText.text % get_memory_integrity()
base_text = $ConsoleText.text % get_memory_integrity()
func load_disk(disk_num: int) -> bool:
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."
)
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
@@ -51,13 +53,24 @@ func has_finished_initialization() -> bool:
return disks_wanted.is_empty()
func open() -> void:
render_text()
visible = true
$BackgroundPanel/ForegroundPanel/ScreenPanel/OldComputerShader.show()
%Player2D/Parallax2D.hide()
func printline(line: String) -> void:
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:
if has_finished_initialization():