Merge remote-tracking branch 'kitya/uarep-master' into prd-control
# Conflicts: # scenes/контроль/кнопка-прибора.gd # scenes/контроль/контроль.tscn # scenes/эмс2/эмс_тг.gd # scripts/interfer.gd # table/table.gd
@@ -36,4 +36,4 @@
|
||||
- После клонирования запустить скрипт `git-hooks-config.sh`
|
||||
- В среде **Windows** запуск скрипта `git-hooks-config.sh` производить из оболочки `git bash`
|
||||
- Нужно обновить `settings.json`
|
||||
- поиск циклических зависимостей
|
||||
- поиск циклических зависимостей (не реализованно)
|
||||
|
||||
BIN
data/АФСП-РТР.png
Normal file
|
After Width: | Height: | Size: 150 KiB |
34
data/АФСП-РТР.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://vdhmga62vjsj"
|
||||
path="res://.godot/imported/АФСП-РТР.png-0b840f65d8791cdd41736204e8128ac9.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/АФСП-РТР.png"
|
||||
dest_files=["res://.godot/imported/АФСП-РТР.png-0b840f65d8791cdd41736204e8128ac9.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/Структура1.wmf.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
34
data/Структура1.wmf.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bj6gixv60xcrq"
|
||||
path="res://.godot/imported/Структура1.wmf.png-3f3bea77b2575bb24d8ebb8779214cf5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/Структура1.wmf.png"
|
||||
dest_files=["res://.godot/imported/Структура1.wmf.png-3f3bea77b2575bb24d8ebb8779214cf5.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/У-РЭП-РПД-В.png
Normal file
|
After Width: | Height: | Size: 254 KiB |
34
data/У-РЭП-РПД-В.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b2vf7en1jj8dv"
|
||||
path="res://.godot/imported/У-РЭП-РПД-В.png-16e53650006353b1f4857905926a9d2e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/У-РЭП-РПД-В.png"
|
||||
dest_files=["res://.godot/imported/У-РЭП-РПД-В.png-16e53650006353b1f4857905926a9d2e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/У-РЭП-РПД-К.png
Normal file
|
After Width: | Height: | Size: 176 KiB |
34
data/У-РЭП-РПД-К.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dm350ta8noa0v"
|
||||
path="res://.godot/imported/У-РЭП-РПД-К.png-382bf7e19c5207a25529ff47820a3140.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/У-РЭП-РПД-К.png"
|
||||
dest_files=["res://.godot/imported/У-РЭП-РПД-К.png-382bf7e19c5207a25529ff47820a3140.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/У-РЭП-РПД-Н.png
Normal file
|
After Width: | Height: | Size: 150 KiB |
34
data/У-РЭП-РПД-Н.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bktiige0i2lhl"
|
||||
path="res://.godot/imported/У-РЭП-РПД-Н.png-1812f48d3e2d228cc07e3a1f352eee1f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/У-РЭП-РПД-Н.png"
|
||||
dest_files=["res://.godot/imported/У-РЭП-РПД-Н.png-1812f48d3e2d228cc07e3a1f352eee1f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/У-УФ.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
34
data/У-УФ.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://u7h3l0jjrsnp"
|
||||
path="res://.godot/imported/У-УФ.png-e70ef42c717c17d1d5bd404916252ea3.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/У-УФ.png"
|
||||
dest_files=["res://.godot/imported/У-УФ.png-e70ef42c717c17d1d5bd404916252ea3.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/У-ЭП.png
Normal file
|
After Width: | Height: | Size: 319 KiB |
34
data/У-ЭП.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c3cyog3gy24ft"
|
||||
path="res://.godot/imported/У-ЭП.png-5de01103a8e9a06ea0e900facdc90d4d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/У-ЭП.png"
|
||||
dest_files=["res://.godot/imported/У-ЭП.png-5de01103a8e9a06ea0e900facdc90d4d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/УА-РЭП.png
Normal file
|
After Width: | Height: | Size: 557 KiB |
34
data/УА-РЭП.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cllxcfa130vqu"
|
||||
path="res://.godot/imported/УА-РЭП.png-2578a93f5ba5f7909945125656980bd6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/УА-РЭП.png"
|
||||
dest_files=["res://.godot/imported/УА-РЭП.png-2578a93f5ba5f7909945125656980bd6.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -35,8 +35,10 @@ func get_radius_outter() -> float: return material.get('shader_parameter/radius
|
||||
func get_radius_inner_0() -> float: return material.get('shader_parameter/radius_inner_0')
|
||||
func get_radius_inner_1() -> float: return material.get('shader_parameter/radius_inner_1')
|
||||
|
||||
func get_band_colors(val: Array): return material.get('shader_parameter/ant_band_c')
|
||||
func get_band_failures(val: Array): return material.get('shader_parameter/ant_band_m')
|
||||
func set_band_colors(val: Array): material.set('shader_parameter/ant_band_c', val)
|
||||
|
||||
func set_band_failures(val: Array): material.set('shader_parameter/ant_band_m', val)
|
||||
|
||||
## Добавляет сектор запрета[br]
|
||||
## [param id] - Индекс сектора запрета.[br]
|
||||
|
||||
@@ -727,7 +727,7 @@ func blend_mask(val: bool) -> void:
|
||||
|
||||
|
||||
func update_coordinates_label(lon: float, lat: float) -> void:
|
||||
coordinates_label = 'Координаты:\nNS:%f\nEW:%f' % [lat, lon]
|
||||
coordinates_label = 'Координаты: NS:%f, EW:%f' % [lat, lon]
|
||||
signaller.emit_signal('update_coordinates_map', coordinates_label)
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ func _on_toggled(toggled_on):
|
||||
$frame.visible = toggled_on
|
||||
|
||||
|
||||
func _on_focus_entered():
|
||||
func _on_focus_entered():
|
||||
button_pressed = true
|
||||
#enter_press() TODO: Пока что без выбора прибора
|
||||
|
||||
@@ -56,7 +56,7 @@ func enter_press():
|
||||
@export var progress_value: float = 0.0:
|
||||
set(v):
|
||||
progress_value = v
|
||||
|
||||
|
||||
if is_inside_tree():
|
||||
update_progress_bar(v)
|
||||
var max_val = $control_progress.get('max_value')
|
||||
@@ -83,3 +83,10 @@ func enter_press():
|
||||
progress_min_value = v
|
||||
if is_inside_tree():
|
||||
$control_progress.min_value = v
|
||||
|
||||
|
||||
@export var show_functional: bool:
|
||||
set(v):
|
||||
show_functional = v
|
||||
if is_inside_tree():
|
||||
$pic_functional.visible = v
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=21 format=3 uid="uid://lwmw4egynmd1"]
|
||||
[gd_scene load_steps=30 format=3 uid="uid://lwmw4egynmd1"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bar8k5qef7kch" path="res://data/УФ.png" id="2_0nvm1"]
|
||||
[ext_resource type="Script" uid="uid://q3gmpsqspjfp" path="res://scenes/контроль/внешний.gd" id="2_8r80x"]
|
||||
@@ -12,11 +12,19 @@
|
||||
[ext_resource type="Texture2D" uid="uid://c6nve6f8sfyj2" path="res://data/состояние-исправности-0.png" id="7_6j01w"]
|
||||
[ext_resource type="Texture2D" uid="uid://u3tnejvpm8it" path="res://data/disconnect-a.png" id="8_gs2be"]
|
||||
[ext_resource type="Texture2D" uid="uid://dnreyfh3cd1k2" path="res://data/состояние-исправности-1.png" id="8_isjua"]
|
||||
[ext_resource type="Shader" uid="uid://83fx15q1xlid" path="res://shaders/two-color.gdshader" id="9_71ec4"]
|
||||
[ext_resource type="Texture2D" uid="uid://b4isaggma6q3" path="res://data/Грани22.png" id="9_iqgf5"]
|
||||
[ext_resource type="Texture2D" uid="uid://c6booa8753u5t" path="res://data/состояние-исправности-2.png" id="9_ll0vs"]
|
||||
[ext_resource type="Texture2D" uid="uid://bktiige0i2lhl" path="res://data/У-РЭП-РПД-Н.png" id="9_qe1go"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2vf7en1jj8dv" path="res://data/У-РЭП-РПД-В.png" id="9_w6m6a"]
|
||||
[ext_resource type="Texture2D" uid="uid://u7h3l0jjrsnp" path="res://data/У-УФ.png" id="11_gjf0t"]
|
||||
[ext_resource type="Texture2D" uid="uid://00871pb6moln" path="res://data/прогресс-фон-1.png" id="9_w6m6a"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1k856fxhrjnh" path="res://data/прогресс-заполнение-1.png" id="10_lbx5w"]
|
||||
[ext_resource type="Script" uid="uid://bncy1x53jp73d" path="res://scenes/контроль/connect_pribor.gd" id="11_u7tym"]
|
||||
[ext_resource type="Texture2D" uid="uid://vdhmga62vjsj" path="res://data/АФСП-РТР.png" id="13_32yvq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dm350ta8noa0v" path="res://data/У-РЭП-РПД-К.png" id="16_32yvq"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3cyog3gy24ft" path="res://data/У-ЭП.png" id="16_gjf0t"]
|
||||
[ext_resource type="Texture2D" uid="uid://cllxcfa130vqu" path="res://data/УА-РЭП.png" id="22_1s34a"]
|
||||
[ext_resource type="Script" uid="uid://xjs7owe2iexn" path="res://scenes/контроль/control_prd.gd" id="18_lbx5w"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_iqgf5"]
|
||||
@@ -48,6 +56,9 @@ const PRIBORS_RES = \\
|
||||
}
|
||||
|
||||
|
||||
var cur_pribor_node = null
|
||||
|
||||
|
||||
func on_line_changed(u, conn_node, _pribor_meta): conn_node.set_val(u.online)
|
||||
func on_serv_changed(u, pribor_node, _pribor_meta): pribor_node.state = int(u.serviceability)
|
||||
var count_device_control_is_ready: int = 0
|
||||
@@ -62,6 +73,7 @@ func reset_pribor_buttons():
|
||||
var pribor_buttons: = get_tree().get_nodes_in_group('pribor_buttons')
|
||||
for node in pribor_buttons:
|
||||
node.button_pressed = false
|
||||
node.show_functional = false
|
||||
|
||||
|
||||
func _ready():
|
||||
@@ -124,6 +136,10 @@ func clean_pribor_items():
|
||||
|
||||
|
||||
func on_pribor_press(pribor_path, header_text, pribor_node):
|
||||
if cur_pribor_node:
|
||||
cur_pribor_node.show_functional = false
|
||||
$lbl_header/chk_show_functional.button_pressed = false
|
||||
cur_pribor_node = pribor_node
|
||||
clean_pribor_items()
|
||||
var pribor_obj = load(pribor_path)
|
||||
if not pribor_obj:
|
||||
@@ -153,6 +169,11 @@ func on_update_uf_serviceability(uf_serviceaability: bool, uf_pribor: Node)-> vo
|
||||
uf_pribor.state = 1 if uf_serviceaability else 2
|
||||
|
||||
|
||||
func _on_chk_show_functional_toggled(toggled_on: bool) -> void:
|
||||
if cur_pribor_node:
|
||||
cur_pribor_node.show_functional = toggled_on
|
||||
|
||||
|
||||
func _on_control_prd_pressed() -> void:
|
||||
count_device_control_is_ready = 0
|
||||
signaller.emit_signal('start_contol_device')
|
||||
@@ -173,9 +194,9 @@ func on_control_is_over(pribor_node: Node) -> void:
|
||||
if count_device_control_is_ready == 12:
|
||||
var time_dict = Time.get_datetime_dict_from_system()
|
||||
$control_prd.text = 'Контроль выполнен %02d:%02d/%02d.%02d' % [
|
||||
time_dict.hour,
|
||||
time_dict.minute,
|
||||
time_dict.day,
|
||||
time_dict.hour,
|
||||
time_dict.minute,
|
||||
time_dict.day,
|
||||
time_dict.month]
|
||||
$control_prd.disabled = false
|
||||
$control_prd.tooltip_text = 'Нажать для повторного контроля '
|
||||
@@ -195,6 +216,12 @@ animations = [{
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_71ec4"]
|
||||
shader = ExtResource("9_71ec4")
|
||||
shader_parameter/grey = Vector3(0.14, 0.13, 0.13)
|
||||
shader_parameter/orange = Vector3(0.95, 0.55, 0.05)
|
||||
shader_parameter/gamma = 2.0
|
||||
|
||||
[node name="Контроль" type="Panel"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -203,6 +230,8 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = SubResource("GDScript_iqgf5")
|
||||
metadata/_edit_lock_ = true
|
||||
metadata/_edit_vertical_guides_ = [21.0, 1578.0]
|
||||
metadata/_edit_horizontal_guides_ = [200.0, 51.0]
|
||||
|
||||
[node name="capsrpb" type="TextureRect" parent="." groups=["pribor_pics"]]
|
||||
editor_description = "Кнопка для отображения внешних соединений."
|
||||
@@ -423,6 +452,7 @@ patch_margin_right = 16
|
||||
patch_margin_bottom = 16
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_prd_n_1"]
|
||||
visible = false
|
||||
light_mask = 3
|
||||
position = Vector2(35, -10)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
@@ -453,6 +483,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_n_1"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1029.0
|
||||
offset_top = 9.0
|
||||
offset_right = 576.0
|
||||
offset_bottom = 830.0
|
||||
scale = Vector2(0.97094, 0.97094)
|
||||
texture = ExtResource("9_qe1go")
|
||||
|
||||
[node name="pribor_uf" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -506,6 +548,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_uf"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1155.0
|
||||
offset_top = -362.0
|
||||
offset_right = -96.0001
|
||||
offset_bottom = 311.0
|
||||
scale = Vector2(0.789429, 0.789429)
|
||||
texture = ExtResource("11_gjf0t")
|
||||
|
||||
[node name="pribor_rtr" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -568,6 +622,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_rtr"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1036.0
|
||||
offset_top = -394.0
|
||||
offset_right = 927.0
|
||||
offset_bottom = 595.0
|
||||
scale = Vector2(0.792688, 0.792688)
|
||||
texture = ExtResource("13_32yvq")
|
||||
|
||||
[node name="pribor_afsp_1" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -634,6 +700,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_afsp_1"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -5120.0
|
||||
offset_top = -895.0
|
||||
offset_right = -3157.0
|
||||
offset_bottom = 93.9999
|
||||
scale = Vector2(3.96323, 3.96323)
|
||||
texture = ExtResource("13_32yvq")
|
||||
|
||||
[node name="pribor_afsp_2" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -701,6 +779,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_afsp_2"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -6070.0
|
||||
offset_top = -900.0
|
||||
offset_right = -4107.0
|
||||
offset_bottom = 89.0001
|
||||
scale = Vector2(3.96409, 4.54663)
|
||||
texture = ExtResource("13_32yvq")
|
||||
|
||||
[node name="pribor_uyep" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -752,6 +842,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.872305
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_uyep"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1292.0
|
||||
offset_top = -365.0
|
||||
offset_right = 821.0
|
||||
offset_bottom = 764.0
|
||||
scale = Vector2(0.736875, 0.814493)
|
||||
texture = ExtResource("16_gjf0t")
|
||||
|
||||
[node name="pribor_prd_v_2" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -827,6 +929,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_v_2"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1419.0
|
||||
offset_top = -480.0
|
||||
offset_right = 173.0
|
||||
offset_bottom = 328.0
|
||||
scale = Vector2(0.977411, 0.977411)
|
||||
texture = ExtResource("9_w6m6a")
|
||||
|
||||
[node name="pribor_prd_n_2" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -874,6 +988,7 @@ patch_margin_right = 16
|
||||
patch_margin_bottom = 16
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_prd_n_2"]
|
||||
visible = false
|
||||
light_mask = 3
|
||||
position = Vector2(37, -10)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
@@ -881,6 +996,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_n_2"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1419.0
|
||||
offset_top = -145.0
|
||||
offset_right = 186.0
|
||||
offset_bottom = 676.0
|
||||
scale = Vector2(0.96888, 0.96888)
|
||||
texture = ExtResource("9_qe1go")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_n_2"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
@@ -956,6 +1083,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_k_2"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1418.0
|
||||
offset_top = -314.0
|
||||
offset_right = 345.0
|
||||
offset_bottom = 649.0
|
||||
scale = Vector2(0.881522, 0.881522)
|
||||
texture = ExtResource("16_32yvq")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_k_2"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
@@ -1054,6 +1193,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_v_3"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1026.0
|
||||
offset_top = -601.0
|
||||
offset_right = 566.0
|
||||
offset_bottom = 207.0
|
||||
scale = Vector2(0.975409, 0.975409)
|
||||
texture = ExtResource("9_w6m6a")
|
||||
|
||||
[node name="pribor_prd_n_3" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1129,6 +1280,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_n_3"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1302.0
|
||||
offset_top = -602.0
|
||||
offset_right = 303.0
|
||||
offset_bottom = 219.0
|
||||
scale = Vector2(0.969291, 0.969291)
|
||||
texture = ExtResource("9_qe1go")
|
||||
|
||||
[node name="pribor_prd_k_3" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1204,6 +1367,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_k_3"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1167.0
|
||||
offset_top = -602.0
|
||||
offset_right = 596.0
|
||||
offset_bottom = 361.0
|
||||
scale = Vector2(0.882165, 0.896739)
|
||||
texture = ExtResource("16_32yvq")
|
||||
|
||||
[node name="pribor_prd_v_1" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1256,6 +1431,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_v_1"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1304.0
|
||||
offset_top = 2.0
|
||||
offset_right = 288.0
|
||||
offset_bottom = 810.0
|
||||
scale = Vector2(0.974661, 0.974661)
|
||||
texture = ExtResource("9_w6m6a")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_v_1"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
@@ -1354,6 +1541,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_k_1"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1163.0
|
||||
offset_top = 10.0
|
||||
offset_right = 600.0
|
||||
offset_bottom = 973.0
|
||||
scale = Vector2(0.883479, 0.883479)
|
||||
texture = ExtResource("16_32yvq")
|
||||
|
||||
[node name="pribor_prd_v_4" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1428,6 +1627,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_v_4"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -923.0
|
||||
offset_top = -144.0
|
||||
offset_right = 669.0
|
||||
offset_bottom = 664.0
|
||||
scale = Vector2(0.976707, 0.976707)
|
||||
texture = ExtResource("9_w6m6a")
|
||||
|
||||
[node name="pribor_prd_n_4" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1502,6 +1713,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_n_4"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -919.0
|
||||
offset_top = -485.0
|
||||
offset_right = 686.0
|
||||
offset_bottom = 336.0
|
||||
scale = Vector2(0.968111, 0.968111)
|
||||
texture = ExtResource("9_qe1go")
|
||||
|
||||
[node name="pribor_prd_k_4" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1576,6 +1799,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_k_4"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -924.0
|
||||
offset_top = -315.0
|
||||
offset_right = 839.0
|
||||
offset_bottom = 648.0
|
||||
scale = Vector2(0.879295, 0.879295)
|
||||
texture = ExtResource("16_32yvq")
|
||||
|
||||
[node name="txr_legend0" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 316.0
|
||||
@@ -1644,6 +1879,16 @@ text = "Контроль исправности прибора"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="chk_show_functional" type="CheckButton" parent="lbl_header"]
|
||||
layout_mode = 0
|
||||
offset_left = 972.0
|
||||
offset_top = -1.0
|
||||
offset_right = 1351.0
|
||||
offset_bottom = 33.0
|
||||
theme_override_font_sizes/font_size = 22
|
||||
text = "Показть функциональную схему Э2"
|
||||
flat = true
|
||||
|
||||
[node name="connect_legend0" type="AnimatedSprite2D" parent="."]
|
||||
light_mask = 3
|
||||
position = Vector2(1219, 1151)
|
||||
@@ -1709,6 +1954,17 @@ text = "Запуск контроля"
|
||||
script = ExtResource("18_lbx5w")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="."]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -962.0
|
||||
offset_top = 73.0
|
||||
offset_right = 96.9999
|
||||
offset_bottom = 746.0
|
||||
scale = Vector2(5, 5)
|
||||
texture = ExtResource("22_1s34a")
|
||||
|
||||
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
|
||||
[connection signal="toggled" from="pribor_prd_n_1" to="pribor_prd_n_1" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_uf" to="pribor_uf" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_rtr" to="pribor_rtr" method="_on_toggled"]
|
||||
@@ -1727,3 +1983,4 @@ metadata/_edit_lock_ = true
|
||||
[connection signal="toggled" from="pribor_prd_n_4" to="pribor_prd_n_4" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_prd_k_4" to="pribor_prd_k_4" method="_on_toggled"]
|
||||
[connection signal="pressed" from="control_prd" to="." method="_on_control_prd_pressed"]
|
||||
[connection signal="toggled" from="lbl_header/chk_show_functional" to="." method="_on_chk_show_functional_toggled"]
|
||||
|
||||
@@ -56,6 +56,7 @@ var fs_selected: Dictionary ## Словарь выбранных сектор
|
||||
var fs_active: Dictionary ## Словарь секторов назначенных на подавление
|
||||
var fs_emit: Dictionary ## Словарь секторов назначенных на подавление
|
||||
var fs_closed: Dictionary ## Словарь для секторов запрета
|
||||
var fs_failed: Array ## Индикация сломанных секторов (модули ФС). AntBandState.ANT_BAND_READY - исправен, AntBandState.ANT_BAND_FAILURE - сломан.
|
||||
|
||||
## Состояние перетаскивания.
|
||||
enum DragFSM {
|
||||
@@ -79,6 +80,11 @@ enum MapViewMode {
|
||||
}
|
||||
|
||||
|
||||
enum AntBandState {
|
||||
ANT_BAND_READY = 1,
|
||||
ANT_BAND_FAILED = 0
|
||||
}
|
||||
|
||||
const VAL_TO_EVENT = {
|
||||
false: 'manual_control', ## Выбор целей и установка помех вручную.
|
||||
true: 'full_auto' } ## Выбор целей и установка помех автоматически.
|
||||
@@ -92,6 +98,12 @@ func on_threat_selected(th, ecm_btns): on_rto_threat_sel(th.id, ecm_btns)
|
||||
func on_enter_tree() -> void: call_deferred('on_button_strobe_pressed')
|
||||
|
||||
|
||||
func clear_all_klaster(): $canvas.clear_all_seczap()
|
||||
|
||||
|
||||
func on_user_panning(): $btn_center.button_pressed = false
|
||||
|
||||
|
||||
func on_settings_changed():
|
||||
gos_flag = ProjectSettings.get_setting('application/config/Включить работу по своим целям', true)
|
||||
color_emit = ProjectSettings.get_setting('application/interfer/emit_color', Color(0.58, 0.47, 0.51, 1.0))
|
||||
@@ -144,10 +156,18 @@ func _exit_tree() -> void:
|
||||
timer1.queue_free()
|
||||
|
||||
|
||||
func init_fs_failed():
|
||||
var sectors_count = $canvas.fs_default_colors.size()
|
||||
fs_failed.resize(sectors_count)
|
||||
for i in fs_failed.size():
|
||||
fs_failed[i] = AntBandState.ANT_BAND_READY
|
||||
|
||||
|
||||
## Производит инициализацию.
|
||||
func _ready():
|
||||
ProjectSettings.connect('settings_changed', on_settings_changed)
|
||||
on_settings_changed()
|
||||
init_fs_failed()
|
||||
min_zoom = ProjectSettings.get_setting('application/config/map_minimum_zoom', 5)
|
||||
max_zoom = ProjectSettings.get_setting('application/config/map_maximum_zoom', 19)
|
||||
drag_fsm = DragFSM.OFF
|
||||
@@ -188,16 +208,13 @@ func _ready():
|
||||
|
||||
|
||||
func sector_klaster(sector_data):
|
||||
if sector_data["draw"]:
|
||||
var rect: Rect2 = sector_data["rect"]
|
||||
var color: Color = sector_data["color"]
|
||||
var id: int = sector_data["index"]
|
||||
if sector_data['draw']:
|
||||
var rect: Rect2 = sector_data['rect']
|
||||
var color: Color = sector_data['color']
|
||||
var id: int = sector_data['index']
|
||||
$canvas.add_seczap(id, Vector4(rect.position.x, rect.position.y, rect.size.x, rect.size.y))
|
||||
$canvas.set_seczap_color(id, color)
|
||||
else:
|
||||
pass
|
||||
|
||||
func clear_all_klaster(): $canvas.clear_all_seczap()
|
||||
|
||||
func on_navi_data_received(data: Dictionary):
|
||||
var k = data.get('k', 0.0)
|
||||
@@ -205,10 +222,6 @@ func on_navi_data_received(data: Dictionary):
|
||||
course = k
|
||||
|
||||
|
||||
func on_user_panning():
|
||||
$btn_center.button_pressed = false
|
||||
|
||||
|
||||
func on_chk_interfer_prinuditelno(_interfer_sectors):
|
||||
$chk_auto.set_pressed_no_signal(false)
|
||||
on_value_changed(false)
|
||||
@@ -522,6 +535,7 @@ func update_fs_colors():
|
||||
else:
|
||||
fs_colors[key] = color_select
|
||||
$canvas.set_band_colors(fs_colors)
|
||||
$canvas.set_band_failures(fs_failed)
|
||||
if fs_emit.size():
|
||||
if $btn_activate.pressed:
|
||||
$btn_activate.self_modulate = Color.RED
|
||||
@@ -577,8 +591,9 @@ func on_interfer_prinuditelno(prenuditelno_sectors, btns):
|
||||
|
||||
|
||||
## Вызывается при получении информации о состоянии модулей ФС от КАПС РПБ.
|
||||
func on_fs_update_state(_fs_dict: Dictionary):
|
||||
pass
|
||||
func on_fs_update_state(fs_dict: Dictionary):
|
||||
for key in fs_dict.keys():
|
||||
fs_failed[key] = fs_dict[key].isg
|
||||
|
||||
|
||||
func on_btn_center_toggled(toggled_on: bool) -> void:
|
||||
|
||||
@@ -306,18 +306,18 @@ vertical_alignment = 1
|
||||
|
||||
[node name="coordinates_map" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 999.0
|
||||
offset_top = 128.0
|
||||
offset_right = 1111.0
|
||||
offset_bottom = 147.0
|
||||
offset_left = 660.0
|
||||
offset_top = -24.0
|
||||
offset_right = 772.0
|
||||
offset_bottom = -5.0
|
||||
text = "Координаты:"
|
||||
|
||||
[node name="scale_map" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 999.0
|
||||
offset_top = 202.0
|
||||
offset_right = 1109.0
|
||||
offset_bottom = 223.0
|
||||
offset_left = 1003.0
|
||||
offset_top = -24.0
|
||||
offset_right = 1113.0
|
||||
offset_bottom = -3.0
|
||||
text = "Масштаб:"
|
||||
|
||||
[node name="zoom_plus" type="Button" parent="."]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
extends Panel
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
var unit_trassa = network.get_unit_instance('уарэп-трасса')
|
||||
unit_trassa.connect('line_changed', Callable(self, 'on_trassa_line_changed'))
|
||||
@@ -8,30 +9,30 @@ func _ready() -> void:
|
||||
|
||||
func on_trassa_line_changed(unit_trassa):
|
||||
if unit_trassa.online:
|
||||
$"454/СостояниеРэс3".self_modulate = Color.WEB_GREEN
|
||||
$"СкруглённыйПрямоугольникБелый/Label3".text = 'Трасса'
|
||||
$"СкруглённыйПрямоугольникБелый/Label4".text = 'Трасса'
|
||||
$"СкруглённыйПрямоугольникБелый/Label5".text = 'Активный'
|
||||
$"СкруглённыйПрямоугольникБелый/Label6".text = str(unit_trassa.daa)
|
||||
$"СкруглённыйПрямоугольникБелый/Label7".text = str(unit_trassa.dap)
|
||||
$"СкруглённыйПрямоугольникБелый/Label8".text = '1'
|
||||
$"СкруглённыйПрямоугольникБелый/Label9".text = str(unit_trassa.lfb)
|
||||
$"СкруглённыйПрямоугольникБелый/Label10".text = str(unit_trassa.lfb)
|
||||
$'454/СостояниеРэс3'.self_modulate = Color.WEB_GREEN
|
||||
$'СкруглённыйПрямоугольникБелый/Label3'.text = 'Трасса'
|
||||
$'СкруглённыйПрямоугольникБелый/Label4'.text = 'Трасса'
|
||||
$'СкруглённыйПрямоугольникБелый/Label5'.text = 'Активный'
|
||||
$'СкруглённыйПрямоугольникБелый/Label6'.text = str(unit_trassa.daa)
|
||||
$'СкруглённыйПрямоугольникБелый/Label7'.text = str(unit_trassa.dap)
|
||||
$'СкруглённыйПрямоугольникБелый/Label8'.text = '1'
|
||||
$'СкруглённыйПрямоугольникБелый/Label9'.text = str(unit_trassa.lfb)
|
||||
$'СкруглённыйПрямоугольникБелый/Label10'.text = str(unit_trassa.lfb)
|
||||
else:
|
||||
$"454/СостояниеРэс3".self_modulate = Color.WHITE
|
||||
$"СкруглённыйПрямоугольникБелый/Label3".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label4".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label5".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label6".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label7".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label8".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label9".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label10".text = '-'
|
||||
$'454/СостояниеРэс3'.self_modulate = Color.WHITE
|
||||
$'СкруглённыйПрямоугольникБелый/Label3'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label4'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label5'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label6'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label7'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label8'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label9'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label10'.text = '-'
|
||||
|
||||
|
||||
func on_sector_klaster(_data, unit_trassa):
|
||||
$"СкруглённыйПрямоугольникБелый/Label6".text = str(unit_trassa.dap)
|
||||
$"СкруглённыйПрямоугольникБелый/Label7".text = str(unit_trassa.daa)
|
||||
$"СкруглённыйПрямоугольникБелый/Label8".text = '1'
|
||||
$"СкруглённыйПрямоугольникБелый/Label9".text = str(unit_trassa.lfb)
|
||||
$"СкруглённыйПрямоугольникБелый/Label10".text = str(unit_trassa.hfb)
|
||||
$'СкруглённыйПрямоугольникБелый/Label6'.text = str(unit_trassa.dap)
|
||||
$'СкруглённыйПрямоугольникБелый/Label7'.text = str(unit_trassa.daa)
|
||||
$'СкруглённыйПрямоугольникБелый/Label8'.text = '1'
|
||||
$'СкруглённыйПрямоугольникБелый/Label9'.text = str(unit_trassa.lfb)
|
||||
$'СкруглённыйПрямоугольникБелый/Label10'.text = str(unit_trassa.hfb)
|
||||
|
||||
@@ -93,6 +93,7 @@ const ID_INTERFERS_LEN = 63 ## Размер пула номеров целе
|
||||
const INTERFER_OFF = 'off'
|
||||
const INTERFER_IQFILE = 'IQ-файл'
|
||||
const POW_DEFAULT: float = 50.0
|
||||
const PERIOD_DEFAULT = 7.5
|
||||
var msg6_num: int = 0 ## Счётчик сообщений "тип 6"
|
||||
var msg8_num: int = 0 ## Счётчик сообщений "тип 8"
|
||||
var id_array: Array ## Массив id воздействий.
|
||||
@@ -215,7 +216,7 @@ func _ready() -> void:
|
||||
threats.connect('threats_resized', Callable(self, 'on_threats_resized'))
|
||||
threats.connect('threat_update', Callable(self, 'on_threats_update').bind(ecms, unit_caps))
|
||||
ProjectSettings.connect('settings_changed', on_settings_changed)
|
||||
var unit_nav = network.get_unit_instance('навигация')
|
||||
var unit_nav: = network.get_unit_instance('навигация')
|
||||
unit_nav.connect('data_received', on_nav_data_received.bind(unit_caps))
|
||||
|
||||
|
||||
@@ -389,10 +390,7 @@ func on_interfer_create(interfer_name, sel_threats, fs_arr, power, u, ecms) -> v
|
||||
if krp != '':
|
||||
interfer_name = krp
|
||||
set_rparams(item, param)
|
||||
if (param['width'] < settings.WIDTH_MIN):
|
||||
param['width'] = settings.WIDTH_MIN
|
||||
elif (param['width'] > settings.WIDTH_MAX):
|
||||
param['width'] = settings.WIDTH_MAX
|
||||
check_width(param)
|
||||
interfer_create(u, interfer_name, ecms, param, kni, id, thrs, SOURCE_INTERFER[0], power)
|
||||
|
||||
for item in fs_arr:
|
||||
@@ -401,10 +399,7 @@ func on_interfer_create(interfer_name, sel_threats, fs_arr, power, u, ecms) -> v
|
||||
var id = item[3]
|
||||
param['freq'] = item[1]
|
||||
param['width'] = item[2]
|
||||
if (param['width'] < settings.WIDTH_MIN):
|
||||
param['width'] = settings.WIDTH_MIN
|
||||
elif (param['width'] > settings.WIDTH_MAX):
|
||||
param['width'] = settings.WIDTH_MAX
|
||||
check_width(param)
|
||||
interfer_create(u, interfer_name, ecms, param, kni, id, fs, SOURCE_INTERFER[1], power)
|
||||
|
||||
|
||||
@@ -444,7 +439,7 @@ func interfer_create(u, interfer_name, ecms, param, kni, id, dict, source_interf
|
||||
var sz = ecms.size()
|
||||
var ispp: int = 0
|
||||
param['dur'] = 1.0 # Необходимо добавить параметры управления
|
||||
param['period'] = 1.0 # Необходимо добавить параметры управления
|
||||
param['period'] = param.get('period', PERIOD_DEFAULT)
|
||||
var key = dict.find_key(id)
|
||||
if source_interfer != SOURCE_INTERFER[2]:
|
||||
if key != null:
|
||||
@@ -580,9 +575,8 @@ func on_threats_update(threat, ecms, unit_caps):
|
||||
ecm.priority = threat.priority
|
||||
ecm.params['freq'] = threat.freq
|
||||
var width = threat.width * 1.5
|
||||
if width < settings.WIDTH_MIN:
|
||||
width = settings.WIDTH_MIN
|
||||
ecm.params['width'] = width
|
||||
check_width(ecm.params)
|
||||
if (threat.rkrp != '') and threat.fflags.rkrp and auto_enabled:
|
||||
var krp = get_krp(threat)
|
||||
if krp != '':
|
||||
@@ -619,12 +613,11 @@ func set_rparams(threat: threats.Threat, params: Dictionary):
|
||||
params['freq'] = threat.rparams['freq']
|
||||
else:
|
||||
params['freq'] = threat.freq
|
||||
if threat.rparams.has('period'):
|
||||
params['period'] = threat.rparams['period']
|
||||
if threat.rparams.has('width'):
|
||||
params['width'] = threat.rparams['width']
|
||||
params['width'] = threat.rparams['width'] * 1.5
|
||||
else:
|
||||
params['width'] = threat.width * 1.5
|
||||
check_width(params)
|
||||
if threat.rparams.has('filename'):
|
||||
params['filename'] = threat.rparams['filename']
|
||||
|
||||
@@ -695,3 +688,8 @@ func set_th_emit(th: threats.Threat, ecm: Interfer):
|
||||
return
|
||||
else:
|
||||
th.emit_state = 1
|
||||
|
||||
|
||||
func check_width(param: Dictionary):
|
||||
if (param['width'] < settings.WIDTH_MIN): param['width'] = settings.WIDTH_MIN
|
||||
elif (param['width'] > settings.WIDTH_MAX): param['width'] = settings.WIDTH_MAX
|
||||
|
||||
@@ -7,6 +7,9 @@ code = "shader_type canvas_item;
|
||||
|
||||
#define RADIUS_INNER_0 200.0 /* Радиус внутренний для режима приоритет РТО */
|
||||
#define RADIUS_INNER_1 480.0 /* Радиус внутренний для режима приоритет РЛС */
|
||||
#define ANTENAS_COUNT 28 /* Количество антенн */
|
||||
#define ANT_BAND_READY 1U /* Антенна (модуль ФС) готова или исправна */
|
||||
#define ANT_BAND_FAILED 0U /* Антенна (модуль ФС) не исправно */
|
||||
|
||||
uniform vec2 pc0 = vec2(560, 560); /* Центр сетки антенн */
|
||||
uniform float rotation: hint_range(0.0, 360.0) = 0.0; /* */
|
||||
@@ -14,9 +17,13 @@ uniform vec4 color0: source_color = vec4(0.38, 0.47, 0.51, 0.4);
|
||||
uniform vec4 color1: source_color = vec4(0.39, 0.44, 0.50, 0.4);
|
||||
uniform float radius_inner_0 = RADIUS_INNER_0;
|
||||
uniform float radius_inner_1 = RADIUS_INNER_1;
|
||||
uniform float radius_outter = 550.0; /* Радиус внешний. Должно быть равно ant_band_r1_6 */
|
||||
uniform float radius_outter = 550.0; /* Радиус внешний. Должно быть равно ant_band_r1_6 */
|
||||
uniform float alpha: hint_range(0.0, 1.0) = 0.5;
|
||||
uniform int mode = 0; /* Режим отображения. Приоритет РТО - 0, приоритет РЛС - 1 */
|
||||
uniform int mode = 0; /* Режим отображения. Приоритет РТО - 0, приоритет РЛС - 1 */
|
||||
uniform float ffr: hint_range(0.0, 1.0) = 0.2; /* Индикация неисправности модулей ФС. Заметность штриховки. */
|
||||
uniform float sfr: hint_range(0.0, 10.0) = 0.0; /* Индикация неисправности модулей ФС. Скорость движения штрховки */
|
||||
uniform float afr: hint_range(0.0, 180.0) = 0.0; /* Индикация неисправности модулей ФС. Наклон штрховки */
|
||||
uniform float pfr: hint_range(1.0, 20.0) = 10.0; /* Индикация неисправности модулей ФС. Частота штриховки */
|
||||
|
||||
const int ant_band_count_0 = 2;
|
||||
const int ant_band_count_1 = 2;
|
||||
@@ -42,7 +49,8 @@ const float ant_band_r1_4[] = {450.0, 530.0};
|
||||
const float ant_band_r1_5[] = {500.0, 540.0};
|
||||
const float ant_band_r1_6[] = {550.0, 550.0};
|
||||
|
||||
uniform vec4 ant_band_c[28];
|
||||
uniform vec4 ant_band_c[ANTENAS_COUNT];
|
||||
uniform uint ant_band_m[ANTENAS_COUNT];
|
||||
const float d4 = 90.0;
|
||||
const float ds = 1.0;
|
||||
|
||||
@@ -79,6 +87,12 @@ void antenas(inout vec4 c, vec2 uv, vec2 p0, int cnt, float r0, float r1, inout
|
||||
col.rgb = ant_band_c[j].rgb;
|
||||
index++;
|
||||
col.a = alpha + (random_timed(uv) - 0.5f) * ant_band_c[j].a;
|
||||
if (ant_band_m[j] == ANT_BAND_FAILED)
|
||||
{
|
||||
vec2 uvr = uv;
|
||||
rotate_vec2(uvr, radians(afr), pc0);
|
||||
col.a *= (1.0 - ffr) + tanh(10.0 * sin(TIME * sfr + 2.0 * PI * uvr.x / pfr)) * ffr;
|
||||
}
|
||||
float v = float(i & 1);
|
||||
vec4 color = v * col + (1.0f - v) * col;
|
||||
sector(c, uv, p0, float(i) * da, da, r0, r1, color);
|
||||
@@ -120,4 +134,9 @@ shader_parameter/radius_inner_1 = 480.0
|
||||
shader_parameter/radius_outter = 550.0
|
||||
shader_parameter/alpha = 0.5
|
||||
shader_parameter/mode = 0
|
||||
shader_parameter/ffr = 0.2
|
||||
shader_parameter/sfr = 0.0
|
||||
shader_parameter/afr = 0.0
|
||||
shader_parameter/pfr = 10.0
|
||||
shader_parameter/ant_band_c = PackedVector4Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
shader_parameter/ant_band_m = PackedInt32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
|
||||
|
||||
17
shaders/two-color.gdshader
Normal file
@@ -0,0 +1,17 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform vec3 grey = vec3(0.14, 0.13, 0.13);
|
||||
uniform vec3 orange = vec3(0.95, 0.55, 0.05);
|
||||
uniform float gamma = 2.0;
|
||||
|
||||
vec3 bw_to_2color(vec3 c, vec3 dark, vec3 light)
|
||||
{
|
||||
float l = pow(c.r * 0.2126 + c.g * 0.7152 + c.b * 0.0722, gamma);
|
||||
return mix(light, dark, l);
|
||||
}
|
||||
|
||||
|
||||
void fragment()
|
||||
{
|
||||
COLOR.rgb = bw_to_2color(texture(TEXTURE, UV).rgb, grey, orange);
|
||||
}
|
||||
1
shaders/two-color.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://83fx15q1xlid
|
||||
@@ -325,9 +325,10 @@ func _set_row_selected(i_row: int, selected: bool = true) -> void:
|
||||
var node = nodes[node_key]
|
||||
var selector = nodes[selector_key]
|
||||
nodes.erase(selector_key)
|
||||
if is_instance_valid(node) and is_instance_valid(selector):
|
||||
if selector.get_parent() == node:
|
||||
node.remove_child(selector)
|
||||
if is_instance_valid(selector):
|
||||
var prnt = selector.get_parent_control()
|
||||
if prnt:
|
||||
prnt.remove_child(selector)
|
||||
selector.queue_free()
|
||||
else:
|
||||
push_warning('обращение к удалённому элементу \"%s\"' % selector_key)
|
||||
|
||||