Доработка, отправка команды на поставноку помех. В процессе.
This commit is contained in:
@@ -6,11 +6,6 @@ func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
# Функция делает присваивает заданое значение видимости селектору
|
||||
func set_sel_visible(value: bool):
|
||||
$selector.visible = value
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://nl1vklubr5kr"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/bip.gd" id="1_dag5j"]
|
||||
[ext_resource type="Shader" path="res://shaders/bip.gdshader" id="2_7w7lp"]
|
||||
[ext_resource type="Shader" path="res://shaders/tracked.gdshader" id="3_p7omr"]
|
||||
[ext_resource type="Script" path="res://scenes/bip.gd" id="1_4t8mr"]
|
||||
[ext_resource type="Shader" path="res://shaders/bip.gdshader" id="2_17aco"]
|
||||
[ext_resource type="Shader" path="res://shaders/tracked.gdshader" id="3_fiufo"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2dulj"]
|
||||
shader = ExtResource("2_7w7lp")
|
||||
shader = ExtResource("2_17aco")
|
||||
shader_parameter/color = Color(0.972549, 0.12549, 0.411765, 1)
|
||||
shader_parameter/color_up = Color(1, 1, 1, 1)
|
||||
shader_parameter/tick_update = 0
|
||||
@@ -112,7 +112,7 @@ shader_parameter/speed = -73.0
|
||||
shader_parameter/ant_band_count_0 = 9
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lkrha"]
|
||||
shader = ExtResource("3_p7omr")
|
||||
shader = ExtResource("3_fiufo")
|
||||
shader_parameter/ColorFig = Color(0, 0.862745, 0, 1)
|
||||
shader_parameter/point_1 = Vector2(0.125, 0)
|
||||
shader_parameter/point_2 = Vector2(0.125, 0.036)
|
||||
@@ -130,9 +130,9 @@ shader_parameter/speed = 71.0
|
||||
[node name="threat" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
script = ExtResource("1_dag5j")
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
script = ExtResource("1_4t8mr")
|
||||
|
||||
[node name="bip" type="TextureButton" parent="."]
|
||||
material = SubResource("ShaderMaterial_2dulj")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://0uqi1ghf7sma"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c1maea6yhd3k7" path="res://data/кнопка-масштаб.png" id="1_qmk0r"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1maea6yhd3k7" path="res://data/кнопка-масштаб.png" id="1_vfah0"]
|
||||
|
||||
[node name="btn_scale" type="TextureButton"]
|
||||
self_modulate = Color(1, 1, 1, 0.509804)
|
||||
@@ -8,7 +8,7 @@ offset_right = 152.0
|
||||
offset_bottom = 18.0
|
||||
tooltip_text = "Измененяет масштаб"
|
||||
action_mode = 0
|
||||
texture_normal = ExtResource("1_qmk0r")
|
||||
texture_normal = ExtResource("1_vfah0")
|
||||
ignore_texture_size = true
|
||||
stretch_mode = 0
|
||||
metadata/i_scale = 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://da7w3vkhadfwe"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/nine-patch-button.gd" id="1_uqldr"]
|
||||
[ext_resource type="Texture2D" uid="uid://ct0ajcwno03h7" path="res://data/кнопка-квадрат-0.png" id="2_ak74m"]
|
||||
[ext_resource type="Script" path="res://scenes/nine-patch-button.gd" id="1_mm6jw"]
|
||||
[ext_resource type="Texture2D" uid="uid://ct0ajcwno03h7" path="res://data/кнопка-квадрат-0.png" id="2_yle0i"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="1"]
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
offset_right = 30.0
|
||||
offset_bottom = 30.0
|
||||
theme_override_styles/panel = SubResource("1")
|
||||
script = ExtResource("1_uqldr")
|
||||
script = ExtResource("1_mm6jw")
|
||||
toggle_mode = true
|
||||
|
||||
[node name="button" type="Button" parent="."]
|
||||
@@ -35,7 +35,7 @@ clip_text = true
|
||||
[node name="state" type="NinePatchRect" parent="."]
|
||||
show_behind_parent = true
|
||||
layout_mode = 2
|
||||
texture = ExtResource("2_ak74m")
|
||||
texture = ExtResource("2_yle0i")
|
||||
patch_margin_left = 10
|
||||
patch_margin_top = 10
|
||||
patch_margin_right = 10
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://b5kjdyxuwsot5"]
|
||||
|
||||
[ext_resource type="Material" uid="uid://s6xe8igevnv2" path="res://shaders/shader_edu.tres" id="1_41nty"]
|
||||
[ext_resource type="Script" path="res://scenes/canvas.gd" id="2_ci66x"]
|
||||
[ext_resource type="PackedScene" uid="uid://c73ahpv8uiuc7" path="res://scenes/sector.tscn" id="3_4r7tl"]
|
||||
[ext_resource type="Shader" path="res://shaders/sector.gdshader" id="4_4000y"]
|
||||
[ext_resource type="Material" uid="uid://s6xe8igevnv2" path="res://shaders/shader_edu.tres" id="1_itkeo"]
|
||||
[ext_resource type="Script" path="res://scenes/canvas.gd" id="2_clpjo"]
|
||||
[ext_resource type="PackedScene" uid="uid://c73ahpv8uiuc7" path="res://scenes/sector.tscn" id="3_kddns"]
|
||||
[ext_resource type="Shader" path="res://shaders/sector.gdshader" id="4_q0nxn"]
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_2bft1"]
|
||||
size = Vector2(1600, 1200)
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_uqrmv"]
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ys1x2"]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource("4_4000y")
|
||||
shader = ExtResource("4_q0nxn")
|
||||
shader_parameter/color = Color(1, 1, 1, 0.168627)
|
||||
shader_parameter/clip_color = Color(1, 0.5, 0.5, 1)
|
||||
shader_parameter/width = 45.0
|
||||
@@ -20,12 +20,12 @@ shader_parameter/dir = 0.0
|
||||
shader_parameter/inner_clip = 0.045
|
||||
|
||||
[node name="canvas" type="Sprite2D"]
|
||||
material = ExtResource("1_41nty")
|
||||
material = ExtResource("1_itkeo")
|
||||
texture = SubResource("PlaceholderTexture2D_2bft1")
|
||||
centered = false
|
||||
script = ExtResource("2_ci66x")
|
||||
script = ExtResource("2_clpjo")
|
||||
|
||||
[node name="строб" parent="." instance=ExtResource("3_4r7tl")]
|
||||
material = SubResource("ShaderMaterial_uqrmv")
|
||||
[node name="строб" parent="." instance=ExtResource("3_kddns")]
|
||||
material = SubResource("ShaderMaterial_ys1x2")
|
||||
position = Vector2(560, 560)
|
||||
scale = Vector2(1100, 1100)
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://7rvw671tlx2i"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://7rvw671tlx2i"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="1_rrqe5"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="2_jufhc"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="3_o3p72"]
|
||||
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="1_6swor"]
|
||||
[ext_resource type="Script" path="res://scenes/scroll-ecm-list.gd" id="2_3x81o"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="3_4hydx"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="4_7ys3c"]
|
||||
|
||||
[node name="frm_ecm_list" type="NinePatchRect"]
|
||||
offset_right = 480.0
|
||||
offset_bottom = 288.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("1_rrqe5")
|
||||
texture = ExtResource("1_6swor")
|
||||
patch_margin_left = 15
|
||||
patch_margin_top = 30
|
||||
patch_margin_right = 15
|
||||
@@ -33,10 +34,11 @@ offset_left = 8.0
|
||||
offset_top = 57.0
|
||||
offset_right = 472.0
|
||||
offset_bottom = 237.0
|
||||
script = ExtResource("2_3x81o")
|
||||
|
||||
[node name="table" type="GridContainer" parent="scroll"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("2_jufhc")
|
||||
script = ExtResource("3_4hydx")
|
||||
|
||||
[node name="grd_forced" type="GridContainer" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -46,7 +48,7 @@ offset_right = 472.0
|
||||
offset_bottom = 281.0
|
||||
columns = 4
|
||||
|
||||
[node name="btn_srn" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("3_o3p72")]
|
||||
[node name="btn_srn" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("4_7ys3c")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
@@ -54,7 +56,7 @@ tooltip_text = "Включает принудительную помеху"
|
||||
text = "СРН"
|
||||
metadata/rfi_name = "ozp1"
|
||||
|
||||
[node name="btn_jtids" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("3_o3p72")]
|
||||
[node name="btn_jtids" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("4_7ys3c")]
|
||||
editor_description = "Кнопка для принудительного включения группы секторов в режим JTIDS"
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
@@ -62,7 +64,7 @@ size_flags_vertical = 3
|
||||
text = "JTIDS"
|
||||
metadata/rfi_name = "ozp1"
|
||||
|
||||
[node name="btn_kupd" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("3_o3p72")]
|
||||
[node name="btn_kupd" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("4_7ys3c")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
@@ -70,7 +72,7 @@ tooltip_text = "Кнопка для принудительного включе
|
||||
text = "КУПД"
|
||||
metadata/rfi_name = "ozp1"
|
||||
|
||||
[node name="btn_cancel" parent="grd_forced" groups=["прин-секторы-срн"] instance=ExtResource("3_o3p72")]
|
||||
[node name="btn_cancel" parent="grd_forced" groups=["прин-секторы-срн"] instance=ExtResource("4_7ys3c")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b1o10yvgjpb0j"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="1_wpofl"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="2_0mbgy"]
|
||||
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="1_q1ow7"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="2_82yax"]
|
||||
|
||||
[node name="frm_ecm_params" type="NinePatchRect"]
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("1_wpofl")
|
||||
texture = ExtResource("1_q1ow7")
|
||||
patch_margin_left = 15
|
||||
patch_margin_top = 30
|
||||
patch_margin_right = 15
|
||||
@@ -33,4 +33,4 @@ offset_bottom = 282.0
|
||||
|
||||
[node name="table" type="GridContainer" parent="scroll"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("2_0mbgy")
|
||||
script = ExtResource("2_82yax")
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://t54wukutvmjq"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="1_3vj3c"]
|
||||
[ext_resource type="Script" path="res://scenes/scroll-params.gd" id="2_go6hj"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="3_07em2"]
|
||||
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="1_65sy4"]
|
||||
[ext_resource type="Script" path="res://scenes/scroll-params.gd" id="2_f8bq4"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="3_y0507"]
|
||||
|
||||
[node name="frm_params" type="NinePatchRect"]
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("1_3vj3c")
|
||||
texture = ExtResource("1_65sy4")
|
||||
patch_margin_left = 15
|
||||
patch_margin_top = 30
|
||||
patch_margin_right = 15
|
||||
@@ -31,8 +31,8 @@ offset_left = 4.0
|
||||
offset_top = 27.0
|
||||
offset_right = 476.0
|
||||
offset_bottom = 282.0
|
||||
script = ExtResource("2_go6hj")
|
||||
script = ExtResource("2_f8bq4")
|
||||
|
||||
[node name="table" type="GridContainer" parent="scroll"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("3_07em2")
|
||||
script = ExtResource("3_y0507")
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bsd67ktk8xp5a"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="1_sbj4k"]
|
||||
[ext_resource type="Script" path="res://scenes/scroll-threats.gd" id="2_7amn7"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="3_u1k3o"]
|
||||
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="1_m3no0"]
|
||||
[ext_resource type="Script" path="res://scenes/scroll-threats.gd" id="2_empn3"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="3_4bupu"]
|
||||
|
||||
[node name="frm_threats" type="NinePatchRect"]
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("1_sbj4k")
|
||||
texture = ExtResource("1_m3no0")
|
||||
patch_margin_left = 15
|
||||
patch_margin_top = 30
|
||||
patch_margin_right = 15
|
||||
@@ -31,9 +31,9 @@ offset_left = 4.0
|
||||
offset_top = 51.0
|
||||
offset_right = 476.0
|
||||
offset_bottom = 282.0
|
||||
script = ExtResource("2_7amn7")
|
||||
script = ExtResource("2_empn3")
|
||||
|
||||
[node name="table" type="GridContainer" parent="scroll"]
|
||||
layout_mode = 2
|
||||
columns = 4
|
||||
script = ExtResource("3_u1k3o")
|
||||
script = ExtResource("3_4bupu")
|
||||
|
||||
@@ -1,105 +1,105 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://cnkbk53mi7viu"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="1_ufj4t"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="1_uiv1n"]
|
||||
|
||||
[node name="grd_btns" type="GridContainer"]
|
||||
offset_right = 1096.0
|
||||
offset_bottom = 54.0
|
||||
columns = 14
|
||||
|
||||
[node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "Откл."
|
||||
pressed = true
|
||||
metadata/rfi_name = "<off>"
|
||||
metadata/rfi_name = "off"
|
||||
|
||||
[node name="btn_auto_rfi" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_auto_rfi" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "Автомат"
|
||||
metadata/rfi_name = "<auto>"
|
||||
metadata/rfi_name = "auto"
|
||||
|
||||
[node name="btn_p12" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p12" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "МЧМ-1"
|
||||
metadata/rfi_name = "mchm1"
|
||||
|
||||
[node name="btn_p16" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p16" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "СРН-И1"
|
||||
metadata/rfi_name = "srni1"
|
||||
|
||||
[node name="btn_p15" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p15" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "СРН-М2"
|
||||
metadata/rfi_name = "srnm2"
|
||||
|
||||
[node name="btn_p14" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p14" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "ПД-М4"
|
||||
metadata/rfi_name = "pdm4"
|
||||
|
||||
[node name="btn_p13" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p13" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "ПД-М2"
|
||||
metadata/rfi_name = "pdm2"
|
||||
|
||||
[node name="btn_p11" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p11" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "ЛЧМ-1"
|
||||
metadata/rfi_name = "lchm1"
|
||||
|
||||
[node name="btn_p10" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p10" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "ПД-М4С"
|
||||
metadata/rfi_name = "pdm4s"
|
||||
|
||||
[node name="btn_p9" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p9" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "ПД-ЧМ"
|
||||
metadata/rfi_name = "pdchm"
|
||||
|
||||
[node name="btn_p8" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p8" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "СВ-И1"
|
||||
metadata/rfi_name = "svi1"
|
||||
|
||||
[node name="btn_p7" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p7" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "K1"
|
||||
metadata/rfi_name = "k1"
|
||||
|
||||
[node name="btn_p6" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p6" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "СВ-М2"
|
||||
metadata/rfi_name = "svm2"
|
||||
|
||||
[node name="btn_p5" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_ufj4t")]
|
||||
[node name="btn_p5" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_uiv1n")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dem3fcec25awh"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bsd67ktk8xp5a" path="res://scenes/frm_threats.tscn" id="1_fxbx3"]
|
||||
[ext_resource type="PackedScene" uid="uid://t54wukutvmjq" path="res://scenes/frm_params.tscn" id="2_2jld7"]
|
||||
[ext_resource type="PackedScene" uid="uid://7rvw671tlx2i" path="res://scenes/frm_ecm_list.tscn" id="3_lrpuw"]
|
||||
[ext_resource type="PackedScene" uid="uid://b1o10yvgjpb0j" path="res://scenes/frm_ecm_params.tscn" id="4_tqj2i"]
|
||||
[ext_resource type="PackedScene" uid="uid://bsd67ktk8xp5a" path="res://scenes/frm_threats.tscn" id="1_swvxc"]
|
||||
[ext_resource type="PackedScene" uid="uid://t54wukutvmjq" path="res://scenes/frm_params.tscn" id="2_1dbju"]
|
||||
[ext_resource type="PackedScene" uid="uid://7rvw671tlx2i" path="res://scenes/frm_ecm_list.tscn" id="3_pdajn"]
|
||||
[ext_resource type="PackedScene" uid="uid://b1o10yvgjpb0j" path="res://scenes/frm_ecm_params.tscn" id="4_pmt7h"]
|
||||
|
||||
[node name="grd_side" type="GridContainer"]
|
||||
offset_left = 1112.0
|
||||
@@ -11,14 +11,14 @@ offset_top = 6.0
|
||||
offset_right = 1592.0
|
||||
offset_bottom = 1169.0
|
||||
|
||||
[node name="frm_threats" parent="." instance=ExtResource("1_fxbx3")]
|
||||
[node name="frm_threats" parent="." instance=ExtResource("1_swvxc")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="frm_params" parent="." instance=ExtResource("2_2jld7")]
|
||||
[node name="frm_params" parent="." instance=ExtResource("2_1dbju")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="frm_ecm_list" parent="." instance=ExtResource("3_lrpuw")]
|
||||
[node name="frm_ecm_list" parent="." instance=ExtResource("3_pdajn")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="frm_ecm_params" parent="." instance=ExtResource("4_tqj2i")]
|
||||
[node name="frm_ecm_params" parent="." instance=ExtResource("4_pmt7h")]
|
||||
layout_mode = 2
|
||||
|
||||
49
scenes/scroll-ecm-list.gd
Normal file
49
scenes/scroll-ecm-list.gd
Normal file
@@ -0,0 +1,49 @@
|
||||
extends ScrollContainer
|
||||
|
||||
|
||||
## Отображает список помех в таблице.
|
||||
const CellLineEdit = preload('res://scenes/ячейка-2.tscn') ## Ячейка таблицы.
|
||||
const TableHeader = preload('res://table/header.tscn') ## Ячейка заголовок таблицы.
|
||||
|
||||
const TABLE_HEADER = [ TableHeader, TableHeader, TableHeader, TableHeader , TableHeader ] ## Описание ряда заголовка.
|
||||
const TABLE_ROW = [ CellLineEdit, CellLineEdit, CellLineEdit, CellLineEdit , CellLineEdit ] ## Описание ряда.
|
||||
const TABLE_HEADERS_TEXT = ['Номер', 'Название', 'Частота, МГц', 'Пеленг', 'Состояние' ] ## Заголовки таблицы.
|
||||
const TABLE_COLUMN_SIZE = [ 65, 80, 120, 80, 90 ] ## Ширины колонок.
|
||||
|
||||
## Состояние выполнения сеанса помехи
|
||||
const INTERFER_STATE = {
|
||||
0: 'Подготовка',
|
||||
1: 'Выполняется',
|
||||
2: 'Ошибка',
|
||||
3: 'Занято',
|
||||
4: 'Неисправность',
|
||||
5: 'Передача' }
|
||||
|
||||
## Индексы колонок
|
||||
const COLUMN_NUMBER = 0
|
||||
const COLUMN_NAME = 1
|
||||
const COLUMN_FREQ = 2
|
||||
const COLUMN_AOA = 3
|
||||
const COLUMN_STATE = 4
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
var table_index: = Dictionary()
|
||||
signaller.connect('interfer_new', Callable(self, 'on_interfer_new').bind(table_index))
|
||||
call_deferred('init_table')
|
||||
|
||||
|
||||
func init_table():
|
||||
$table.set_header(TABLE_HEADER)
|
||||
$table.set_header_text(TABLE_HEADERS_TEXT)
|
||||
$table.set_columns_min_size(TABLE_COLUMN_SIZE)
|
||||
$table.pin_header(self, get_parent())
|
||||
|
||||
|
||||
func on_interfer_new(ecm, table_index):
|
||||
print_debug()
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
@@ -1,32 +1,32 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://3slb0i3pvowc"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/tab-switch.gd" id="1_ddefd"]
|
||||
[ext_resource type="PackedScene" uid="uid://b276iygic5itk" path="res://scenes/работа.tscn" id="2_dgwu2"]
|
||||
[ext_resource type="PackedScene" uid="uid://lwmw4egynmd1" path="res://scenes/контроль.tscn" id="3_wh23t"]
|
||||
[ext_resource type="PackedScene" uid="uid://trt0q8th3bn2" path="res://scenes/журнал.tscn" id="4_38go3"]
|
||||
[ext_resource type="PackedScene" uid="uid://dab6loryocc73" path="res://scenes/эмс.tscn" id="5_qasm0"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnptm4rlp60dq" path="res://scenes/настройки.tscn" id="6_h83md"]
|
||||
[ext_resource type="Script" path="res://scenes/tab-switch.gd" id="1_fg0vd"]
|
||||
[ext_resource type="PackedScene" uid="uid://b276iygic5itk" path="res://scenes/работа.tscn" id="2_u7p16"]
|
||||
[ext_resource type="PackedScene" uid="uid://lwmw4egynmd1" path="res://scenes/контроль.tscn" id="3_txp0s"]
|
||||
[ext_resource type="PackedScene" uid="uid://trt0q8th3bn2" path="res://scenes/журнал.tscn" id="4_cu5k8"]
|
||||
[ext_resource type="PackedScene" uid="uid://dab6loryocc73" path="res://scenes/эмс.tscn" id="5_u71bh"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnptm4rlp60dq" path="res://scenes/настройки.tscn" id="6_i8iv3"]
|
||||
|
||||
[node name="tab_switch" type="TabContainer"]
|
||||
offset_right = 1600.0
|
||||
offset_bottom = 1200.0
|
||||
script = ExtResource("1_ddefd")
|
||||
script = ExtResource("1_fg0vd")
|
||||
|
||||
[node name="Работа" parent="." instance=ExtResource("2_dgwu2")]
|
||||
[node name="Работа" parent="." instance=ExtResource("2_u7p16")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Контроль" parent="." instance=ExtResource("3_wh23t")]
|
||||
[node name="Контроль" parent="." instance=ExtResource("3_txp0s")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Журнал" parent="." instance=ExtResource("4_38go3")]
|
||||
[node name="Журнал" parent="." instance=ExtResource("4_cu5k8")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ЭМС" parent="." instance=ExtResource("5_qasm0")]
|
||||
[node name="ЭМС" parent="." instance=ExtResource("5_u71bh")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Настройки" parent="." instance=ExtResource("6_h83md")]
|
||||
[node name="Настройки" parent="." instance=ExtResource("6_i8iv3")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
@@ -127,6 +127,7 @@ func on_button_strobe_pressed() -> void:
|
||||
## Поведение радиокнопок в группе. Управляет состоянием кнопок в радиогруппе
|
||||
func on_button_pressed(btn_this, btn_others) -> void:
|
||||
for btn_other in btn_others: btn_other.set_pressed(btn_this == btn_other)
|
||||
signaller.emit_signal('interfer_init', btn_this)
|
||||
|
||||
|
||||
## Возвращает ширину строба по направлению
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://b276iygic5itk"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/работа.gd" id="1_rb8fv"]
|
||||
[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_1ntlf"]
|
||||
[ext_resource type="PackedScene" uid="uid://dem3fcec25awh" path="res://scenes/grd_side.tscn" id="3_6vmv5"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="4_7dvd8"]
|
||||
[ext_resource type="PackedScene" uid="uid://cnkbk53mi7viu" path="res://scenes/grd_btns.tscn" id="5_kpx5b"]
|
||||
[ext_resource type="PackedScene" uid="uid://dymo732qc2doa" path="res://scenes/count_all_pad.tscn" id="6_x6urv"]
|
||||
[ext_resource type="PackedScene" uid="uid://bwti82byphl68" path="res://scenes/count_danger_pad.tscn" id="7_b0iag"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="8_cha28"]
|
||||
[ext_resource type="PackedScene" uid="uid://0uqi1ghf7sma" path="res://scenes/btn_scale.tscn" id="9_e8unk"]
|
||||
[ext_resource type="PackedScene" uid="uid://bbq6nklh36yij" path="res://scenes/tilemap.tscn" id="10_rp4rk"]
|
||||
[ext_resource type="Shader" path="res://shaders/tilemap.gdshader" id="11_ked7m"]
|
||||
[ext_resource type="Script" path="res://scenes/работа.gd" id="1_niok4"]
|
||||
[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_br3s6"]
|
||||
[ext_resource type="PackedScene" uid="uid://dem3fcec25awh" path="res://scenes/grd_side.tscn" id="3_s2j0e"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="4_lryxs"]
|
||||
[ext_resource type="PackedScene" uid="uid://cnkbk53mi7viu" path="res://scenes/grd_btns.tscn" id="5_2jnbs"]
|
||||
[ext_resource type="PackedScene" uid="uid://dymo732qc2doa" path="res://scenes/count_all_pad.tscn" id="6_e3re7"]
|
||||
[ext_resource type="PackedScene" uid="uid://bwti82byphl68" path="res://scenes/count_danger_pad.tscn" id="7_2arls"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="8_k0iv2"]
|
||||
[ext_resource type="PackedScene" uid="uid://0uqi1ghf7sma" path="res://scenes/btn_scale.tscn" id="9_oey3x"]
|
||||
[ext_resource type="PackedScene" uid="uid://bbq6nklh36yij" path="res://scenes/tilemap.tscn" id="10_gtwyg"]
|
||||
[ext_resource type="Shader" path="res://shaders/tilemap.gdshader" id="11_ekapd"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_xpefk"]
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2t5si"]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource("11_ked7m")
|
||||
shader = ExtResource("11_ekapd")
|
||||
shader_parameter/radius = 0.4
|
||||
|
||||
[node name="Работа" type="Panel"]
|
||||
script = ExtResource("1_rb8fv")
|
||||
Bip = ExtResource("2_1ntlf")
|
||||
script = ExtResource("1_niok4")
|
||||
Bip = ExtResource("2_br3s6")
|
||||
col_grey = Color(0.34902, 0.643137, 0.772549, 0.168627)
|
||||
col_red = Color(1, 0.568627, 0.431373, 0.239216)
|
||||
drag_scale_band = 0.05
|
||||
@@ -36,7 +36,7 @@ strob_min_width = 5.0
|
||||
metadata/_edit_vertical_guides_ = []
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="grd_side" parent="." instance=ExtResource("3_6vmv5")]
|
||||
[node name="grd_side" parent="." instance=ExtResource("3_s2j0e")]
|
||||
layout_mode = 0
|
||||
offset_left = 1114.0
|
||||
offset_top = 7.0
|
||||
@@ -44,10 +44,10 @@ offset_right = 1594.0
|
||||
offset_bottom = 1170.0
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="canvas" parent="." instance=ExtResource("4_7dvd8")]
|
||||
[node name="canvas" parent="." instance=ExtResource("4_lryxs")]
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="grd_btns" parent="." instance=ExtResource("5_kpx5b")]
|
||||
[node name="grd_btns" parent="." instance=ExtResource("5_2jnbs")]
|
||||
layout_mode = 0
|
||||
offset_left = 10.0
|
||||
offset_top = 1116.0
|
||||
@@ -55,14 +55,14 @@ offset_right = 1106.0
|
||||
offset_bottom = 1170.0
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="count_all_pad" parent="." instance=ExtResource("6_x6urv")]
|
||||
[node name="count_all_pad" parent="." instance=ExtResource("6_e3re7")]
|
||||
layout_mode = 0
|
||||
offset_left = 100.0
|
||||
offset_top = 117.0
|
||||
offset_right = 133.0
|
||||
offset_bottom = 140.0
|
||||
|
||||
[node name="count_danger_pad" parent="." instance=ExtResource("7_b0iag")]
|
||||
[node name="count_danger_pad" parent="." instance=ExtResource("7_2arls")]
|
||||
layout_mode = 0
|
||||
offset_left = 96.0
|
||||
offset_top = 29.0
|
||||
@@ -94,7 +94,7 @@ offset_right = 83.0
|
||||
offset_bottom = 72.0
|
||||
text = "Опасных:"
|
||||
|
||||
[node name="btn_auto_threat" parent="." instance=ExtResource("8_cha28")]
|
||||
[node name="btn_auto_threat" parent="." instance=ExtResource("8_k0iv2")]
|
||||
layout_mode = 0
|
||||
offset_left = 1034.0
|
||||
offset_top = 7.0
|
||||
@@ -104,7 +104,7 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "Автомат"
|
||||
|
||||
[node name="btn_strob" parent="." instance=ExtResource("8_cha28")]
|
||||
[node name="btn_strob" parent="." instance=ExtResource("8_k0iv2")]
|
||||
layout_mode = 2
|
||||
offset_left = 1034.0
|
||||
offset_top = 67.0
|
||||
@@ -115,7 +115,7 @@ size_flags_vertical = 3
|
||||
tooltip_text = "Кнопка для выбора сектора при помощи клика мышкой"
|
||||
text = "Строб"
|
||||
|
||||
[node name="btn_view" parent="." instance=ExtResource("8_cha28")]
|
||||
[node name="btn_view" parent="." instance=ExtResource("8_k0iv2")]
|
||||
layout_mode = 2
|
||||
offset_left = 874.0
|
||||
offset_top = 1023.0
|
||||
@@ -125,15 +125,15 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "Вид"
|
||||
|
||||
[node name="btn_scale" parent="." instance=ExtResource("9_e8unk")]
|
||||
[node name="btn_scale" parent="." instance=ExtResource("9_oey3x")]
|
||||
layout_mode = 0
|
||||
offset_left = 952.0
|
||||
offset_top = 1038.0
|
||||
offset_right = 1104.0
|
||||
offset_bottom = 1056.0
|
||||
|
||||
[node name="tilemap" parent="." instance=ExtResource("10_rp4rk")]
|
||||
material = SubResource("ShaderMaterial_xpefk")
|
||||
[node name="tilemap" parent="." instance=ExtResource("10_gtwyg")]
|
||||
material = SubResource("ShaderMaterial_2t5si")
|
||||
|
||||
[connection signal="drag_begin" from="." to="." method="_on_drag_begin"]
|
||||
[connection signal="drag_continue" from="." to="." method="_on_drag_continue"]
|
||||
|
||||
@@ -15,10 +15,12 @@ class CapsRpb:
|
||||
signal parse_error(unit: CapsRpb, msg: String) ## Сигнал ошибки разбора сообщения
|
||||
|
||||
static var json_conv: = JSON.new()
|
||||
var online: = false ## Состояние связи с источником сообщений
|
||||
var name: String ## Имя экземпляра
|
||||
var json_dic: Dictionary ## Аппарат для разбора сообщений
|
||||
var tick: = 0 ## Тик время последнего обновления, мс
|
||||
var online: = false ## Состояние связи с источником сообщений
|
||||
var name: String ## Имя экземпляра
|
||||
var json_dic: Dictionary ## Аппарат для разбора сообщений
|
||||
var tick: = 0 ## Тик время последнего обновления, мс
|
||||
var tx_data: = PackedByteArray() ## Пакет для отправки
|
||||
var tx_stack: Array ## Массив пакетов для отправки
|
||||
|
||||
func _to_string() -> String: return String('капсрпб: "%s" %s ' % [self.name, ['отключен', 'на связи'][int(online)]])
|
||||
func _init(nm): self.name = nm
|
||||
@@ -40,3 +42,9 @@ class CapsRpb:
|
||||
if online and ((now_tick - tick) > ONLINE_TIMEOUT):
|
||||
online = false
|
||||
emit_signal('line_changed', self)
|
||||
if len(tx_stack):
|
||||
tx_data = tx_stack[0]
|
||||
tx_stack.remove_at(0)
|
||||
return Error.OK
|
||||
else:
|
||||
return Error.ERR_UNAVAILABLE
|
||||
|
||||
@@ -2,14 +2,6 @@ extends Node
|
||||
|
||||
## Представление помехи
|
||||
|
||||
## Состояние выполнения сеанса помехи
|
||||
const INTERFER_STATE = {
|
||||
0: 'идёт подготовка к выполнению',
|
||||
1: 'выполняется',
|
||||
2: 'не выполнена по причине ошибки в команде',
|
||||
3: 'не выполнена по причине занятости',
|
||||
4: 'не выполнена по причине_неисправности' }
|
||||
|
||||
|
||||
## Режимы помехи
|
||||
const ITERFER_MODE = {
|
||||
@@ -26,19 +18,39 @@ const ITERFER_MODE = {
|
||||
'k1': ['K1', ['freq', 'width', 'dur', 'period']],
|
||||
'ozp1': ['ОЗП-1', ['freq', 'width']] }
|
||||
|
||||
const ID_INTERFERS_LEN = 63 ## Размер пула номеров целей
|
||||
var msg_ss: int = 0 ## счётчик сообщений
|
||||
var id_array: Array ## Массив id воздействий
|
||||
var thrs: Dictionary ## Словарь воздействия для целей, ключ - id воздействия
|
||||
|
||||
|
||||
## Сеанс помехи
|
||||
class Interfer:
|
||||
var ss: int = 0 ## Счётчик сообщений.
|
||||
var ispp: int = 0 ## Индекс сеанса.
|
||||
var state: = 0 ## Состояние сеанса. Ответ КАПСРПБ. Возможные значения в [param ITERFER_STATE].
|
||||
var svk: = 0 ## Состояние сеанса. Ответ КАПСРПБ. Возможные значения в [param ITERFER_STATE].
|
||||
var krp: String = '' ## Тип помехи. Возможные значения в [param INTERFER_MODE].
|
||||
var powp: float = 0.0 ## Мощность излучения выраженная в процентах.
|
||||
var kni: = 0.0 ## Курсовой угол направления излучения.
|
||||
var params: = {} ## Параметры помехи.
|
||||
var get: Array[String] ## Запрос массива параметров (список запрошенных параметров).
|
||||
var retss: int ## Значение счётчика сообщения в котором был произведён запрос массива параметров.
|
||||
var tick_rx: int ## Тик время обновления цели, мс.
|
||||
|
||||
func get_msg6_data():
|
||||
var data_to_json : Dictionary = {}
|
||||
data_to_json['ts'] = 6
|
||||
data_to_json['ss'] = ss
|
||||
data_to_json['ispp'] = ispp
|
||||
data_to_json['krp'] = krp
|
||||
if krp != 'off':
|
||||
data_to_json['kni'] = kni
|
||||
data_to_json['powp'] = powp # Необходимо добавить управление мощностью
|
||||
data_to_json['get'] = []
|
||||
data_to_json['params'] = params
|
||||
var json = JSON.new().stringify(data_to_json)
|
||||
var pac = json.to_utf8_buffer()
|
||||
return pac
|
||||
|
||||
func set_from_dic(dic: Dictionary):
|
||||
var names: = tools.get_members_names(self)
|
||||
@@ -49,10 +61,18 @@ signal interfer_preparing(ecm: Interfer) ## Вызывается в м
|
||||
signal interfer_run(ecm: Interfer) ## Вызывается в момент начала работы помехи.
|
||||
signal interfer_error(ecm: Interfer, msg: String) ## Вызывается при ошибке.
|
||||
signal interfer_update(ecm: Interfer) ## Вызывается при обновлении помехи.
|
||||
signal interfer_new(ecm: Interfer) ## Вызывается при создании новой помехи.
|
||||
signal interfer_resized(ecms: Dictionary) ## Вызывается при изменении количества сеансов помех.
|
||||
|
||||
|
||||
func _ready():
|
||||
var ecms: Dictionary = {} ## Словарь помех
|
||||
for i in range(ID_INTERFERS_LEN): # Заполняет массив ID целей
|
||||
id_array.append(i+1)
|
||||
var unit_key = repsettings.get_unit_key('уарэп-капсрпб-отп')
|
||||
var unit = repnetwork.units[unit_key]
|
||||
signaller.connect('interfer_create', Callable(self, 'on_interfer_create').bind(unit, ecms))
|
||||
|
||||
|
||||
## Производит приём состояния помех. [param unit] -> [param ecms]
|
||||
func on_data_capsrpb_received(unit: capsrpb.CapsRpb, ecms: Dictionary):
|
||||
if not unit.json_dic.has('ts'): return
|
||||
@@ -77,6 +97,53 @@ func on_data_capsrpb_received(unit: capsrpb.CapsRpb, ecms: Dictionary):
|
||||
ecm.set_from_dic(dic_msvk)
|
||||
ecms[ispp] = ecm
|
||||
ecm.tick_rx = unit.tick
|
||||
call_deferred('emit_signal', 'interfer_new', ecm)
|
||||
if sz != ecms.size():
|
||||
call_deferred('emit_signal', 'interfer_resized', ecms)
|
||||
|
||||
|
||||
## Вызыватся, когда пользователь выбрал помеху и выбраны цели
|
||||
func on_interfer_create(btn, sel_threats, unit, ecms):
|
||||
for item in sel_threats:
|
||||
var ispp: int = 0
|
||||
var interfer_name: String = btn.get_meta('rfi_name')
|
||||
var param: Dictionary = {}
|
||||
var kni: float = item.aoa
|
||||
param['freq'] = item.freq
|
||||
param['width'] = item.width
|
||||
if interfer_name == 'k1':
|
||||
param['dur'] = 1.0 # Необходимо добавить параметры управления
|
||||
param['period'] = 1.0 # Необходимо добавить параметры управления
|
||||
var key = thrs.find_key(item.id)
|
||||
if key != null:
|
||||
ispp = key
|
||||
else:
|
||||
ispp = pop_id()
|
||||
if ispp == 0: return
|
||||
msg_ss += 1
|
||||
var ecm: Interfer
|
||||
if ecms.has(ispp):
|
||||
ecm = ecms[ispp]
|
||||
else:
|
||||
ecm = Interfer.new()
|
||||
ecm.ispp = ispp
|
||||
ecm.ss = msg_ss
|
||||
ecm.kni = kni
|
||||
ecm.krp = interfer_name
|
||||
ecm.params = param
|
||||
ecm.powp = 100.0 # Необходимо добавить управление мощностью
|
||||
thrs[ispp] = item.id
|
||||
var json_data = ecm.get_msg6_data()
|
||||
unit.tx_stack.append(json_data)
|
||||
signaller.emit_signal('interfer_new', ecm)
|
||||
|
||||
|
||||
func pop_id():
|
||||
var id = 0
|
||||
if len(id_array):
|
||||
id = id_array[0]
|
||||
id_array.remove_at(0)
|
||||
return id
|
||||
|
||||
|
||||
func push_id(id : int):
|
||||
id_array.append(id)
|
||||
|
||||
@@ -68,6 +68,6 @@ func _process(_delta: float) -> void:
|
||||
for addr in units:
|
||||
var unit = units[addr]
|
||||
match unit.process(tick):
|
||||
Error.OK: sock_unicast.send_to(addr, unit.data_tx)
|
||||
Error.OK: sock_unicast.send_to(addr, unit.tx_data)
|
||||
Error.FAILED: emit_signal('socket_error', 'ошибка: %s %s:%d' % [unit, addr[0], addr[1]])
|
||||
poll_sockets.any(func(sock): poll_receive(sock, tick))
|
||||
|
||||
@@ -25,3 +25,18 @@ signal full_screen(id: int)
|
||||
## Вызывается, когда пользователь выбирает цель
|
||||
## [param bip] - Отметка цели на экране
|
||||
signal rto_threat_sel (bip: Control)
|
||||
|
||||
|
||||
## Вызывается, когда пользователь выбирает помеху
|
||||
## [param btn] - Нажатая кнопка помехи
|
||||
signal interfer_init (btn: PanelContainer)
|
||||
|
||||
|
||||
## Вызывается, когда выбраны цели для постановки помех
|
||||
## [param btn] - Нажатая кнопка помехи, [param sel_threats] - список целей
|
||||
signal interfer_create (btn: PanelContainer, sel_threats: Array)
|
||||
|
||||
|
||||
## Вызывается, когда создалась новая помеха
|
||||
## [param ecm] - Новая помеха
|
||||
signal interfer_new (ecm: interfer.Interfer)
|
||||
|
||||
@@ -55,7 +55,7 @@ func _ready() -> void:
|
||||
timer_check_lost.start(repsettings.ThreatParams.time_lost / 1000.0)
|
||||
signaller.connect('rto_threat_sel', Callable(self, 'on_rto_threat_sel').bind(threats))
|
||||
signaller.connect('threat_selected', Callable(self, 'on_threat_selected').bind(threats))
|
||||
|
||||
signaller.connect('interfer_init', Callable(self, 'on_interfer_init').bind(threats))
|
||||
|
||||
|
||||
## Периодически удаляет устаревшие цели
|
||||
@@ -84,6 +84,17 @@ func on_threat_selected(th, threats):
|
||||
th.selected = true
|
||||
|
||||
|
||||
## Формирует список выбранных целей для включения помехи
|
||||
func on_interfer_init(btn, threats):
|
||||
var sel_threats: Array = []
|
||||
for threat in threats.values():
|
||||
if threat.selected:
|
||||
sel_threats.append(threat)
|
||||
if len(sel_threats):
|
||||
signaller.emit_signal('interfer_create', btn, sel_threats)
|
||||
|
||||
|
||||
|
||||
## Производит приём целей
|
||||
func on_data_capsrpb_received(unit: capsrpb.CapsRpb, threats: Dictionary):
|
||||
if not unit.json_dic.has('ts'): return
|
||||
|
||||
Reference in New Issue
Block a user