This commit is contained in:
Nicholas Butzke
2026-08-02 02:20:02 -04:00
parent 61669627db
commit 922983429e
226 changed files with 34032 additions and 18521 deletions
+21 -6
View File
@@ -28,14 +28,25 @@ func _initialize() -> void:
var args := OS.get_cmdline_user_args()
if args.size() > 0:
_out_dir = args[0]
var nm = root.get_node_or_null("NetworkManager")
if nm and nm.has_method("start_singleplayer_match"):
nm.start_singleplayer_match(GameMode.DEATHMATCH)
change_scene_to_file("res://scenes/maps/test_level/test_level.tscn")
if not _out_dir.is_absolute_path():
_out_dir = ProjectSettings.globalize_path(_out_dir)
var mkdir_error := DirAccess.make_dir_recursive_absolute(_out_dir)
if mkdir_error != OK:
printerr("roster_capture: could not create '%s' (error %d)" % [
_out_dir, mkdir_error])
quit(mkdir_error)
return
change_scene_to_file("res://ui/main_menu/main_menu.tscn")
func _process(_delta: float) -> bool:
_frames += 1
if _frames == 40:
var nm = root.get_node_or_null("NetworkManager")
if nm and nm.has_method("start_singleplayer_match"):
nm.start_singleplayer_match(GameMode.DEATHMATCH)
change_scene_to_file("res://scenes/maps/test_level/test_level.tscn")
return false
if _frames < 150:
return false
if _menu == null:
@@ -80,5 +91,9 @@ func _shoot() -> void:
img = img.get_region(Rect2i(int(w * 0.44), int(h * 0.15),
int(w * 0.32), int(h * 0.68)))
var path := "%s/roster_%s.png" % [_out_dir, id]
img.save_png(path)
print("wrote %s" % path)
var save_error := img.save_png(path)
if save_error == OK:
print("wrote %s" % path)
else:
printerr("roster_capture: could not save '%s' (error %d)" % [
path, save_error])