diff --git a/.gitignore b/.gitignore index 103581b..c672ad3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ # Godot 4+ specific ignores .godot/ -*.csproj.old # Binaries bin/ \ No newline at end of file diff --git a/1bit-game-jam.csproj b/1bit-game-jam.csproj index d31daf9..b63e5d0 100644 --- a/1bit-game-jam.csproj +++ b/1bit-game-jam.csproj @@ -1,4 +1,4 @@ - + net6.0 true diff --git a/locales/en.mo b/locales/en.mo deleted file mode 100644 index 6b29672..0000000 Binary files a/locales/en.mo and /dev/null differ diff --git a/locales/en.po b/locales/en.po deleted file mode 100644 index c7e2ab2..0000000 --- a/locales/en.po +++ /dev/null @@ -1,36 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.4.2\n" - -msgid "Press Start or Enter" -msgstr "Press Start or Enter" - -msgid "by Tea Sanctuary, 2023" -msgstr "by Tea Sanctuary, 2023" - -msgid "CONGRATULATIONS!" -msgstr "CONGRATULATIONS!" - -msgid "" -"It took you\n" -"{0} attempts\n" -"and {1}\n" -"to finish the game." -msgstr "" -"It took you\n" -"{0} attempts\n" -"and {1}\n" -"to finish the game." - -msgid "Thank you for playing! :)" -msgstr "Thank you for playing! :)" diff --git a/locales/ru.mo b/locales/ru.mo deleted file mode 100644 index cb1f675..0000000 Binary files a/locales/ru.mo and /dev/null differ diff --git a/locales/ru.po b/locales/ru.po deleted file mode 100644 index 26b37e8..0000000 --- a/locales/ru.po +++ /dev/null @@ -1,37 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: ru\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" -"X-Generator: Poedit 3.4.2\n" - -msgid "Press Start or Enter" -msgstr "Нажмите Start или Enter" - -msgid "by Tea Sanctuary, 2023" -msgstr "разработчик: Tea Sanctuary, 2023" - -msgid "CONGRATULATIONS!" -msgstr "ПОЗДРАВЛЯЕМ!" - -msgid "" -"It took you\n" -"{0} attempts\n" -"and {1}\n" -"to finish the game." -msgstr "" -"Вам потребовалось\n" -"{0} попыток\n" -"и {1}\n" -"чтобы пройти игру." - -msgid "Thank you for playing! :)" -msgstr "Спасибо за игру! :)" diff --git a/locales/template.pot b/locales/template.pot deleted file mode 100644 index 1208104..0000000 --- a/locales/template.pot +++ /dev/null @@ -1,17 +0,0 @@ -msgid "" -msgstr "" - -msgid "Press Start or Enter" -msgstr "" - -msgid "by Tea Sanctuary, 2023" -msgstr "" - -msgid "CONGRATULATIONS!" -msgstr "" - -msgid "It took you\n{0} attempts\nand {1}\nto finish the game." -msgstr "" - -msgid "Thank you for playing! :)" -msgstr "" \ No newline at end of file diff --git a/project.godot b/project.godot index 6a3b84c..8dd5ea9 100644 --- a/project.godot +++ b/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="1bit-game-jam" run/main_scene="res://scenes/menu.tscn" -config/features=PackedStringArray("4.2", "C#", "Mobile") +config/features=PackedStringArray("4.1", "C#", "Mobile") boot_splash/bg_color=Color(0.141176, 0.141176, 0.141176, 1) config/icon="res://icon.svg" @@ -71,15 +71,6 @@ ui_confirm={ , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":6,"pressure":0.0,"pressed":false,"script":null) ] } -ui_change_language={ -"deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":76,"key_label":0,"unicode":108,"echo":false,"script":null) -] -} - -[internationalization] - -locale/translations=PackedStringArray("res://locales/en.po", "res://locales/ru.po") [layer_names] diff --git a/scenes/menu.tscn b/scenes/menu.tscn index 523feac..298b9f5 100644 --- a/scenes/menu.tscn +++ b/scenes/menu.tscn @@ -281,22 +281,6 @@ text = "Press Start or Enter" horizontal_alignment = 1 vertical_alignment = 1 -[node name="Label2" type="Label" parent="CanvasLayer"] -anchors_preset = 12 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_top = -18.0 -offset_bottom = 8.00002 -grow_horizontal = 2 -grow_vertical = 0 -rotation = -0.001216 -auto_translate = false -theme = ExtResource("3_d3ur4") -text = "Press L to change language" -horizontal_alignment = 1 -vertical_alignment = 1 - [node name="Flash" type="TextureRect" parent="CanvasLayer"] clip_children = 2 material = SubResource("ShaderMaterial_eqq24") diff --git a/scripts/Menu.cs b/scripts/Menu.cs index 6b0a388..ca2fb38 100644 --- a/scripts/Menu.cs +++ b/scripts/Menu.cs @@ -1,21 +1,13 @@ -using System.Collections.Generic; using Godot; -using Godot.Collections; public partial class Menu : Node2D { private Timer _timer; private AudioStreamPlayer2D _thunderclap; private AnimationPlayer _animationPlayer; - private Array _translations = new Array{"en", "ru"}; - private int _languagesCount; - private int _currentLanguage = 0; public override void _Ready() { - TranslationServer.SetLocale("en"); - _languagesCount = _translations.Count; - _timer = (Timer)FindChild("Timer"); _thunderclap = (AudioStreamPlayer2D)FindChild("Thunderclap"); _animationPlayer = (AnimationPlayer)FindChild("AnimationPlayer"); @@ -32,13 +24,6 @@ public partial class Menu : Node2D _thunderclap.Play(); _timer.Start(); } - else if (@event.IsActionPressed("ui_change_language")) - { - _currentLanguage++; - if (_currentLanguage >= _languagesCount) - _currentLanguage = 0; - TranslationServer.SetLocale(_translations[_currentLanguage]); - } } public void ChangeScene() diff --git a/scripts/WinScreen.cs b/scripts/WinScreen.cs index 2e7723e..76758c4 100644 --- a/scripts/WinScreen.cs +++ b/scripts/WinScreen.cs @@ -16,9 +16,7 @@ public partial class WinScreen : TextureRect Visible = true; TextLabel.Text = - string.Format(Tr("It took you\n{0} attempts\nand {1}\nto finish the game."), - Manager.GetAttempts(), - Manager.GetFormattedTimeElapsed()); + $"It took you\n{Manager.GetAttempts()} attempts\nand {Manager.GetFormattedTimeElapsed()}\nto finish the game."; } public override void _Input(InputEvent @event)