Translations
This commit is contained in:
parent
4c3e35d1fc
commit
b79e87c7ca
30 changed files with 279 additions and 101 deletions
|
|
@ -45,7 +45,7 @@ size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="Shotgun" type="Label" parent="CenterContainer/PanelContainer/WeaponsContainer/WeaponsContainer/ShotgunContainer"]
|
[node name="Shotgun" type="Label" parent="CenterContainer/PanelContainer/WeaponsContainer/WeaponsContainer/ShotgunContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Дробовики"
|
text = "shotguns"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
|
@ -55,12 +55,13 @@ weapon = ExtResource("4_8uk5y")
|
||||||
|
|
||||||
[node name="AbilitiesLabel" type="Label" parent="CenterContainer/PanelContainer/WeaponsContainer"]
|
[node name="AbilitiesLabel" type="Label" parent="CenterContainer/PanelContainer/WeaponsContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Способности"
|
text = "abilities"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="AbilitiesContainer" type="HBoxContainer" parent="CenterContainer/PanelContainer/WeaponsContainer"]
|
[node name="AbilitiesContainer" type="HBoxContainer" parent="CenterContainer/PanelContainer/WeaponsContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
[node name="MolotovButton" parent="CenterContainer/PanelContainer/WeaponsContainer/AbilitiesContainer" instance=ExtResource("1_8guql")]
|
[node name="MolotovButton" parent="CenterContainer/PanelContainer/WeaponsContainer/AbilitiesContainer" instance=ExtResource("1_8guql")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,26 @@ extends Node
|
||||||
|
|
||||||
const PLAYER_CFG = "user://client_settings"
|
const PLAYER_CFG = "user://client_settings"
|
||||||
|
|
||||||
|
signal locale_changed(StringName)
|
||||||
|
|
||||||
var NICKNAME: StringName = "MyNameIs"
|
var NICKNAME: StringName = "MyNameIs"
|
||||||
|
|
||||||
var SENSITIVITY: float = 0.004
|
var SENSITIVITY: float = 0.004
|
||||||
var TOGGLE_CROUCH: bool = false
|
var TOGGLE_CROUCH: bool = false
|
||||||
var TOGGLE_SCOPE: bool = false
|
var TOGGLE_SCOPE: bool = false
|
||||||
var TOGGLE_WALK: bool = false
|
var TOGGLE_WALK: bool = false
|
||||||
|
var LOCALE: StringName = "automatic":
|
||||||
|
set(value):
|
||||||
|
LOCALE = value
|
||||||
|
locale_changed.emit(value)
|
||||||
|
TranslationServer.set_locale(value)
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
load_settings()
|
load_settings()
|
||||||
multiplayer.connected_to_server.connect(send_client_data)
|
multiplayer.connected_to_server.connect(send_client_data)
|
||||||
|
|
||||||
|
if LOCALE == "automatic":
|
||||||
|
TranslationServer.set_locale(OS.get_locale_language())
|
||||||
|
|
||||||
func _exit_tree() -> void:
|
func _exit_tree() -> void:
|
||||||
save_settings()
|
save_settings()
|
||||||
|
|
@ -33,6 +43,7 @@ func save_settings() -> void:
|
||||||
|
|
||||||
var compacted_toggles = 1 * int(TOGGLE_CROUCH) | 2 * int(TOGGLE_SCOPE) | 4 * int(TOGGLE_WALK)
|
var compacted_toggles = 1 * int(TOGGLE_CROUCH) | 2 * int(TOGGLE_SCOPE) | 4 * int(TOGGLE_WALK)
|
||||||
file.store_line(str(compacted_toggles))
|
file.store_line(str(compacted_toggles))
|
||||||
|
file.store_line(TranslationServer.get_locale())
|
||||||
|
|
||||||
func load_settings() -> void:
|
func load_settings() -> void:
|
||||||
var file = FileAccess.open(PLAYER_CFG,FileAccess.READ)
|
var file = FileAccess.open(PLAYER_CFG,FileAccess.READ)
|
||||||
|
|
@ -47,3 +58,5 @@ func load_settings() -> void:
|
||||||
TOGGLE_CROUCH = compacted_toggles & 1
|
TOGGLE_CROUCH = compacted_toggles & 1
|
||||||
TOGGLE_SCOPE = compacted_toggles & 2
|
TOGGLE_SCOPE = compacted_toggles & 2
|
||||||
TOGGLE_WALK = compacted_toggles & 4
|
TOGGLE_WALK = compacted_toggles & 4
|
||||||
|
|
||||||
|
LOCALE = file.get_line()
|
||||||
|
|
|
||||||
|
|
@ -13,25 +13,40 @@ grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
|
||||||
[node name="PanelContainer" type="PanelContainer" parent="CenterContainer"]
|
[node name="PanelContainer" type="TabContainer" parent="CenterContainer"]
|
||||||
|
custom_minimum_size = Vector2(512, 256)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
tab_alignment = 1
|
||||||
|
current_tab = 3
|
||||||
script = ExtResource("1_xqyus")
|
script = ExtResource("1_xqyus")
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/PanelContainer"]
|
[node name="gameplay" type="VBoxContainer" parent="CenterContainer/PanelContainer"]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
metadata/_tab_index = 0
|
||||||
|
|
||||||
|
[node name="video" type="VBoxContainer" parent="CenterContainer/PanelContainer"]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
metadata/_tab_index = 1
|
||||||
|
|
||||||
|
[node name="FullscreenButton" type="CheckButton" parent="CenterContainer/PanelContainer/video"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "fullscreen"
|
||||||
|
|
||||||
|
[node name="controls" type="VBoxContainer" parent="CenterContainer/PanelContainer"]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
metadata/_tab_index = 2
|
||||||
|
|
||||||
|
[node name="Sensitivity" type="HBoxContainer" parent="CenterContainer/PanelContainer/controls"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="FullscreenButton" type="CheckButton" parent="CenterContainer/PanelContainer/VBoxContainer"]
|
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/controls/Sensitivity"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Полный экран"
|
text = "sensitivity"
|
||||||
|
|
||||||
[node name="Sensitivity" type="HBoxContainer" parent="CenterContainer/PanelContainer/VBoxContainer"]
|
[node name="SensitivitySlider" type="HSlider" parent="CenterContainer/PanelContainer/controls/Sensitivity"]
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/VBoxContainer/Sensitivity"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Чувствительность"
|
|
||||||
|
|
||||||
[node name="SensitivitySlider" type="HSlider" parent="CenterContainer/PanelContainer/VBoxContainer/Sensitivity"]
|
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(256, 0)
|
custom_minimum_size = Vector2(256, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
@ -41,7 +56,7 @@ max_value = 0.02
|
||||||
step = 0.001
|
step = 0.001
|
||||||
value = 0.001
|
value = 0.001
|
||||||
|
|
||||||
[node name="SensitivityBox" type="SpinBox" parent="CenterContainer/PanelContainer/VBoxContainer/Sensitivity"]
|
[node name="SensitivityBox" type="SpinBox" parent="CenterContainer/PanelContainer/controls/Sensitivity"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
max_value = 0.1
|
max_value = 0.1
|
||||||
|
|
@ -50,14 +65,30 @@ value = 0.02
|
||||||
allow_greater = true
|
allow_greater = true
|
||||||
allow_lesser = true
|
allow_lesser = true
|
||||||
|
|
||||||
[node name="GameplayMainAudio" type="HBoxContainer" parent="CenterContainer/PanelContainer/VBoxContainer"]
|
[node name="StopSession" type="Button" parent="CenterContainer/PanelContainer/controls"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Окончить сессию"
|
||||||
|
|
||||||
|
[node name="LeaveButton" type="Button" parent="CenterContainer/PanelContainer/controls"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Покинуть сессию"
|
||||||
|
|
||||||
|
[node name="audio" type="VBoxContainer" parent="CenterContainer/PanelContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
metadata/_tab_index = 3
|
||||||
|
|
||||||
|
[node name="GameplayMainAudio" type="HBoxContainer" parent="CenterContainer/PanelContainer/audio"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/VBoxContainer/GameplayMainAudio"]
|
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/audio/GameplayMainAudio"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Геймплейные звуки"
|
text = "audio_gameplay"
|
||||||
|
|
||||||
[node name="GameplayMainSlider" type="HSlider" parent="CenterContainer/PanelContainer/VBoxContainer/GameplayMainAudio"]
|
[node name="GameplayMainSlider" type="HSlider" parent="CenterContainer/PanelContainer/audio/GameplayMainAudio"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
|
@ -65,22 +96,9 @@ max_value = 1.0
|
||||||
step = 0.01
|
step = 0.01
|
||||||
value = 1.0
|
value = 1.0
|
||||||
|
|
||||||
[node name="StopSession" type="Button" parent="CenterContainer/PanelContainer/VBoxContainer"]
|
[connection signal="toggled" from="CenterContainer/PanelContainer/video/FullscreenButton" to="CenterContainer/PanelContainer" method="_on_fullscreen_button_toggled"]
|
||||||
unique_name_in_owner = true
|
[connection signal="value_changed" from="CenterContainer/PanelContainer/controls/Sensitivity/SensitivitySlider" to="CenterContainer/PanelContainer" method="_on_sensitivity_slider_value_changed"]
|
||||||
visible = false
|
[connection signal="value_changed" from="CenterContainer/PanelContainer/controls/Sensitivity/SensitivityBox" to="CenterContainer/PanelContainer" method="_on_sensitivity_box_value_changed"]
|
||||||
layout_mode = 2
|
[connection signal="pressed" from="CenterContainer/PanelContainer/controls/StopSession" to="CenterContainer/PanelContainer" method="_on_stop_session_pressed"]
|
||||||
text = "Окончить сессию"
|
[connection signal="pressed" from="CenterContainer/PanelContainer/controls/LeaveButton" to="CenterContainer/PanelContainer" method="_on_leave_button_pressed"]
|
||||||
|
[connection signal="value_changed" from="CenterContainer/PanelContainer/audio/GameplayMainAudio/GameplayMainSlider" to="CenterContainer/PanelContainer" method="_on_gameplay_main_slider_value_changed"]
|
||||||
[node name="LeaveButton" type="Button" parent="CenterContainer/PanelContainer/VBoxContainer"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
visible = false
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Покинуть сессию"
|
|
||||||
|
|
||||||
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/FullscreenButton" to="CenterContainer/PanelContainer" method="_on_fullscreen_button_pressed"]
|
|
||||||
[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/FullscreenButton" to="CenterContainer/PanelContainer" method="_on_fullscreen_button_toggled"]
|
|
||||||
[connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/Sensitivity/SensitivitySlider" to="CenterContainer/PanelContainer" method="_on_sensitivity_slider_value_changed"]
|
|
||||||
[connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/Sensitivity/SensitivityBox" to="CenterContainer/PanelContainer" method="_on_sensitivity_box_value_changed"]
|
|
||||||
[connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/GameplayMainAudio/GameplayMainSlider" to="CenterContainer/PanelContainer" method="_on_gameplay_main_slider_value_changed"]
|
|
||||||
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/StopSession" to="CenterContainer/PanelContainer" method="_on_stop_session_pressed"]
|
|
||||||
[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/LeaveButton" to="CenterContainer/PanelContainer" method="_on_leave_button_pressed"]
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ func _ready() -> void:
|
||||||
%InfiniteMoney.set_pressed_no_signal(LobbySettings.infinite_money)
|
%InfiniteMoney.set_pressed_no_signal(LobbySettings.infinite_money)
|
||||||
|
|
||||||
var popup: PopupMenu = %MapsButton.get_popup()
|
var popup: PopupMenu = %MapsButton.get_popup()
|
||||||
%MapsButton.text = LobbySettings.selected_map
|
|
||||||
popup.index_pressed.connect(on_maps_index_pressed)
|
popup.index_pressed.connect(on_maps_index_pressed)
|
||||||
for level in Registry.maps.keys():
|
for level in Registry.maps.keys():
|
||||||
levels_by_index.append(level)
|
levels_by_index.append(level)
|
||||||
|
|
@ -52,9 +51,12 @@ func _on_allow_team_switch_toggled(toggled_on: bool) -> void:
|
||||||
LobbySettings.allow_team_switch = toggled_on
|
LobbySettings.allow_team_switch = toggled_on
|
||||||
|
|
||||||
func on_maps_index_pressed(index: int):
|
func on_maps_index_pressed(index: int):
|
||||||
%MapsButton.text = levels_by_index[index]
|
|
||||||
LobbySettings.selected_map = levels_by_index[index]
|
LobbySettings.selected_map = levels_by_index[index]
|
||||||
|
|
||||||
|
|
||||||
func _on_infinite_money_toggled(toggled_on: bool) -> void:
|
func _on_infinite_money_toggled(toggled_on: bool) -> void:
|
||||||
LobbySettings.infinite_money = toggled_on
|
LobbySettings.infinite_money = toggled_on
|
||||||
|
|
||||||
|
|
||||||
|
func _on_start_button_pressed() -> void:
|
||||||
|
Lobby.start_game()
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,20 @@
|
||||||
[node name="HostMenu" type="VBoxContainer"]
|
[node name="HostMenu" type="VBoxContainer"]
|
||||||
script = ExtResource("1_83e8q")
|
script = ExtResource("1_83e8q")
|
||||||
|
|
||||||
|
[node name="StartButton" type="Button" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
text = "start"
|
||||||
|
|
||||||
[node name="MapsButton" type="MenuButton" parent="."]
|
[node name="MapsButton" type="MenuButton" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Выбор уровня"
|
text = "pick_level"
|
||||||
|
|
||||||
[node name="Time" type="FoldableContainer" parent="."]
|
[node name="Time" type="FoldableContainer" parent="."]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
folded = true
|
folded = true
|
||||||
title = "Время раунда"
|
title = "round_time"
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Time"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="Time"]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
@ -26,7 +31,7 @@ layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Time/VBoxContainer/RoundTime"]
|
[node name="Label" type="Label" parent="Time/VBoxContainer/RoundTime"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Время раунда"
|
text = "round_time"
|
||||||
|
|
||||||
[node name="RoundTimeBox" type="SpinBox" parent="Time/VBoxContainer/RoundTime"]
|
[node name="RoundTimeBox" type="SpinBox" parent="Time/VBoxContainer/RoundTime"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
@ -41,7 +46,7 @@ layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Time/VBoxContainer/BombTime"]
|
[node name="Label" type="Label" parent="Time/VBoxContainer/BombTime"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Отсчёт бомбы"
|
text = "bomb_time"
|
||||||
|
|
||||||
[node name="BombTimeBox" type="SpinBox" parent="Time/VBoxContainer/BombTime"]
|
[node name="BombTimeBox" type="SpinBox" parent="Time/VBoxContainer/BombTime"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
@ -56,7 +61,7 @@ layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Time/VBoxContainer/BuyTime"]
|
[node name="Label" type="Label" parent="Time/VBoxContainer/BuyTime"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Время закупок"
|
text = "buy_time"
|
||||||
|
|
||||||
[node name="BuyTimeBox" type="SpinBox" parent="Time/VBoxContainer/BuyTime"]
|
[node name="BuyTimeBox" type="SpinBox" parent="Time/VBoxContainer/BuyTime"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
@ -69,7 +74,7 @@ allow_greater = true
|
||||||
[node name="Round" type="FoldableContainer" parent="."]
|
[node name="Round" type="FoldableContainer" parent="."]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
folded = true
|
folded = true
|
||||||
title = "Раунд"
|
title = "round_settings"
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Round"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="Round"]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
@ -80,7 +85,7 @@ layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Round/VBoxContainer/RoundAmount"]
|
[node name="Label" type="Label" parent="Round/VBoxContainer/RoundAmount"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Раундов для победы"
|
text = "win_rounds"
|
||||||
|
|
||||||
[node name="RoundBox" type="SpinBox" parent="Round/VBoxContainer/RoundAmount"]
|
[node name="RoundBox" type="SpinBox" parent="Round/VBoxContainer/RoundAmount"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
@ -96,7 +101,7 @@ layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Round/VBoxContainer/TeamSwitchAmount"]
|
[node name="Label" type="Label" parent="Round/VBoxContainer/TeamSwitchAmount"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Раунд смены сторон"
|
text = "half_rounds"
|
||||||
|
|
||||||
[node name="TeamSwitchBox" type="SpinBox" parent="Round/VBoxContainer/TeamSwitchAmount"]
|
[node name="TeamSwitchBox" type="SpinBox" parent="Round/VBoxContainer/TeamSwitchAmount"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
@ -110,7 +115,7 @@ allow_greater = true
|
||||||
[node name="Gameplay" type="FoldableContainer" parent="."]
|
[node name="Gameplay" type="FoldableContainer" parent="."]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
folded = true
|
folded = true
|
||||||
title = "Геймплей"
|
title = "gameplay"
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Gameplay"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="Gameplay"]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
@ -120,20 +125,20 @@ layout_mode = 2
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(200, 0)
|
custom_minimum_size = Vector2(200, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Неограниченная закупка абилок"
|
text = "allow_multiple_abilities"
|
||||||
autowrap_mode = 2
|
autowrap_mode = 2
|
||||||
|
|
||||||
[node name="InfiniteMoney" type="CheckButton" parent="Gameplay/VBoxContainer"]
|
[node name="InfiniteMoney" type="CheckButton" parent="Gameplay/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(200, 0)
|
custom_minimum_size = Vector2(200, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Бесконечные деньги"
|
text = "infinite_money"
|
||||||
autowrap_mode = 2
|
autowrap_mode = 2
|
||||||
|
|
||||||
[node name="PortForward" type="FoldableContainer" parent="."]
|
[node name="PortForward" type="FoldableContainer" parent="."]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
folded = true
|
folded = true
|
||||||
title = "Проброс портов"
|
title = "port_forwarding"
|
||||||
|
|
||||||
[node name="PortForwardContainer" type="VBoxContainer" parent="PortForward"]
|
[node name="PortForwardContainer" type="VBoxContainer" parent="PortForward"]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
@ -141,12 +146,12 @@ layout_mode = 2
|
||||||
|
|
||||||
[node name="ForwardPortButton" type="Button" parent="PortForward/PortForwardContainer"]
|
[node name="ForwardPortButton" type="Button" parent="PortForward/PortForwardContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Попробовать пробросить порты"
|
text = "try_forward"
|
||||||
script = ExtResource("2_lgwxd")
|
script = ExtResource("2_lgwxd")
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="PortForward/PortForwardContainer"]
|
[node name="Label" type="Label" parent="PortForward/PortForwardContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Статус публичного IP:"
|
text = "public_ip_status"
|
||||||
|
|
||||||
[node name="PublicIP" type="LineEdit" parent="PortForward/PortForwardContainer"]
|
[node name="PublicIP" type="LineEdit" parent="PortForward/PortForwardContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
@ -156,21 +161,24 @@ script = ExtResource("3_f5ibf")
|
||||||
|
|
||||||
[node name="Teams" type="FoldableContainer" parent="."]
|
[node name="Teams" type="FoldableContainer" parent="."]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
title = "Команды"
|
folded = true
|
||||||
|
title = "teams"
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Teams"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="Teams"]
|
||||||
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="AllowTeamSwitch" type="CheckButton" parent="Teams/VBoxContainer"]
|
[node name="AllowTeamSwitch" type="CheckButton" parent="Teams/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Разрешить смену команд"
|
text = "allow_team_switch"
|
||||||
autowrap_mode = 2
|
autowrap_mode = 2
|
||||||
|
|
||||||
[node name="Shuffle" type="Button" parent="Teams/VBoxContainer"]
|
[node name="Shuffle" type="Button" parent="Teams/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Перемешать"
|
text = "shuffle"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="StartButton" to="." method="_on_start_button_pressed"]
|
||||||
[connection signal="value_changed" from="Time/VBoxContainer/RoundTime/RoundTimeBox" to="." method="_on_round_time_box_value_changed"]
|
[connection signal="value_changed" from="Time/VBoxContainer/RoundTime/RoundTimeBox" to="." method="_on_round_time_box_value_changed"]
|
||||||
[connection signal="value_changed" from="Time/VBoxContainer/BombTime/BombTimeBox" to="." method="_on_bomb_time_box_value_changed"]
|
[connection signal="value_changed" from="Time/VBoxContainer/BombTime/BombTimeBox" to="." method="_on_bomb_time_box_value_changed"]
|
||||||
[connection signal="value_changed" from="Time/VBoxContainer/BuyTime/BuyTimeBox" to="." method="_on_buy_time_box_value_changed"]
|
[connection signal="value_changed" from="Time/VBoxContainer/BuyTime/BuyTimeBox" to="." method="_on_buy_time_box_value_changed"]
|
||||||
|
|
|
||||||
14
gui/main_menu/language_button.gd
Normal file
14
gui/main_menu/language_button.gd
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
extends MenuButton
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
var popup: PopupMenu = get_popup()
|
||||||
|
for locale in TranslationServer.get_loaded_locales():
|
||||||
|
popup.add_item(locale)
|
||||||
|
|
||||||
|
popup.index_pressed.connect(on_locale_selected)
|
||||||
|
|
||||||
|
func on_locale_selected(index: int):
|
||||||
|
var popup: PopupMenu = get_popup()
|
||||||
|
ClientSettings.LOCALE = popup.get_item_text(index)
|
||||||
1
gui/main_menu/language_button.gd.uid
Normal file
1
gui/main_menu/language_button.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dx0tfstuwspll
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://cbtp4rvg66ba1"]
|
[gd_scene load_steps=5 format=3 uid="uid://cbtp4rvg66ba1"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bsyuos803g7qf" path="res://gui/main_menu/main_menu_gui.gd" id="1_l6cm7"]
|
[ext_resource type="Script" uid="uid://bsyuos803g7qf" path="res://gui/main_menu/main_menu_gui.gd" id="1_l6cm7"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dswn8a8anj2hu" path="res://gui/host_menu/host_menu.tscn" id="2_85nol"]
|
[ext_resource type="PackedScene" uid="uid://dswn8a8anj2hu" path="res://gui/host_menu/host_menu.tscn" id="2_85nol"]
|
||||||
[ext_resource type="Script" uid="uid://fhfot05mnhua" path="res://gui/main_menu/version_label.gd" id="3_qy2xc"]
|
[ext_resource type="Script" uid="uid://fhfot05mnhua" path="res://gui/main_menu/version_label.gd" id="3_qy2xc"]
|
||||||
|
[ext_resource type="Script" uid="uid://dx0tfstuwspll" path="res://gui/main_menu/language_button.gd" id="4_6wy0j"]
|
||||||
|
|
||||||
[node name="MainMenu" type="CenterContainer"]
|
[node name="MainMenu" type="CenterContainer"]
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
|
|
@ -14,6 +15,7 @@ script = ExtResource("1_l6cm7")
|
||||||
metadata/_edit_lock_ = true
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
[node name="MainMenu" type="PanelContainer" parent="."]
|
[node name="MainMenu" type="PanelContainer" parent="."]
|
||||||
|
visible = false
|
||||||
custom_minimum_size = Vector2(256, 0)
|
custom_minimum_size = Vector2(256, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
|
|
@ -23,7 +25,7 @@ layout_mode = 2
|
||||||
[node name="NicknameEdit" type="LineEdit" parent="MainMenu/VBoxContainer"]
|
[node name="NicknameEdit" type="LineEdit" parent="MainMenu/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
placeholder_text = "Nickname"
|
placeholder_text = "nick"
|
||||||
max_length = 16
|
max_length = 16
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="MainMenu/VBoxContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="MainMenu/VBoxContainer"]
|
||||||
|
|
@ -32,7 +34,7 @@ layout_mode = 2
|
||||||
[node name="HostButton" type="Button" parent="MainMenu/VBoxContainer/HBoxContainer"]
|
[node name="HostButton" type="Button" parent="MainMenu/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
text = "HOST"
|
text = "host"
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="MainMenu/VBoxContainer/HBoxContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="MainMenu/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
@ -40,7 +42,7 @@ size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="ConnectButton" type="Button" parent="MainMenu/VBoxContainer/HBoxContainer/VBoxContainer"]
|
[node name="ConnectButton" type="Button" parent="MainMenu/VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "CONNECT"
|
text = "connect"
|
||||||
|
|
||||||
[node name="IpEdit" type="LineEdit" parent="MainMenu/VBoxContainer/HBoxContainer/VBoxContainer"]
|
[node name="IpEdit" type="LineEdit" parent="MainMenu/VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
@ -49,10 +51,9 @@ placeholder_text = "ip"
|
||||||
|
|
||||||
[node name="ExitButton" type="Button" parent="MainMenu/VBoxContainer"]
|
[node name="ExitButton" type="Button" parent="MainMenu/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Выйти из игры"
|
text = "exit"
|
||||||
|
|
||||||
[node name="Lobby" type="PanelContainer" parent="."]
|
[node name="Lobby" type="PanelContainer" parent="."]
|
||||||
visible = false
|
|
||||||
custom_minimum_size = Vector2(256, 256)
|
custom_minimum_size = Vector2(256, 256)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
|
|
@ -74,7 +75,7 @@ size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="TeamName" type="Label" parent="Lobby/HBoxContainer/ClientMenu/Players/AttackTeam"]
|
[node name="TeamName" type="Label" parent="Lobby/HBoxContainer/ClientMenu/Players/AttackTeam"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Attack"
|
text = "attack"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="DefenceTeam" type="VBoxContainer" parent="Lobby/HBoxContainer/ClientMenu/Players"]
|
[node name="DefenceTeam" type="VBoxContainer" parent="Lobby/HBoxContainer/ClientMenu/Players"]
|
||||||
|
|
@ -84,7 +85,7 @@ size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="TeamName" type="Label" parent="Lobby/HBoxContainer/ClientMenu/Players/DefenceTeam"]
|
[node name="TeamName" type="Label" parent="Lobby/HBoxContainer/ClientMenu/Players/DefenceTeam"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Defence"
|
text = "defence"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="SpectatorsTeam" type="VBoxContainer" parent="Lobby/HBoxContainer/ClientMenu/Players"]
|
[node name="SpectatorsTeam" type="VBoxContainer" parent="Lobby/HBoxContainer/ClientMenu/Players"]
|
||||||
|
|
@ -94,7 +95,7 @@ size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="TeamName" type="Label" parent="Lobby/HBoxContainer/ClientMenu/Players/SpectatorsTeam"]
|
[node name="TeamName" type="Label" parent="Lobby/HBoxContainer/ClientMenu/Players/SpectatorsTeam"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Spectators"
|
text = "spectators"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="Buttons" type="HBoxContainer" parent="Lobby/HBoxContainer/ClientMenu"]
|
[node name="Buttons" type="HBoxContainer" parent="Lobby/HBoxContainer/ClientMenu"]
|
||||||
|
|
@ -104,28 +105,23 @@ alignment = 1
|
||||||
[node name="LeaveButton" type="Button" parent="Lobby/HBoxContainer/ClientMenu/Buttons"]
|
[node name="LeaveButton" type="Button" parent="Lobby/HBoxContainer/ClientMenu/Buttons"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Leave"
|
text = "leave"
|
||||||
|
|
||||||
[node name="StartButton" type="Button" parent="Lobby/HBoxContainer/ClientMenu/Buttons"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Start"
|
|
||||||
|
|
||||||
[node name="JoinAttackButton" type="Button" parent="Lobby/HBoxContainer/ClientMenu/Buttons"]
|
[node name="JoinAttackButton" type="Button" parent="Lobby/HBoxContainer/ClientMenu/Buttons"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Join Attack"
|
text = "join_attack"
|
||||||
|
|
||||||
[node name="JoinDefenceButton" type="Button" parent="Lobby/HBoxContainer/ClientMenu/Buttons"]
|
[node name="JoinDefenceButton" type="Button" parent="Lobby/HBoxContainer/ClientMenu/Buttons"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Join Defence"
|
text = "join_defence"
|
||||||
|
|
||||||
[node name="JoinSpectatorsButton" type="Button" parent="Lobby/HBoxContainer/ClientMenu/Buttons"]
|
[node name="JoinSpectatorsButton" type="Button" parent="Lobby/HBoxContainer/ClientMenu/Buttons"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Join Spectators"
|
text = "join_spectators"
|
||||||
|
|
||||||
[node name="HostConainer" type="ScrollContainer" parent="Lobby/HBoxContainer"]
|
[node name="HostConainer" type="ScrollContainer" parent="Lobby/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
@ -135,10 +131,10 @@ horizontal_scroll_mode = 0
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="LabelContainer" type="Control" parent="."]
|
[node name="Independent" type="Control" parent="."]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="RichTextLabel" parent="LabelContainer"]
|
[node name="Version" type="RichTextLabel" parent="Independent"]
|
||||||
top_level = true
|
top_level = true
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 3
|
anchors_preset = 3
|
||||||
|
|
@ -158,13 +154,24 @@ horizontal_alignment = 2
|
||||||
vertical_alignment = 2
|
vertical_alignment = 2
|
||||||
script = ExtResource("3_qy2xc")
|
script = ExtResource("3_qy2xc")
|
||||||
|
|
||||||
|
[node name="LanguageButton" type="MenuButton" parent="Independent"]
|
||||||
|
top_level = true
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 2
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_top = -8.0
|
||||||
|
offset_right = 8.0
|
||||||
|
grow_vertical = 0
|
||||||
|
text = "language"
|
||||||
|
script = ExtResource("4_6wy0j")
|
||||||
|
|
||||||
[connection signal="text_changed" from="MainMenu/VBoxContainer/NicknameEdit" to="." method="_on_nickname_edit_text_changed"]
|
[connection signal="text_changed" from="MainMenu/VBoxContainer/NicknameEdit" to="." method="_on_nickname_edit_text_changed"]
|
||||||
[connection signal="text_submitted" from="MainMenu/VBoxContainer/NicknameEdit" to="." method="_on_nickname_edit_text_submitted"]
|
[connection signal="text_submitted" from="MainMenu/VBoxContainer/NicknameEdit" to="." method="_on_nickname_edit_text_submitted"]
|
||||||
[connection signal="pressed" from="MainMenu/VBoxContainer/HBoxContainer/HostButton" to="." method="_on_host_button_pressed"]
|
[connection signal="pressed" from="MainMenu/VBoxContainer/HBoxContainer/HostButton" to="." method="_on_host_button_pressed"]
|
||||||
[connection signal="pressed" from="MainMenu/VBoxContainer/HBoxContainer/VBoxContainer/ConnectButton" to="." method="_on_connect_button_pressed"]
|
[connection signal="pressed" from="MainMenu/VBoxContainer/HBoxContainer/VBoxContainer/ConnectButton" to="." method="_on_connect_button_pressed"]
|
||||||
[connection signal="pressed" from="MainMenu/VBoxContainer/ExitButton" to="." method="_on_exit_button_pressed"]
|
[connection signal="pressed" from="MainMenu/VBoxContainer/ExitButton" to="." method="_on_exit_button_pressed"]
|
||||||
[connection signal="pressed" from="Lobby/HBoxContainer/ClientMenu/Buttons/LeaveButton" to="." method="_on_leave_button_pressed"]
|
[connection signal="pressed" from="Lobby/HBoxContainer/ClientMenu/Buttons/LeaveButton" to="." method="_on_leave_button_pressed"]
|
||||||
[connection signal="pressed" from="Lobby/HBoxContainer/ClientMenu/Buttons/StartButton" to="." method="_on_start_button_pressed"]
|
|
||||||
[connection signal="pressed" from="Lobby/HBoxContainer/ClientMenu/Buttons/JoinAttackButton" to="." method="_on_join_attack_button_pressed"]
|
[connection signal="pressed" from="Lobby/HBoxContainer/ClientMenu/Buttons/JoinAttackButton" to="." method="_on_join_attack_button_pressed"]
|
||||||
[connection signal="pressed" from="Lobby/HBoxContainer/ClientMenu/Buttons/JoinDefenceButton" to="." method="_on_join_defence_button_pressed"]
|
[connection signal="pressed" from="Lobby/HBoxContainer/ClientMenu/Buttons/JoinDefenceButton" to="." method="_on_join_defence_button_pressed"]
|
||||||
[connection signal="pressed" from="Lobby/HBoxContainer/ClientMenu/Buttons/JoinSpectatorsButton" to="." method="_on_join_spectators_button_pressed"]
|
[connection signal="pressed" from="Lobby/HBoxContainer/ClientMenu/Buttons/JoinSpectatorsButton" to="." method="_on_join_spectators_button_pressed"]
|
||||||
|
|
|
||||||
|
|
@ -24,16 +24,10 @@ func cleanup_lobby() -> void:
|
||||||
%JoinDefenceButton.show()
|
%JoinDefenceButton.show()
|
||||||
%JoinSpectatorsButton.hide()
|
%JoinSpectatorsButton.hide()
|
||||||
|
|
||||||
|
|
||||||
func _on_start_button_pressed() -> void:
|
|
||||||
Lobby.start_game()
|
|
||||||
|
|
||||||
func hide_host_buttons() -> void:
|
func hide_host_buttons() -> void:
|
||||||
%StartButton.hide()
|
|
||||||
%HostMenu.hide()
|
%HostMenu.hide()
|
||||||
|
|
||||||
func show_host_buttons() -> void:
|
func show_host_buttons() -> void:
|
||||||
%StartButton.show()
|
|
||||||
%HostMenu.show()
|
%HostMenu.show()
|
||||||
|
|
||||||
func _on_host_button_pressed() -> void:
|
func _on_host_button_pressed() -> void:
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ extends RichTextLabel
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
AutoUpdate.update_version_text.connect(update_version)
|
AutoUpdate.update_version_text.connect(update_version)
|
||||||
update_version("")
|
update_version(tr("au_loading"))
|
||||||
|
|
||||||
|
|
||||||
func update_version(version: StringName):
|
func update_version(version: StringName):
|
||||||
text = "Текущая версия игры: " + preload("res://version.tres").version + "\n" + version
|
text = tr("vr_version") + preload("res://version.tres").version + "\n" + version
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Panel/VBoxContainer"]
|
[node name="Label" type="Label" parent="Panel/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Choose your team"
|
text = "pick_team"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer"]
|
||||||
|
|
@ -27,19 +27,19 @@ layout_mode = 2
|
||||||
|
|
||||||
[node name="SpectatorButton" type="Button" parent="Panel/VBoxContainer/HBoxContainer"]
|
[node name="SpectatorButton" type="Button" parent="Panel/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Spectators"
|
text = "spectators"
|
||||||
|
|
||||||
[node name="AttackButton" type="Button" parent="Panel/VBoxContainer/HBoxContainer"]
|
[node name="AttackButton" type="Button" parent="Panel/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Attackers"
|
text = "attackers"
|
||||||
|
|
||||||
[node name="DefenceButton" type="Button" parent="Panel/VBoxContainer/HBoxContainer"]
|
[node name="DefenceButton" type="Button" parent="Panel/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Defenders"
|
text = "defenders"
|
||||||
|
|
||||||
[node name="CancelButton" type="Button" parent="Panel/VBoxContainer"]
|
[node name="CancelButton" type="Button" parent="Panel/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Cancel"
|
text = "cancel"
|
||||||
|
|
||||||
[connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer/SpectatorButton" to="." method="_on_spectator_button_pressed"]
|
[connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer/SpectatorButton" to="." method="_on_spectator_button_pressed"]
|
||||||
[connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer/AttackButton" to="." method="_on_attack_button_pressed"]
|
[connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer/AttackButton" to="." method="_on_attack_button_pressed"]
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,10 @@
|
||||||
|
|
||||||
[node name="VersionConfirmation" type="ConfirmationDialog"]
|
[node name="VersionConfirmation" type="ConfirmationDialog"]
|
||||||
oversampling_override = 1.0
|
oversampling_override = 1.0
|
||||||
title = "Изменение версии"
|
title = "version_update"
|
||||||
size = Vector2i(558, 106)
|
size = Vector2i(558, 106)
|
||||||
ok_button_text = "Установить"
|
ok_button_text = "install"
|
||||||
dialog_text = "На сервере обнаружена новая (или просто другая) версия игры.
|
dialog_text = "version_update_desc"
|
||||||
Установить её?"
|
cancel_button_text = "ninstall"
|
||||||
cancel_button_text = "Не устанавливать"
|
|
||||||
|
|
||||||
[node name="HTTPRequest" type="HTTPRequest" parent="."]
|
[node name="HTTPRequest" type="HTTPRequest" parent="."]
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,10 @@ plr_recent_weapon={
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[internationalization]
|
||||||
|
|
||||||
|
locale/translations=PackedStringArray("res://translations/gui.en.translation", "res://translations/gui.ru.translation", "res://translations/gameplay.en.translation", "res://translations/gameplay.ikg.translation", "res://translations/gameplay.ru.translation", "res://translations/gui.ikg.translation", "res://translations/info.ikg.translation", "res://translations/info.ru.translation", "res://translations/info.en.translation")
|
||||||
|
|
||||||
[layer_names]
|
[layer_names]
|
||||||
|
|
||||||
3d_render/layer_1="MainRender"
|
3d_render/layer_1="MainRender"
|
||||||
|
|
|
||||||
|
|
@ -18,22 +18,22 @@ func _ready() -> void:
|
||||||
patch_request.download_file = exec_dir.path_join("chelimbalo.pck")
|
patch_request.download_file = exec_dir.path_join("chelimbalo.pck")
|
||||||
patch_request.request_completed.connect(patch_downloaded)
|
patch_request.request_completed.connect(patch_downloaded)
|
||||||
|
|
||||||
update_version_text.emit("Подгружаем данные с сервера...")
|
update_version_text.emit(tr("au_loading"))
|
||||||
|
|
||||||
request("https://2ndbeam.ru/durenije/chelimbalo/release/deploy_data")
|
request("https://2ndbeam.ru/durenije/chelimbalo/release/deploy_data")
|
||||||
|
|
||||||
func on_request_completed(result: int, _response_code: int, _headers: PackedStringArray, body: PackedByteArray):
|
func on_request_completed(result: int, _response_code: int, _headers: PackedStringArray, body: PackedByteArray):
|
||||||
if result != OK:
|
if result != OK:
|
||||||
update_version_text.emit("[color=red]Ошибка загрузки данных:" + str(result) +"[/color]")
|
update_version_text.emit("[color=red]" + tr("au_err_load") + str(result) +"[/color]")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
var ver_hash = body.get_string_from_ascii().split("\n")[1]
|
var ver_hash = body.get_string_from_ascii().split("\n")[1]
|
||||||
if ver_hash != load("res://version.tres").version:
|
if ver_hash != load("res://version.tres").version:
|
||||||
update_version_text.emit("Доступна новая версия!")
|
update_version_text.emit(tr("au_new_version"))
|
||||||
popup.popup_centered()
|
popup.popup_centered()
|
||||||
else:
|
else:
|
||||||
update_version_text.emit("[color=green]У вас самая актуальная версия игры![/color]")
|
update_version_text.emit("[color=green]"+tr("au_current_version")+"[/color]")
|
||||||
|
|
||||||
func download_button_pressed() -> void:
|
func download_button_pressed() -> void:
|
||||||
popup.get_node("HTTPRequest").request("https://2ndbeam.ru/durenije/chelimbalo/release/chelimbalo.pck")
|
popup.get_node("HTTPRequest").request("https://2ndbeam.ru/durenije/chelimbalo/release/chelimbalo.pck")
|
||||||
|
|
@ -43,4 +43,4 @@ func patch_downloaded(result: int, _response_code: int, _headers: PackedStringAr
|
||||||
OS.create_process(OS.get_executable_path(),OS.get_cmdline_args())
|
OS.create_process(OS.get_executable_path(),OS.get_cmdline_args())
|
||||||
get_tree().quit()
|
get_tree().quit()
|
||||||
else:
|
else:
|
||||||
update_version_text.emit("[color=red]Ошибка загрузки новой версии:" + str(result) +"[/color]")
|
update_version_text.emit("[color=red]" + tr("au_err_install") + str(result) +"[/color]")
|
||||||
|
|
|
||||||
15
translations/gameplay.csv
Normal file
15
translations/gameplay.csv
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
key,ru,en,ikg
|
||||||
|
attack,Сторона атаки,Attack,
|
||||||
|
attacker,Атакующий,Attacker,
|
||||||
|
attackers,Атакующие,Attackers,
|
||||||
|
defence,Сторона защиты,Defence,
|
||||||
|
defender,Защищающий,Defender,
|
||||||
|
defenders,Защищающие,Defenders,
|
||||||
|
spectator,Наблюдатель,Spectator,
|
||||||
|
spectators,Наблюдатели,Spectators,
|
||||||
|
pistols,Пистолеты,Pistols,
|
||||||
|
sm_gun,Пистолеты-пулемёты,Submachine guns,
|
||||||
|
shotguns,Дробовики,Shotguns,
|
||||||
|
rifles,Винтовки,Rifles,
|
||||||
|
abilities,Способности,Abilities,
|
||||||
|
MyNameIs,:докер:,MyNameIs,Ïγрõõma∆~ğònñ fīłøроñī
|
||||||
|
17
translations/gameplay.csv.import
Normal file
17
translations/gameplay.csv.import
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="csv_translation"
|
||||||
|
type="Translation"
|
||||||
|
uid="uid://1okuxajts7cd"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
files=["res://translations/gameplay.ru.translation", "res://translations/gameplay.en.translation", "res://translations/gameplay.ikg.translation"]
|
||||||
|
|
||||||
|
source_file="res://translations/gameplay.csv"
|
||||||
|
dest_files=["res://translations/gameplay.ru.translation", "res://translations/gameplay.en.translation", "res://translations/gameplay.ikg.translation"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress=true
|
||||||
|
delimiter=0
|
||||||
BIN
translations/gameplay.en.translation
Normal file
BIN
translations/gameplay.en.translation
Normal file
Binary file not shown.
BIN
translations/gameplay.ikg.translation
Normal file
BIN
translations/gameplay.ikg.translation
Normal file
Binary file not shown.
BIN
translations/gameplay.ru.translation
Normal file
BIN
translations/gameplay.ru.translation
Normal file
Binary file not shown.
43
translations/gui.csv
Normal file
43
translations/gui.csv
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
key,ru,en,ikg
|
||||||
|
allow_multiple_abilities,Разрешить несколько одинаковых способностей,Allow multiple same abilities,
|
||||||
|
allow_team_switch,Разрешить смену команд,Allow team switch,
|
||||||
|
audio,Звук,Audio,
|
||||||
|
audio_gameplay,Геймплейные звуки,Gameplay sounds,
|
||||||
|
bomb_time,Отсчёт бомбы,Bomb time,
|
||||||
|
buy_time,Время закупок,Buy phase time,
|
||||||
|
cancel,Отменить,Cancel,
|
||||||
|
connect,Подключится по IP,Connect to IP,
|
||||||
|
controls,Управление,Controls,
|
||||||
|
exit,Выйти из игры,Exit the game,
|
||||||
|
fullscreen,Полный экран,Fullscreen,
|
||||||
|
gameplay,Геймплей,Gameplay,
|
||||||
|
half_rounds,Раундов до смены сторон,Rounds to switch sides,
|
||||||
|
host,Захостить сервер,Host server,
|
||||||
|
infinite_money,Бесконечные деньги,Infinite money,
|
||||||
|
install,Установить,Install,
|
||||||
|
ip,IP,IP,
|
||||||
|
join_attack,Стать атакующим,Join attack,
|
||||||
|
join_defence,Стать защищающим,Join defence,
|
||||||
|
join_spectators,Стать наблюдателем,Join spectators,
|
||||||
|
language,Язык,Language,
|
||||||
|
leave,Покинуть лобби,Leave lobby,
|
||||||
|
nick,Никнейм,Nickname,
|
||||||
|
ninstall,Не устанавливать,Don’t install,
|
||||||
|
pick_level,Выбор уровня,Pick level,
|
||||||
|
pick_team,Выберите свою команду,Pick your team,
|
||||||
|
port_forwarding,Проброс портов,Port forwarding,
|
||||||
|
public_ip_status,Статус публичного IP,Public IP status,
|
||||||
|
round_settings,Настройки раунда,Round settings,
|
||||||
|
round_time,Время раунда,Round time,
|
||||||
|
sensitivity,Чувствительность,Sensitivity,
|
||||||
|
settings,Настройки,Settings,
|
||||||
|
shuffle,Перемешать команды,Shuffle teams,
|
||||||
|
start,Начать сессию,Start session,
|
||||||
|
teams,Команды,Teams,
|
||||||
|
try_forward,Попробовать пробросить порты,Try to forward ports,
|
||||||
|
version_update,Изменение версии,Version update,
|
||||||
|
version_update_desc,"На сервере обнаружена новая (или просто другая) версия игры.
|
||||||
|
Установить её?","There’s new (or just different) version on server.
|
||||||
|
Install it?",
|
||||||
|
video,Видео,Video,
|
||||||
|
win_rounds,Раундов до победы,Rounds to win,
|
||||||
|
17
translations/gui.csv.import
Normal file
17
translations/gui.csv.import
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="csv_translation"
|
||||||
|
type="Translation"
|
||||||
|
uid="uid://cb0irxjgwubm4"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
files=["res://translations/gui.ru.translation", "res://translations/gui.en.translation", "res://translations/gui.ikg.translation"]
|
||||||
|
|
||||||
|
source_file="res://translations/gui.csv"
|
||||||
|
dest_files=["res://translations/gui.ru.translation", "res://translations/gui.en.translation", "res://translations/gui.ikg.translation"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress=true
|
||||||
|
delimiter=0
|
||||||
BIN
translations/gui.en.translation
Normal file
BIN
translations/gui.en.translation
Normal file
Binary file not shown.
BIN
translations/gui.ikg.translation
Normal file
BIN
translations/gui.ikg.translation
Normal file
Binary file not shown.
BIN
translations/gui.ru.translation
Normal file
BIN
translations/gui.ru.translation
Normal file
Binary file not shown.
7
translations/info.csv
Normal file
7
translations/info.csv
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
key,ru,en,ikg
|
||||||
|
au_loading,Подгружаем данные с сервера…,Loading data from server…,
|
||||||
|
au_err_load,Ошибка загрузки данных: ,Error while loading data: ,
|
||||||
|
au_err_install,Ошибка загрузки новой версии: ,Error while downloading new version: ,
|
||||||
|
au_new_version,Доступна новая версия!,New version available!,
|
||||||
|
au_current_version,У вас самая актуальная версия игры!,Your version is the current version!,
|
||||||
|
vr_version,Текущая версия игры: ,Game version: ,
|
||||||
|
17
translations/info.csv.import
Normal file
17
translations/info.csv.import
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="csv_translation"
|
||||||
|
type="Translation"
|
||||||
|
uid="uid://4n0g51c0w3ht"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
files=["res://translations/info.ru.translation", "res://translations/info.en.translation", "res://translations/info.ikg.translation"]
|
||||||
|
|
||||||
|
source_file="res://translations/info.csv"
|
||||||
|
dest_files=["res://translations/info.ru.translation", "res://translations/info.en.translation", "res://translations/info.ikg.translation"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress=true
|
||||||
|
delimiter=0
|
||||||
BIN
translations/info.en.translation
Normal file
BIN
translations/info.en.translation
Normal file
Binary file not shown.
BIN
translations/info.ikg.translation
Normal file
BIN
translations/info.ikg.translation
Normal file
Binary file not shown.
BIN
translations/info.ru.translation
Normal file
BIN
translations/info.ru.translation
Normal file
Binary file not shown.
|
|
@ -3,6 +3,7 @@
|
||||||
[ext_resource type="Material" uid="uid://bw3uex67yy8e7" path="res://materials/fire_wall.tres" id="1_w3iei"]
|
[ext_resource type="Material" uid="uid://bw3uex67yy8e7" path="res://materials/fire_wall.tres" id="1_w3iei"]
|
||||||
|
|
||||||
[sub_resource type="CylinderMesh" id="CylinderMesh_cqb3p"]
|
[sub_resource type="CylinderMesh" id="CylinderMesh_cqb3p"]
|
||||||
|
resource_local_to_scene = true
|
||||||
material = ExtResource("1_w3iei")
|
material = ExtResource("1_w3iei")
|
||||||
top_radius = 3.5
|
top_radius = 3.5
|
||||||
bottom_radius = 3.5
|
bottom_radius = 3.5
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue