feat: add cmd arguments

This commit is contained in:
Anna
2025-09-23 20:39:17 -04:00
parent 6cbc7d8fb8
commit 8838f7767b
2 changed files with 11 additions and 3 deletions

View File

@@ -1,15 +1,22 @@
class_name ROMVerifier
extends Node
var args = OS.get_cmdline_args()
const VALID_HASH := "c9b34443c0414f3b91ef496d8cfee9fdd72405d673985afa11fb56732c96152b"
func _ready() -> void:
Global.get_node("GameHUD").hide()
get_window().files_dropped.connect(on_file_dropped)
var validRomFound = false
for i in args:
if(is_valid_rom((i))):
on_file_dropped(args)
validRomFound = true
if(!validRomFound):
get_window().files_dropped.connect(on_file_dropped)
await get_tree().physics_frame
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_BORDERLESS, false)
on_file_dropped(args)
func on_file_dropped(files: PackedStringArray) -> void:
for i in files:

View File

@@ -0,0 +1 @@
uid://bgdhcdfd0u73r