Доработка. Включение/Выключение помех. Табличка с параметрами помехи. Лог журнала событий по включению/отключению помех.

This commit is contained in:
MaD_CaT
2023-11-29 15:24:35 +03:00
parent c1a5c4cbbc
commit 5dcaef9ea6
16 changed files with 341 additions and 48 deletions

View File

@@ -29,7 +29,7 @@ class Threat:
var selected: bool ## Флаг, что цель выбрана
func _init(): clear_fflags()
func _to_string() -> String: return '<Threat>: номер:%d пеленг:%0.1f частота:%0.1f МГц' % [id, aoa, freq]
func _to_string() -> String: return 'номер: %d пеленг: %0.1f частота: %0.1f МГц' % [id, aoa, freq]
func clear_fflags(): tools.get_members_names(self).any(func(vn): fflags[vn] = false)
func set_from_dic(dic: Dictionary):
@@ -54,6 +54,7 @@ func _ready() -> void:
timer_check_lost.connect('timeout', Callable(self, 'on_timer_check_lost').bind(repsettings.ThreatParams.time_lost, threats))
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('rto_threat_unsel', Callable(self, 'on_rto_threat_unsel').bind(threats))
signaller.connect('threat_selected', Callable(self, 'on_threat_selected').bind(threats))
signaller.connect('interfer_init', Callable(self, 'on_interfer_init').bind(threats))
@@ -69,11 +70,12 @@ func on_timer_check_lost(time_lost: int, threats: Dictionary):
call_deferred('emit_signal', 'threats_resized', threats)
## Снимает выделение с цели, если нажать по отметке цели.
func on_rto_threat_unsel(th_id, threats): threats[th_id].selected = false
## Выбирает цель, если нажать по отметке цели.
func on_rto_threat_sel(bip, threats):
for threat in threats.values():
threat.selected = false
threats[bip.name.to_int()].selected = true
func on_rto_threat_sel(th_id, threats): on_threat_selected(threats[th_id], threats)
## Выбирает цель, если выбрать в таблице