Merge remote-tracking branch 'lepshiy/master'

# Conflicts:
#	scenes/работа/работа.gd
#	scripts/signaller.gd
This commit is contained in:
MaD_CaT
2024-12-13 15:22:22 +03:00
8 changed files with 66 additions and 32 deletions

View File

@@ -2,12 +2,13 @@ class_name frm_ecm_list extends NinePatchRect
const srn_sectors: Dictionary = {
'srni1': [4, 5, 6, 7, 8, 9, 10, 11] }
'srni1': [12, 13, 14, 15, 16, 17, 18, 19] }
const jtids_sectors: Dictionary = {
'svi1': [12, 13, 14, 15, 16, 17, 18, 19] }
'svi1': [4, 5, 6, 7, 8, 9, 10, 11] }
const kupd_sectors: Dictionary = {}
const kupd_sectors: Dictionary = {
'lchm1': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 21, 22, 23, 24, 25, 26, 27] }
const panika_sectors: Dictionary = {
'lchm1': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 21, 22, 23, 24, 25, 26, 27],
@@ -17,19 +18,21 @@ const panika_sectors: Dictionary = {
## Called when the node enters the scene tree for the first time.
func _ready():
var nodes: Array = get_tree().get_nodes_in_group('группа-принудительно')
$grd_forced/btn_cancel.button_connect('pressed', Callable(self, 'on_btn_cancel_pressed').bind($grd_forced/btn_cancel))
$grd_forced/btn_cancel.button_connect('pressed', Callable(self, 'on_btn_cancel_pressed').bind($grd_forced/btn_cancel, nodes))
nodes.any(func(btn): btn.button_connect('pressed', Callable(self, 'on_btn_pressed').bind(btn, nodes)))
func on_btn_cancel_pressed(btn):
func on_btn_cancel_pressed(btn, nodes):
signaller.emit_signal('interfer_off_all')
await get_tree().create_timer(0.1).timeout
btn.pressed = false
nodes.any(func(btn): btn.pressed = false)
func on_btn_pressed(btn_this, btn_others):
for btn_other in btn_others: btn_other.set_pressed(btn_this == btn_other)
signaller.emit_signal('interfer_off_all')
signaller.emit_signal('rto_threat_unsel_all')
if btn_this == $grd_forced/btn_panika:
signaller.emit_signal('interfer_prenuditelno', panika_sectors)
elif btn_this == $grd_forced/btn_jtids:

View File

@@ -17,7 +17,7 @@ const INTERFER_STATE = {
2: 'Ошибка',
3: 'Занято',
4: 'Неисправность',
5: 'Передача' }
5: ' ' }
## Состояние выполнения сеанса помехи
@@ -126,6 +126,7 @@ func on_interfer_off(ecm, ecms, thrs, table_index):
rehash(table_index)
ecms.erase(ecm.ispp)
thrs.erase(ecm.ispp)
interfer.push_id(ecm.ispp)
## Перестраивает индекс таблицы. Вызывать при удалении строки