Доработка. Модуль для контроля версий.

This commit is contained in:
sasha80
2024-05-02 09:15:49 +03:00
parent 7d48e2875f
commit b6e1fc9f05
4 changed files with 15 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ config/external_cu=false
[autoload]
commit="*res://scripts/commit.gd"
log="*res://addons/godot-logger/scripts/logger.gd"
tools="*res://scripts/tools.gd"
signaller="*res://scripts/signaller.gd"

View File

@@ -23,6 +23,7 @@ func _ready() -> void:
log.info('Модуль журнала работы готов')
log.info('Аргументы коммандной строки: \"%s\"' % OS.get_cmdline_args())
log.info('Операционная система: %s' % [OS.get_distribution_name()])
log.info('Текущая версия ПО УАРЭП: %s' % commit.VCS_HEAD)
threats.connect('threat_new', Callable(self, 'on_threats_changed').bind('Цель обнаружена'))
threats.connect('threat_lost', Callable(self, 'on_threats_changed').bind('Цель потеряна'))
signaller.connect('interfer_new', Callable(self, 'on_interfer_new').bind('Создан сеанс помехи'))

View File

@@ -3,7 +3,9 @@ extends Panel
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
if not OS.get_cmdline_args().has('++ограниченный'): return
$lbl_commit.text = 'Текущая версия ПО УАРЭП: \"%s\"' % commit.VCS_HEAD
if not OS.get_cmdline_args().has('++ограниченный'):
return
$Label2.text = 'Текущий режим доступа: ограниченный'
for node in $GridContainer.get_children().filter(func(b): return b is Button):
node.disabled = true

View File

@@ -246,7 +246,7 @@ text = "Управление элементами в режиме с огран
layout_mode = 0
offset_left = 16.0
offset_top = 27.0
offset_right = 445.0
offset_right = 476.0
offset_bottom = 49.0
text = "Текущий режим доступа: полный"
@@ -297,5 +297,14 @@ size_flags_horizontal = 6
size_flags_vertical = 6
button_pressed = true
[node name="lbl_commit" type="Label" parent="."]
layout_mode = 0
offset_left = 483.0
offset_top = 27.0
offset_right = 1055.0
offset_bottom = 46.0
text = "Текущая версия ПО УАРЭП:"
vertical_alignment = 1
[connection signal="text_changed" from="edt_mapaddr" to="edt_mapaddr" method="_on_text_changed"]
[connection signal="pressed" from="GridContainer2/external_cu_btn" to="." method="_on_external_cu_btn_pressed"]