From be7f68651119d4d22cabe74ca87399e5672e3a3b Mon Sep 17 00:00:00 2001 From: Sven Hendriks <100040414+onforthr@users.noreply.github.com> Date: Sat, 1 Apr 2023 22:22:55 +0200 Subject: [PATCH] Append current date and time to filename on export --- GUI/GUI.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GUI/GUI.gd b/GUI/GUI.gd index f08f133..22e233e 100644 --- a/GUI/GUI.gd +++ b/GUI/GUI.gd @@ -53,7 +53,8 @@ func save_image(img): var filesaver = get_tree().root.get_node("/root/HTML5File") filesaver.save_image(img, "Space Background") else: - img.save_png("res://Space Background.png") + var ts = Time.get_datetime_dict_from_system() + img.save_png("res://Space Background %04d%02d%02d%02d%02d%02d.png" % [ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.second]) func _on_SaveTimer_timeout(): export_image()