Доработка, отправка команды на поставноку помех. В процессе.
This commit is contained in:
@@ -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