From b7a41d3f9572c51adc0721668fcb42aec163b36b Mon Sep 17 00:00:00 2001 From: sasha80 Date: Fri, 25 Aug 2023 14:34:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0.=20=D0=9E=D1=82=D1=81=D0=BB=D0=B5=D0=B6=D0=B8?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE?= =?UTF-8?q?=D0=BA=20=D0=B2=D0=BE=20=D0=B2=D1=85=D0=BE=D0=B4=D0=BD=D1=8B?= =?UTF-8?q?=D1=85=20=D0=BF=D0=B0=D0=BA=D0=B5=D1=82=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/журнал.gd | 1 + scripts/threats.gd | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scenes/журнал.gd b/scenes/журнал.gd index 2424fab3..06f82333 100644 --- a/scenes/журнал.gd +++ b/scenes/журнал.gd @@ -4,6 +4,7 @@ extends Control func on_line_changed(unit, addr): Log.message(Logger.INFO, 'Состояние связи: %s %s' % [unit, addr]) func on_command_fail(unit, addr): Log.message(Logger.ERROR, 'Ошибка: команда не выполнена: %s %s' % [unit, addr]) func on_threats_changed(th: Object, msg: String): Log.message(Logger.INFO, '%s: %s' % [msg, th.to_string()]) +func on_parse_error(unit, msg: String): Log.message(Logger.ERROR, '%s: %s' % [unit.to_string(), msg]) func _ready() -> void: diff --git a/scripts/threats.gd b/scripts/threats.gd index 151d5942..00ac6c15 100644 --- a/scripts/threats.gd +++ b/scripts/threats.gd @@ -68,8 +68,10 @@ func on_timer_check_lost(time_lost: int, threats: Dictionary): ## Производит приём целей func on_data_capsrpb_received(unit: capsrpb.CapsRpb, threats: Dictionary): - if not unit.json_dic.has('mis'): - return + if not unit.json_dic.has('ts'): return + if unit.json_dic['ts'] != 5: return + if not unit.json_dic.has('mis'): return + var mis = unit.json_dic['mis'] var sz: = threats.size() for dic_th in mis: