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: