Fixes issue with "none" locale
This commit is contained in:
1 parent
78c925d372
commit
3775bd00e1
1 file changed
+5
-5
@@ -72,10 +72,11 @@ func take_burst() -> void:
|
|||||||
await get_tree().create_timer(0.01).timeout
|
await get_tree().create_timer(0.01).timeout
|
||||||
|
|
||||||
for locale in locales:
|
for locale in locales:
|
||||||
if not locale == "none":
|
var locale_to_set = locale
|
||||||
TranslationServer.set_locale(locale)
|
if locale == "none":
|
||||||
|
locale_to_set = previous_locale
|
||||||
|
TranslationServer.set_locale(locale_to_set)
|
||||||
await get_tree().process_frame
|
await get_tree().process_frame
|
||||||
|
|
||||||
save_image()
|
save_image()
|
||||||
|
|
||||||
TranslationServer.set_locale(previous_locale)
|
TranslationServer.set_locale(previous_locale)
|
||||||
@@ -85,6 +86,7 @@ func take_burst() -> void:
|
|||||||
tree.paused = game_was_paused
|
tree.paused = game_was_paused
|
||||||
visible = shutter_was_visible
|
visible = shutter_was_visible
|
||||||
burst_ended.emit()
|
burst_ended.emit()
|
||||||
|
print_rich("[color=green][Screenshots] Done! (%s)[/color]")
|
||||||
position = old_position
|
position = old_position
|
||||||
|
|
||||||
func save_image() -> void:
|
func save_image() -> void:
|
||||||
@@ -143,8 +145,6 @@ func save_image() -> void:
|
|||||||
|
|
||||||
print_rich("[Screenshots] Saved at: [url=%s]%s[/url]" % [ProjectSettings.globalize_path(file_path.get_base_dir()), file_path])
|
print_rich("[Screenshots] Saved at: [url=%s]%s[/url]" % [ProjectSettings.globalize_path(file_path.get_base_dir()), file_path])
|
||||||
|
|
||||||
print_rich("[color=green][Screenshots] Done! (%s)[/color]" % timestamp)
|
|
||||||
|
|
||||||
func get_unique_filepath(base_path: String) -> String:
|
func get_unique_filepath(base_path: String) -> String:
|
||||||
if not FileAccess.file_exists(base_path):
|
if not FileAccess.file_exists(base_path):
|
||||||
return base_path
|
return base_path
|
||||||
|
|||||||
Reference in new issue
Block a user